Skip to content
Permalink
Browse files
Merge pull request #8518 from stenzek/more-wiimote-reset-crashes
Core: Reset Wiimotes/rumble/memwatcher on emu thread
  • Loading branch information
stenzek committed Dec 13, 2019
2 parents 0cb3257 + e5485ca commit a980a39
Showing 1 changed file with 9 additions and 9 deletions.
@@ -289,15 +289,6 @@ void Stop() // - Hammertime!

g_video_backend->Video_ExitLoop();
}

if (_CoreParameter.bWii)
Wiimote::ResetAllWiimotes();

ResetRumble();

#ifdef USE_MEMORYWATCHER
s_memory_watcher.reset();
#endif
}

void DeclareAsCPUThread()
@@ -374,6 +365,10 @@ static void CpuThread(const std::optional<std::string>& savestate_path, bool del
// Enter CPU run loop. When we leave it - we are done.
CPU::Run();

#ifdef USE_MEMORYWATCHER
s_memory_watcher.reset();
#endif

s_is_started = false;

if (_CoreParameter.bFastmem)
@@ -533,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();

0 comments on commit a980a39

Please sign in to comment.