Wiimote: Avoid the possibility of causing a constant rumble when a game is closed

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2025 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
John Peterson 2009-01-28 16:28:34 +00:00
parent 2f0993bb6e
commit 30523b570c
1 changed files with 12 additions and 2 deletions

View File

@ -320,8 +320,15 @@ void Shutdown(void)
}
#if defined(HAVE_WX) && HAVE_WX
if(frame) frame->ShutDown = true;
if(frame) frame->StartTimer();
/* We can only do this if we are not unloading the DLL, otherwise we can get stuck with a
a rumble after we Stop a game */
if (!g_EmulatorRunning)
{
if(frame) frame->ShutDown = true;
if(frame) frame->StartTimer();
}
else
{
#else
// Clean up wiiuse
wiiuse_cleanup(g_WiiMotesFromWiiUse, g_NumberOfWiiMotes);
@ -329,6 +336,9 @@ void Shutdown(void)
// Uninitialized
g_RealWiiMoteInitialized = false;
#endif
#if defined(HAVE_WX) && HAVE_WX
}
#endif
// Uninitialized
g_RealWiiMoteInitialized = false;