From 98dce11f8c226ef20a660ec7aa9eb0148999dc8c Mon Sep 17 00:00:00 2001 From: skidau Date: Thu, 19 Mar 2015 21:31:05 +1100 Subject: Updated the input plugins reference of hwnd on game start. Fixes the emu wiimotes mouse IR when rendering the game to a separate window. --- .../Core/InputCommon/ControllerInterface/ControllerInterface.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp') diff --git a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp index 1330cb1e0a..a3c14a0ab5 100644 --- a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp +++ b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp @@ -44,7 +44,7 @@ ControllerInterface g_controller_interface; void ControllerInterface::Initialize(void* const hwnd) { if (m_is_init) - return; + DeInit(); m_hwnd = hwnd; @@ -102,6 +102,11 @@ void ControllerInterface::Shutdown() delete d; } + DeInit(); +} + +void ControllerInterface::DeInit() +{ m_devices.clear(); #ifdef CIFACE_USE_XINPUT -- cgit v1.2.3