Wiimote: Fixed Issue 517

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2014 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
John Peterson
2009-01-26 07:29:04 +00:00
parent b0736a1508
commit 5ba7952988
3 changed files with 18 additions and 10 deletions

View File

@ -164,20 +164,23 @@ extern "C" void Initialize(void *init)
DoInitialize();
}
// If a game is not running this is called by the Configuration window when it's closed
extern "C" void Shutdown(void)
{
// Not running
g_EmulatorRunning = false;
// We will only shutdown when both a game and the frame is closed
if (g_FrameOpen)
{
#if defined(HAVE_WX) && HAVE_WX
if(frame) frame->UpdateGUI();
#endif
// Don't shut down the wiimote when we still have the window open
return;
}
// Not running
g_EmulatorRunning = false;
#if HAVE_WIIUSE
if(g_RealWiiMoteInitialized) WiiMoteReal::Shutdown();
#endif