summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authoraerisarn <aerisarn@gmail.com>2015-06-01 14:47:18 +0200
committerTillmann Karras <tilkax@gmail.com>2015-06-01 14:59:22 +0200
commitf403bb09b01a1217fee205cf1829cb503a52a535 (patch)
treebfd2a4ea991ba716551a994b7ab36615c2974f1e /Source/Core
parent2cb073291ce6fc9aa7ee8d09af3d9a315970b451 (diff)
MainNoGUI: support real Wiimotes
This should be restructured to move the connection logic into Core instead of duplicating it in every Host, but alas, I'm too lazy for that right now. ~flacs
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/DolphinWX/MainNoGUI.cpp13
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) {}