Mercurial > sdl-ios-xcode
comparison src/video/cocoa/SDL_cocoawindow.m @ 2152:003c1b5b07da
Fixed bug #382
Added horizontal scrolling support
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 06 Jul 2007 09:22:18 +0000 |
parents | 4685ccd33d0e |
children | 44e49d3fa6cf |
comparison
equal
deleted
inserted
replaced
2151:1e0692271600 | 2152:003c1b5b07da |
---|---|
272 - (void)scrollWheel:(NSEvent *)theEvent | 272 - (void)scrollWheel:(NSEvent *)theEvent |
273 { | 273 { |
274 int index; | 274 int index; |
275 | 275 |
276 index = _data->videodata->mouse; | 276 index = _data->videodata->mouse; |
277 SDL_SendMouseWheel(index, (int)([theEvent deltaY]+0.9f)); | 277 SDL_SendMouseWheel(index, (int)([theEvent deltaX]+0.9f), (int)([theEvent deltaY]+0.9f)); |
278 } | 278 } |
279 | 279 |
280 @end | 280 @end |
281 | 281 |
282 @interface SDLWindow : NSWindow | 282 @interface SDLWindow : NSWindow |