summaryrefslogtreecommitdiffstats
path: root/src/yuzu
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2023-01-11 02:32:58 +0100
committerGitHub <noreply@github.com>2023-01-11 02:32:58 +0100
commit0e8f98a441400d0dc87425d4c2c26e71e995bdcb (patch)
treec61f3004ff0b01b88b4990436ddb2abe9119dce1 /src/yuzu
parentMerge pull request #9596 from liamwhite/mvk (diff)
parentyuzu: Read mouse wheel input (diff)
downloadyuzu-0e8f98a441400d0dc87425d4c2c26e71e995bdcb.tar
yuzu-0e8f98a441400d0dc87425d4c2c26e71e995bdcb.tar.gz
yuzu-0e8f98a441400d0dc87425d4c2c26e71e995bdcb.tar.bz2
yuzu-0e8f98a441400d0dc87425d4c2c26e71e995bdcb.tar.lz
yuzu-0e8f98a441400d0dc87425d4c2c26e71e995bdcb.tar.xz
yuzu-0e8f98a441400d0dc87425d4c2c26e71e995bdcb.tar.zst
yuzu-0e8f98a441400d0dc87425d4c2c26e71e995bdcb.zip
Diffstat (limited to 'src/yuzu')
-rw-r--r--src/yuzu/configuration/configure_input_player.cpp6
-rw-r--r--src/yuzu/configuration/configure_input_player.h3
2 files changed, 9 insertions, 0 deletions
diff --git a/src/yuzu/configuration/configure_input_player.cpp b/src/yuzu/configuration/configure_input_player.cpp
index 183cbe562..c40d980c9 100644
--- a/src/yuzu/configuration/configure_input_player.cpp
+++ b/src/yuzu/configuration/configure_input_player.cpp
@@ -1466,6 +1466,12 @@ void ConfigureInputPlayer::mousePressEvent(QMouseEvent* event) {
input_subsystem->GetMouse()->PressButton(0, 0, 0, 0, button);
}
+void ConfigureInputPlayer::wheelEvent(QWheelEvent* event) {
+ const int x = event->angleDelta().x();
+ const int y = event->angleDelta().y();
+ input_subsystem->GetMouse()->MouseWheelChange(x, y);
+}
+
void ConfigureInputPlayer::keyPressEvent(QKeyEvent* event) {
if (!input_setter || !event) {
return;
diff --git a/src/yuzu/configuration/configure_input_player.h b/src/yuzu/configuration/configure_input_player.h
index 6d1876f2b..99a9c875d 100644
--- a/src/yuzu/configuration/configure_input_player.h
+++ b/src/yuzu/configuration/configure_input_player.h
@@ -116,6 +116,9 @@ private:
/// Handle mouse button press events.
void mousePressEvent(QMouseEvent* event) override;
+ /// Handle mouse wheel move events.
+ void wheelEvent(QWheelEvent* event) override;
+
/// Handle key press events.
void keyPressEvent(QKeyEvent* event) override;