From 119e6f5bfef78c4cd22e23067ec33e9794d42aeb Mon Sep 17 00:00:00 2001 From: n00b Date: Sun, 15 Dec 2024 12:55:46 -0500 Subject: [PATCH] Fixed mouse wheel reporting last value when not scrolling --- rcbasic_runtime/rc_windowclose.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rcbasic_runtime/rc_windowclose.h b/rcbasic_runtime/rc_windowclose.h index 229f7e3..3a564d9 100644 --- a/rcbasic_runtime/rc_windowclose.h +++ b/rcbasic_runtime/rc_windowclose.h @@ -106,6 +106,9 @@ bool rc_update() rc_inkey_val = 0; + rc_mwheelx = 0; + rc_mwheely = 0; + while ( !Close && SDL_PollEvent( &SDL_event ) ) { // os::Printer::log("event: ", core::stringc((int)SDL_event.type).c_str(), ELL_INFORMATION); // just for debugging