comparison 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
comparison
equal deleted inserted replaced
4010:3aa1406620f6 4011:f5794774970d
930 if ( isInGameWin ) { 930 if ( isInGameWin ) {
931 float dy, dx; 931 float dy, dx;
932 Uint8 button; 932 Uint8 button;
933 dy = [ event deltaY ]; 933 dy = [ event deltaY ];
934 dx = [ event deltaX ]; 934 dx = [ event deltaX ];
935 if ( dy ) { 935 if ( dy > 0.0 || dx > 0.0 ) /* Scroll up */
936 if ( dy > 0.0 ) /* Scroll up */ 936 button = SDL_BUTTON_WHEELUP;
937 button = SDL_BUTTON_WHEELUP; 937 else /* Scroll down */
938 else /* Scroll down */ 938 button = SDL_BUTTON_WHEELDOWN;
939 button = SDL_BUTTON_WHEELDOWN; 939 /* For now, wheel is sent as a quick down+up */
940 /* For now, wheel is sent as a quick down+up */ 940 SDL_PrivateMouseButton (SDL_PRESSED, button, 0, 0);
941 SDL_PrivateMouseButton (SDL_PRESSED, button, 0, 0); 941 SDL_PrivateMouseButton (SDL_RELEASED, button, 0, 0);
942 SDL_PrivateMouseButton (SDL_RELEASED, button, 0, 0);
943 }
944 if ( dx ) {
945 if ( dx > 0.0 ) /* Scroll left */
946 button = SDL_BUTTON_WHEELLEFT;
947 else /* Scroll right */
948 button = SDL_BUTTON_WHEELRIGHT;
949 /* For now, wheel is sent as a quick down+up */
950 SDL_PrivateMouseButton (SDL_PRESSED, button, 0, 0);
951 SDL_PrivateMouseButton (SDL_RELEASED, button, 0, 0);
952 }
953 } 942 }
954 break; 943 break;
955 case NSKeyUp: 944 case NSKeyUp:
956 QZ_DoKey (this, SDL_RELEASED, event); 945 QZ_DoKey (this, SDL_RELEASED, event);
957 break; 946 break;