Skip to content

Commit

Permalink
Holding down shift while moving the mouse's scrollwheel on MacOS X ma…
Browse files Browse the repository at this point in the history
…kes 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
  • Loading branch information
icculus committed Apr 17, 2005
1 parent b439b7a commit 2b55f06
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/video/quartz/SDL_QuartzEvents.m
Expand Up @@ -900,10 +900,11 @@ but not as a result of the warp (so it's in the right direction).
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;
Expand Down

0 comments on commit 2b55f06

Please sign in to comment.