Merge branch 'join-wiimote-scanning-thread'

This commit is contained in:
Glenn Rice 2013-08-01 07:19:00 -05:00
commit 95c234ceb3
3 changed files with 8 additions and 5 deletions

View File

@ -32,7 +32,7 @@ void Shutdown()
delete *i;
g_plugin.controllers.clear();
WiimoteReal::Shutdown();
WiimoteReal::Stop();
g_controller_interface.Shutdown();
}

View File

@ -54,6 +54,7 @@ namespace WiimoteReal
{
void Initialize(bool wait = false);
void Stop();
void Shutdown();
void Resume();
void Pause();

View File

@ -570,15 +570,17 @@ void Initialize(bool wait)
g_real_wiimotes_initialized = true;
}
void Shutdown(void)
// called on emulation shutdown
void Stop(void)
{
for (unsigned int i = 0; i < MAX_BBMOTES; ++i)
if (g_wiimotes[i] && g_wiimotes[i]->IsConnected())
g_wiimotes[i]->EmuStop();
}
// WiimoteReal is shutdown on app exit
return;
// called when the dolphin app exits
void Shutdown(void)
{
g_wiimote_scanner.StopScanning();
std::lock_guard<std::recursive_mutex> lk(g_refresh_lock);