mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-21 03:54:57 +00:00
Core: Reset wiimotes/rumble on emu thread instead of main thread
This was causing a race which was crashing the FifoCI runners. The main thread called Stop() which in turn called ResetAllWiimotes() while the emu thread was still exiting, also shutting down the Wiimote class. By shifting the reset to the emu thread, all cleanup operations happen on the same thread where they were initialized.
This commit is contained in:
parent
c602cb2e2f
commit
e5485ca499
1 changed files with 5 additions and 6 deletions
|
@ -289,12 +289,6 @@ void Stop() // - Hammertime!
|
|||
|
||||
g_video_backend->Video_ExitLoop();
|
||||
}
|
||||
|
||||
if (_CoreParameter.bWii)
|
||||
Wiimote::ResetAllWiimotes();
|
||||
|
||||
ResetRumble();
|
||||
|
||||
}
|
||||
|
||||
void DeclareAsCPUThread()
|
||||
|
@ -534,7 +528,12 @@ static void EmuThread(std::unique_ptr<BootParameters> boot, WindowSystemInfo wsi
|
|||
return;
|
||||
|
||||
if (init_wiimotes)
|
||||
{
|
||||
Wiimote::ResetAllWiimotes();
|
||||
Wiimote::Shutdown();
|
||||
}
|
||||
|
||||
ResetRumble();
|
||||
|
||||
Keyboard::Shutdown();
|
||||
Pad::Shutdown();
|
||||
|
|
Loading…
Add table
Reference in a new issue