Commit 901515a5 authored by Ryan C. Gordon's avatar Ryan C. Gordon

Holding down shift while moving the mouse's scrollwheel on MacOS X makes the

 OS report these are "horizontal scrollwheel" events, which confuses gaming
 apps in several legitimate conditions. Now all scrollwheel events are made
 to look vertical when passed to the app.

Patch by John Knottenbelt.

 http://www.libsdl.org/pipermail/sdl/2005-March/067978.html

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401051
parent fa85ee1b
......@@ -900,10 +900,11 @@ void QZ_PumpEvents (_THIS)
break;
case NSScrollWheel:
if ( isInGameWin ) {
float dy;
float dy, dx;
Uint8 button;
dy = [ event deltaY ];
if ( dy > 0.0 ) /* Scroll up */
dx = [ event deltaX ];
if ( dy > 0.0 || dx > 0.0 ) /* Scroll up */
button = SDL_BUTTON_WHEELUP;
else /* Scroll down */
button = SDL_BUTTON_WHEELDOWN;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment