src/video/quartz/SDL_QuartzEvents.m
changeset 502 80a3d09bab29
parent 501 74262d2647ca
child 511 79c189f5bd76
--- a/src/video/quartz/SDL_QuartzEvents.m	Sat Oct 05 05:07:57 2002 +0000
+++ b/src/video/quartz/SDL_QuartzEvents.m	Sat Oct 05 05:11:20 2002 +0000
@@ -468,11 +468,15 @@
                 case NSScrollWheel:
                     if (NSPointInRect([ event locationInWindow ], winRect)) {
                         float dy;
+                        Uint8 button;
                         dy = [ event deltaY ];
                         if ( dy > 0.0 ) /* Scroll up */
-                            SDL_PrivateMouseButton (SDL_PRESSED, 4, 0, 0);
+                            button = SDL_BUTTON_WHEELUP;
                         else /* Scroll down */
-                            SDL_PrivateMouseButton (SDL_PRESSED, 5, 0, 0);
+                            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:
@@ -509,4 +513,4 @@
         SDL_PrivateMouseMotion (0, 1, dx, dy);
     
     [ pool release ];
-}
\ No newline at end of file
+}