diff options
| author | Sepalani <sepalani@hotmail.fr> | 2015-06-02 20:24:54 +0200 |
|---|---|---|
| committer | Sepalani <sepalani@hotmail.fr> | 2015-06-02 20:24:54 +0200 |
| commit | 6985fd76b2847d71db38b59ae9e3944dd4c15a5e (patch) | |
| tree | e2f820cea5618ca112737c06fb48bdb7233268ad /Source/Core/DolphinWX/MainNoGUI.cpp | |
| parent | 2ff5c451d06b7db512d960590c643aadd3bbff86 (diff) | |
| parent | 7d29039c4869a7a88a12147a29f1dd06581c392f (diff) | |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'Source/Core/DolphinWX/MainNoGUI.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/MainNoGUI.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Source/Core/DolphinWX/MainNoGUI.cpp b/Source/Core/DolphinWX/MainNoGUI.cpp index ca028a69fe..9186742d46 100644 --- a/Source/Core/DolphinWX/MainNoGUI.cpp +++ b/Source/Core/DolphinWX/MainNoGUI.cpp @@ -19,6 +19,8 @@ #include "Core/Host.h" #include "Core/State.h" #include "Core/HW/Wiimote.h" +#include "Core/IPC_HLE/WII_IPC_HLE_Device_usb.h" +#include "Core/IPC_HLE/WII_IPC_HLE_WiiMote.h" #include "Core/PowerPC/PowerPC.h" #include "UICommon/UICommon.h" @@ -95,7 +97,16 @@ bool Host_RendererIsFullscreen() return rendererIsFullscreen; } -void Host_ConnectWiimote(int wm_idx, bool connect) {} +void Host_ConnectWiimote(int wm_idx, bool connect) +{ + if (Core::IsRunning() && SConfig::GetInstance().m_LocalCoreStartupParameter.bWii) + { + bool was_unpaused = Core::PauseAndLock(true); + GetUsbPointer()->AccessWiiMote(wm_idx | 0x100)->Activate(connect); + Host_UpdateMainFrame(); + Core::PauseAndLock(false, was_unpaused); + } +} void Host_SetWiiMoteConnectionState(int _State) {} |
