From b43487096f157e4c2e42f9a96a35bfc89a62368f Mon Sep 17 00:00:00 2001 From: Allen Webster Date: Fri, 1 May 2020 18:55:52 -0700 Subject: [PATCH] Okay I think this is actually the fix for the mouse wheel problem --- platform_mac/mac_4ed.mm | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/platform_mac/mac_4ed.mm b/platform_mac/mac_4ed.mm index dc65a4dd..5ba13299 100644 --- a/platform_mac/mac_4ed.mm +++ b/platform_mac/mac_4ed.mm @@ -1040,9 +1040,18 @@ mac_toggle_fullscreen(void){ } - (void)scrollWheel:(NSEvent *)event{ - f32 dx = event.scrollingDeltaX; f32 dy = event.scrollingDeltaY; - mac_vars.input_chunk.trans.mouse_wheel = (i32)(-dy*mac_vars.screen_scale_factor); + if ([event hasPreciseScrollingDeltas]){ + mac_vars.input_chunk.trans.mouse_wheel = (i32)(-dy); + } + else{ + if (dy > 0){ + mac_vars.input_chunk.trans.mouse_wheel = -100; + } + else{ + mac_vars.input_chunk.trans.mouse_wheel = 100; + } + } system_signal_step(0); }