mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Revert "Join the emu thread in Core::Stop. Get rid of Core::Shutdown which did that before."
This reverts commit ba664b3293
.
Added documentation to Core::Shutdown() to prevent breaking changes.
This commit is contained in:
@ -273,8 +273,6 @@ void Stop() // - Hammertime!
|
||||
|
||||
g_video_backend->Video_ExitLoop();
|
||||
}
|
||||
if (s_emu_thread.joinable())
|
||||
s_emu_thread.join();
|
||||
}
|
||||
|
||||
static void DeclareAsCPUThread()
|
||||
@ -829,6 +827,18 @@ void UpdateTitle()
|
||||
Host_UpdateTitle(SMessage);
|
||||
}
|
||||
|
||||
void Shutdown()
|
||||
{
|
||||
// During shutdown DXGI expects us to handle some messages on the UI thread.
|
||||
// Therefore we can't immediately block and wait for the emu thread to shut
|
||||
// down, so we join the emu thread as late as possible when the UI has already
|
||||
// shut down.
|
||||
// For more info read "DirectX Graphics Infrastructure (DXGI): Best Practices"
|
||||
// on MSDN.
|
||||
if (s_emu_thread.joinable())
|
||||
s_emu_thread.join();
|
||||
}
|
||||
|
||||
void SetOnStoppedCallback(StoppedCallbackFunc callback)
|
||||
{
|
||||
s_on_stopped_callback = callback;
|
||||
|
@ -39,6 +39,7 @@ enum EState
|
||||
|
||||
bool Init();
|
||||
void Stop();
|
||||
void Shutdown();
|
||||
|
||||
std::string StopMessage(bool, const std::string&);
|
||||
|
||||
|
Reference in New Issue
Block a user