mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-13 09:39:33 +01:00
Android: Fix emuthread management to exit cleanly without hanging. Helps with task switching on Android.
This commit is contained in:
1 parent
b3a09791b1
commit
7f30037e45
8 files changed
+72
-17
No files matched your search
@@ -54,6 +54,9 @@ enum EmuThreadStatus : int {
|
||||
void EmuThreadFunc();
|
||||
void RenderThreadFunc();
|
||||
|
||||
// On most other platforms, we let the main thread become the render thread and
|
||||
// start a separate emu thread from that, if needed. Should probably switch to that
|
||||
// to make it the same on all platforms.
|
||||
void EmuThread_Start(bool separateRenderThread) {
|
||||
std::lock_guard<std::mutex> guard(emuThreadLock);
|
||||
emuThread = std::thread(&EmuThreadFunc);
|
||||
@@ -218,7 +221,7 @@ void EmuThreadFunc() {
|
||||
if (g_Config.bBrowse)
|
||||
PostMessage(MainWindow::GetHWND(), WM_COMMAND, ID_FILE_LOAD, 0);
|
||||
|
||||
Core_EnableStepping(FALSE);
|
||||
Core_EnableStepping(false);
|
||||
|
||||
while (GetUIState() != UISTATE_EXIT) {
|
||||
// We're here again, so the game quit. Restart Core_Run() which controls the UI.
|
||||
|
||||
Reference in new issue
Block a user