diff options
author | bunnei <bunneidev@gmail.com> | 2021-02-11 18:58:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-11 18:58:23 +0100 |
commit | e53b6ecc76cf8fe670e5056f75d8e798da66f9ff (patch) | |
tree | 21c0ed620d025fa8ab30465c83dfe57e4888816b /src/input_common/mouse/mouse_input.h | |
parent | Merge pull request #5908 from Morph1984/swkbd-finalize (diff) | |
parent | Add mouse panning (diff) | |
download | yuzu-e53b6ecc76cf8fe670e5056f75d8e798da66f9ff.tar yuzu-e53b6ecc76cf8fe670e5056f75d8e798da66f9ff.tar.gz yuzu-e53b6ecc76cf8fe670e5056f75d8e798da66f9ff.tar.bz2 yuzu-e53b6ecc76cf8fe670e5056f75d8e798da66f9ff.tar.lz yuzu-e53b6ecc76cf8fe670e5056f75d8e798da66f9ff.tar.xz yuzu-e53b6ecc76cf8fe670e5056f75d8e798da66f9ff.tar.zst yuzu-e53b6ecc76cf8fe670e5056f75d8e798da66f9ff.zip |
Diffstat (limited to 'src/input_common/mouse/mouse_input.h')
-rw-r--r-- | src/input_common/mouse/mouse_input.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/input_common/mouse/mouse_input.h b/src/input_common/mouse/mouse_input.h index 58803c1bf..46aa676c1 100644 --- a/src/input_common/mouse/mouse_input.h +++ b/src/input_common/mouse/mouse_input.h @@ -57,8 +57,10 @@ public: * Signals that mouse has moved. * @param x the x-coordinate of the cursor * @param y the y-coordinate of the cursor + * @param center_x the x-coordinate of the middle of the screen + * @param center_y the y-coordinate of the middle of the screen */ - void MouseMove(int x, int y); + void MouseMove(int x, int y, int center_x, int center_y); /** * Signals that a motion sensor tilt has ended. @@ -74,11 +76,13 @@ public: private: void UpdateThread(); void UpdateYuzuSettings(); + void StopPanning(); struct MouseInfo { InputCommon::MotionInput motion{0.0f, 0.0f, 0.0f}; Common::Vec2<int> mouse_origin; Common::Vec2<int> last_mouse_position; + Common::Vec2<float> last_mouse_change; bool is_tilting = false; float sensitivity{0.120f}; @@ -94,5 +98,6 @@ private: Common::SPSCQueue<MouseStatus> mouse_queue; bool configuring{false}; bool update_thread_running{true}; + int mouse_panning_timout{}; }; } // namespace MouseInput |