From 15c809413f166426ded1029c8354db2ea2024edd Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Mon, 15 Jul 2024 16:37:54 +0200 Subject: [PATCH] Recast: add support for horizontal scroll wheels Properly check both scroll values. --- src/naveditor/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/naveditor/main.cpp b/src/naveditor/main.cpp index 190a4f8a..2ef338d0 100644 --- a/src/naveditor/main.cpp +++ b/src/naveditor/main.cpp @@ -646,7 +646,7 @@ int not_main(int argc, char** argv) break; case SDL_MOUSEWHEEL: - if (event.wheel.y < 0) + if (event.wheel.x < 0 || event.wheel.y < 0) { // wheel down if (mouseOverMenu) @@ -658,7 +658,7 @@ int not_main(int argc, char** argv) scrollZoom += 120.0f; } } - else + else if (event.wheel.x > 0 || event.wheel.y > 0) { if (mouseOverMenu) {