summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp
diff options
context:
space:
mode:
authorAdmiral H. Curtiss <pikachu025@gmail.com>2022-07-26 12:52:33 +0200
committerGitHub <noreply@github.com>2022-07-26 12:52:33 +0200
commit9d15a1c5a1e6183a0e98165ac093e74ca8e4894e (patch)
treebb9806ee563adf38a74e55506f1e387e0bd08b72 /Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp
parentc7752f80e4803362c58c03e0510680e95f4061c6 (diff)
parentd14bd10cd74ecfb9777e19dde842fe64d7681605 (diff)
Merge pull request #10858 from AdmiralCurtiss/mouse-center-hotkey
Add hotkey for centering mouse in render window.
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp
index 1c4dc71da8..442e5502fa 100644
--- a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp
+++ b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp
@@ -421,6 +421,16 @@ Common::Vec2 ControllerInterface::GetWindowInputScale() const
return {1 / ar, 1.f};
}
+void ControllerInterface::SetMouseCenteringRequested(bool center)
+{
+ m_requested_mouse_centering = center;
+}
+
+bool ControllerInterface::IsMouseCenteringRequested() const
+{
+ return m_requested_mouse_centering.load();
+}
+
// Register a callback to be called when a device is added or removed (as from the input backends'
// hotplug thread), or when devices are refreshed
// Returns a handle for later removing the callback.