mirror of
https://github.com/libretro/ppsspp.git
synced 2024-12-02 22:26:25 +00:00
Ignore changes to SeparateCPUThread after startup.
This commit is contained in:
parent
450e4c7fea
commit
7e56dcf665
@ -75,7 +75,7 @@ volatile bool coreStatePending = false;
|
||||
static volatile CPUThreadState cpuThreadState = CPU_THREAD_NOT_RUNNING;
|
||||
|
||||
bool IsOnSeparateCPUThread() {
|
||||
if (g_Config.bSeparateCPUThread) {
|
||||
if (cpuThread != NULL) {
|
||||
return cpuThread->get_id() == std::this_thread::get_id();
|
||||
} else {
|
||||
return false;
|
||||
@ -270,7 +270,7 @@ bool PSP_IsInited() {
|
||||
void PSP_Shutdown() {
|
||||
if (coreState == CORE_RUNNING)
|
||||
coreState = CORE_ERROR;
|
||||
if (g_Config.bSeparateCPUThread) {
|
||||
if (cpuThread != NULL) {
|
||||
CPU_SetState(CPU_THREAD_SHUTDOWN);
|
||||
CPU_WaitStatus(&CPU_IsShutdown);
|
||||
delete cpuThread;
|
||||
@ -284,7 +284,7 @@ void PSP_Shutdown() {
|
||||
void PSP_RunLoopUntil(u64 globalticks) {
|
||||
SaveState::Process();
|
||||
|
||||
if (g_Config.bSeparateCPUThread) {
|
||||
if (cpuThread != NULL) {
|
||||
cpuThreadUntil = globalticks;
|
||||
if (CPU_NextState(CPU_THREAD_RUNNING, CPU_THREAD_EXECUTE)) {
|
||||
// The CPU doesn't actually respect cpuThreadUntil well, especially when skipping frames.
|
||||
|
Loading…
Reference in New Issue
Block a user