SDL/src
Sam Lantinga cc7b2fc512 Temporary fix for bug 3432 - macOS 10.12: small scrolls (1 wheel notch) don't generate events
Eric Wasylishen

This bug was reintroduced by https://hg.libsdl.org/SDL/rev/fcf24b38a28a

The steps to reproduce are the same: run the "testrelative" SDL demo with "--info all",
connect a USB mouse with a scroll wheel, and roll the scroll wheel one "notch". You'll get log output like:

testdraw2[1644:67222] INFO: SDL EVENT: Mouse: wheel scrolled 0 in x and 0 in y (reversed: 1) in window 1

As far as I can tell macOS doesn't have an API for getting the number of "wheel notches"; I get a deltaY of 0.100006 for one "notch", and it's heavily accelerated (if you roll the wheel quickly you'll get large deltas). So NSEvent's deltaY is only meant to be used for scrolling a scroll view, with the given distance in points, not something like selecting an item in a game.

Here's a temporary patch that at restores the foor/ceil in Cocoa_HandleMouseWheel.
Not ideal, but at least it restores the ability to scroll one notch of a mousewheel.
2018-03-10 21:13:50 -08:00
..
atomic Updated copyright for 2018 2018-01-03 10:03:25 -08:00
audio Fixed MinGW-w64 build 2018-02-24 08:23:44 -08:00
core Try to dynamically create a default Android game controller mapping based on the buttons and axes on the controller. 2018-03-06 14:51:50 -08:00
cpuinfo Updated copyright for 2018 2018-01-03 10:03:25 -08:00
dynapi Added SDL_GameControllerMappingForDeviceIndex() to get the mapping for a controller before it's opened 2018-03-07 13:30:40 -08:00
events Fixed building on platforms without __sighandler_t 2018-01-30 18:12:25 -08:00
file Updated copyright for 2018 2018-01-03 10:03:25 -08:00
filesystem revert the recent typecast assignment changes (see bug #4079) 2018-02-12 17:00:00 +03:00
haptic Updated copyright for 2018 2018-01-03 10:03:25 -08:00
joystick Delay delivery of the pause button release on MFI controllers so it doesn't happen in the same frame as the button press 2018-03-08 16:32:22 -08:00
libm Fixed misleading indentation 2018-01-30 16:53:24 -08:00
loadso Updated copyright for 2018 2018-01-03 10:03:25 -08:00
main Fixed bug 4073 - Unquoted Unicode argument parsing broken on Windows due to incorrect usage of SDL_isspace() 2018-02-10 12:43:11 -08:00
power Updated copyright for 2018 2018-01-03 10:03:25 -08:00
render Backed out changeset 6c8521d53507 2018-02-21 22:53:52 -05:00
stdlib Fixed bug 3947 - replace strlcpy with memcpy in SDL_strdup() 2018-02-13 08:13:29 -08:00
test SDL_test_fuzzer.c: fix strict aliasing warnings by using a union. 2018-02-25 10:15:00 +03:00
thread Fixed bug 4097 - Segmentation fault by SDL_CreateThreadWithStackSize 2018-02-25 19:51:34 -08:00
timer Updated copyright for 2018 2018-01-03 10:03:25 -08:00
video Temporary fix for bug 3432 - macOS 10.12: small scrolls (1 wheel notch) don't generate events 2018-03-10 21:13:50 -08:00
SDL.c Fixed bug 4034 - Don't include _DllMainCRTStartup() if SDL_STATIC_LIB is defined. 2018-02-21 09:40:47 -08:00
SDL_assert.c Progress fixing bug 4100 - errors and warnings after changeset 11917 2018-03-02 22:53:25 -08:00
SDL_assert_c.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_dataqueue.c Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_dataqueue.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_error.c Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_error_c.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_hints.c Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_internal.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_log.c Updated copyright for 2018 2018-01-03 10:03:25 -08:00