Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'join-wiimote-scanning-thread'
  • Loading branch information
glennricster committed Aug 1, 2013
2 parents 8c5bc2b + be76dc1 commit 95c234c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Source/Core/Core/Src/HW/Wiimote.cpp
Expand Up @@ -32,7 +32,7 @@ void Shutdown()
delete *i;
g_plugin.controllers.clear();

WiimoteReal::Shutdown();
WiimoteReal::Stop();

g_controller_interface.Shutdown();
}
Expand Down
1 change: 1 addition & 0 deletions Source/Core/Core/Src/HW/Wiimote.h
Expand Up @@ -54,6 +54,7 @@ namespace WiimoteReal
{

void Initialize(bool wait = false);
void Stop();
void Shutdown();
void Resume();
void Pause();
Expand Down
10 changes: 6 additions & 4 deletions Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit 95c234c

Please sign in to comment.