diff options
| author | Admiral H. Curtiss <pikachu025@gmail.com> | 2022-07-26 12:52:33 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-26 12:52:33 +0200 |
| commit | 9d15a1c5a1e6183a0e98165ac093e74ca8e4894e (patch) | |
| tree | bb9806ee563adf38a74e55506f1e387e0bd08b72 /Source/Core/InputCommon/ControllerInterface/ControllerInterface.h | |
| parent | c7752f80e4803362c58c03e0510680e95f4061c6 (diff) | |
| parent | d14bd10cd74ecfb9777e19dde842fe64d7681605 (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.h')
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/ControllerInterface.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.h b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.h index 2f43cacc42..3a0276de41 100644 --- a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.h +++ b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.h @@ -106,6 +106,11 @@ public: // Inputs based on window coordinates should be multiplied by this. Common::Vec2 GetWindowInputScale() const; + // Request that the mouse cursor should be centered in the render window at the next opportunity. + void SetMouseCenteringRequested(bool center); + + bool IsMouseCenteringRequested() const; + HotplugCallbackHandle RegisterDevicesChangedCallback(std::function<void(void)> callback); void UnregisterDevicesChangedCallback(const HotplugCallbackHandle& handle); void InvokeDevicesChangedCallbacks() const; @@ -127,6 +132,7 @@ private: std::atomic<int> m_populating_devices_counter; WindowSystemInfo m_wsi; std::atomic<float> m_aspect_ratio_adjustment = 1; + std::atomic<bool> m_requested_mouse_centering = false; }; namespace ciface |
