// Some platforms, like Android, do not call this function but handle things on their own. void Core_Run() { #if _DEBUG host->UpdateDisassembly(); #endif while (true) { reswitch: switch(coreState) { case CORE_RUNNING: //1: enter a fast runloop Core_RunLoop(); break; // We should never get here on Android. case CORE_STEPPING: //1: wait for step command.. m_hStepEvent.wait(m_hStepMutex); if (coreState == CORE_POWERDOWN) return; if (coreState != CORE_STEPPING) goto reswitch; currentCPU = &mipsr4k; Core_SingleStep(); //4: update disasm dialog #ifdef _DEBUG host->UpdateDisassembly(); host->UpdateMemView(); #endif break; case CORE_POWERDOWN: case CORE_ERROR: //1: Exit loop!! return; } } }
// Some platforms, like Android, do not call this function but handle things on their own. void Core_Run() { #if defined(_DEBUG) host->UpdateDisassembly(); #endif #if !defined(USING_QT_UI) || defined(USING_GLES2) while (true) #endif { reswitch: if (globalUIState != UISTATE_INGAME) { CoreStateProcessed(); if (globalUIState == UISTATE_EXIT) { return; } Core_RunLoop(); #if defined(USING_QT_UI) && !defined(USING_GLES2) return; #else continue; #endif } switch (coreState) { case CORE_RUNNING: // enter a fast runloop Core_RunLoop(); break; // We should never get here on Android. case CORE_STEPPING: singleStepPending = false; CoreStateProcessed(); // Check if there's any pending savestate actions. SaveState::Process(); if (coreState == CORE_POWERDOWN) { return; } // wait for step command.. #if defined(USING_QT_UI) || defined(_DEBUG) host->UpdateDisassembly(); host->UpdateMemView(); host->SendCoreWait(true); #endif m_hStepEvent.wait(m_hStepMutex); #if defined(USING_QT_UI) || defined(_DEBUG) host->SendCoreWait(false); #endif #if defined(USING_QT_UI) && !defined(USING_GLES2) if (coreState != CORE_STEPPING) return; #endif // No step pending? Let's go back to the wait. if (!singleStepPending || coreState != CORE_STEPPING) { if (coreState == CORE_POWERDOWN) { return; } goto reswitch; } Core_SingleStep(); // update disasm dialog #if defined(USING_QT_UI) || defined(_DEBUG) host->UpdateDisassembly(); host->UpdateMemView(); #endif break; case CORE_POWERUP: case CORE_POWERDOWN: case CORE_ERROR: // Exit loop!! CoreStateProcessed(); return; case CORE_NEXTFRAME: return; } } }
// Some platforms, like Android, do not call this function but handle things on their own. void Core_Run() { #if defined(_DEBUG) host->UpdateDisassembly(); #endif #if !defined(USING_QT_UI) || defined(USING_GLES2) while (true) #endif { reswitch: switch (coreState) { case CORE_RUNNING: //1: enter a fast runloop Core_RunLoop(); break; // We should never get here on Android. case CORE_STEPPING: if (coreStatePending) { coreStatePending = false; m_hInactiveEvent.notify_one(); } //1: wait for step command.. #if defined(USING_QT_UI) || defined(_DEBUG) host->UpdateDisassembly(); host->UpdateMemView(); host->SendCoreWait(true); #endif m_hStepEvent.wait(m_hStepMutex); #if defined(USING_QT_UI) || defined(_DEBUG) host->SendCoreWait(false); #endif if (coreState == CORE_POWERDOWN) return; if (coreState != CORE_STEPPING) #if defined(USING_QT_UI) && !defined(USING_GLES2) return; #else goto reswitch; #endif currentCPU = &mipsr4k; Core_SingleStep(); //4: update disasm dialog #if defined(USING_QT_UI) || defined(_DEBUG) host->UpdateDisassembly(); host->UpdateMemView(); #endif break; case CORE_POWERDOWN: case CORE_ERROR: //1: Exit loop!! if (coreStatePending) { coreStatePending = false; m_hInactiveEvent.notify_one(); } return; case CORE_NEXTFRAME: return; } } }