diff options
| author | skidau <skidau@gmail.com> | 2015-03-19 21:31:05 +1100 |
|---|---|---|
| committer | skidau <skidau@gmail.com> | 2015-03-19 21:31:05 +1100 |
| commit | 98dce11f8c226ef20a660ec7aa9eb0148999dc8c (patch) | |
| tree | 166e338357f2473d571a4b39c4895f452e813556 /Source/Core/InputCommon/ControllerInterface | |
| parent | 27619e613ffffb6e3c3d21b59a97b51107994acb (diff) | |
Updated the input plugins reference of hwnd on game start. Fixes the emu wiimotes mouse IR when rendering the game to a separate window.
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface')
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp | 7 | ||||
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/ControllerInterface.h | 3 |
2 files changed, 9 insertions, 1 deletions
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 diff --git a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.h b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.h index 9ab8427ad2..1b2c93951f 100644 --- a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.h +++ b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.h @@ -117,6 +117,9 @@ public: void Initialize(void* const hwnd); void Reinitialize(); void Shutdown(); + + void DeInit(); + bool IsInit() const { return m_is_init; } void UpdateReference(ControlReference* control, const ciface::Core::DeviceQualifier& default_device) const; |
