src/video/cocoa/SDL_cocoawindow.m
changeset 5057 bdff53ed6c8b
parent 5056 8b7988f42fcb
child 5059 00d1fef487c5
--- a/src/video/cocoa/SDL_cocoawindow.m	Thu Jan 20 16:05:59 2011 -0800
+++ b/src/video/cocoa/SDL_cocoawindow.m	Fri Jan 21 00:15:18 2011 +0100
@@ -29,6 +29,7 @@
 #include "../../events/SDL_windowevents_c.h"
 #include "SDL_cocoavideo.h"
 #include "SDL_cocoashape.h"
+#include "SDL_cocoamouse.h"
 
 static __inline__ void ConvertNSRect(NSRect *r)
 {
@@ -260,20 +261,7 @@
 
 - (void)scrollWheel:(NSEvent *)theEvent
 {
-    float x = [theEvent deltaX];
-    float y = [theEvent deltaY];
-
-    if (x > 0) {
-        x += 0.9f;
-    } else if (x < 0) {
-        x -= 0.9f;
-    }
-    if (y > 0) {
-        y += 0.9f;
-    } else if (y < 0) {
-        y -= 0.9f;
-    }
-    SDL_SendMouseWheel(_data->window, (int)x, (int)y);
+    Cocoa_HandleMouseWheel(_data->window, theEvent);
 }
 
 - (void)touchesBeganWithEvent:(NSEvent *) theEvent