summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp9
-rw-r--r--Source/Core/InputCommon/ControllerInterface/ControllerInterface.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp
index 7be22d4a8d..9f6e7c5179 100644
--- a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp
+++ b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp
@@ -80,6 +80,15 @@ void ControllerInterface::Initialize(const WindowSystemInfo& wsi)
RefreshDevices();
}
+void ControllerInterface::ChangeWindow(void* hwnd)
+{
+ if (!m_is_init)
+ return;
+
+ m_wsi.render_surface = hwnd;
+ RefreshDevices();
+}
+
void ControllerInterface::RefreshDevices()
{
if (!m_is_init)
diff --git a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.h b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.h
index 2e078e8934..d5567222a4 100644
--- a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.h
+++ b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.h
@@ -42,6 +42,7 @@ class ControllerInterface : public ciface::Core::DeviceContainer
public:
ControllerInterface() : m_is_init(false) {}
void Initialize(const WindowSystemInfo& wsi);
+ void ChangeWindow(void* hwnd);
void RefreshDevices();
void Shutdown();
void AddDevice(std::shared_ptr<ciface::Core::Device> device);