Mercurial > sdl-ios-xcode
diff src/video/quartz/SDL_QuartzEvents.m @ 4011:f5794774970d SDL-1.2
Reverted mousewheel support in 1.2, since it breaks binary compatibility.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 06 Jul 2007 13:39:03 +0000 |
parents | 1146681dbb74 |
children | 60f677630282 |
line wrap: on
line diff
--- a/src/video/quartz/SDL_QuartzEvents.m Fri Jul 06 13:32:20 2007 +0000 +++ b/src/video/quartz/SDL_QuartzEvents.m Fri Jul 06 13:39:03 2007 +0000 @@ -932,24 +932,13 @@ Uint8 button; dy = [ event deltaY ]; dx = [ event deltaX ]; - if ( dy ) { - if ( dy > 0.0 ) /* Scroll up */ - button = SDL_BUTTON_WHEELUP; - else /* Scroll down */ - button = SDL_BUTTON_WHEELDOWN; - /* For now, wheel is sent as a quick down+up */ - SDL_PrivateMouseButton (SDL_PRESSED, button, 0, 0); - SDL_PrivateMouseButton (SDL_RELEASED, button, 0, 0); - } - if ( dx ) { - if ( dx > 0.0 ) /* Scroll left */ - button = SDL_BUTTON_WHEELLEFT; - else /* Scroll right */ - button = SDL_BUTTON_WHEELRIGHT; - /* For now, wheel is sent as a quick down+up */ - SDL_PrivateMouseButton (SDL_PRESSED, button, 0, 0); - SDL_PrivateMouseButton (SDL_RELEASED, button, 0, 0); - } + if ( dy > 0.0 || dx > 0.0 ) /* Scroll up */ + button = SDL_BUTTON_WHEELUP; + else /* Scroll down */ + button = SDL_BUTTON_WHEELDOWN; + /* For now, wheel is sent as a quick down+up */ + SDL_PrivateMouseButton (SDL_PRESSED, button, 0, 0); + SDL_PrivateMouseButton (SDL_RELEASED, button, 0, 0); } break; case NSKeyUp: