Make the emulation stop asynchronous to prevent deadlocks.

This may expose bugs which relied on the Main Thread to be suspended in the stopping state.
This commit is contained in:
Jules Blok
2014-06-20 02:43:57 +02:00
parent ff6fa68b71
commit 3266394dfb
7 changed files with 127 additions and 82 deletions

View File

@ -39,6 +39,7 @@ enum EState
bool Init();
void Stop();
void Shutdown();
std::string StopMessage(bool, std::string);
@ -81,4 +82,8 @@ void UpdateTitle();
// the return value of the first call should be passed in as the second argument of the second call.
bool PauseAndLock(bool doLock, bool unpauseOnUnlock=true);
// for calling back into UI code without introducing a dependency on it in core
typedef void(*StoppedCallbackFunc)(void);
void SetOnStoppedCallback(StoppedCallbackFunc callback);
} // namespace