Mercurial > sdl-ios-xcode
comparison src/video/bwindow/SDL_sysevents.cc @ 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 | 4e29535b821b |
comparison
equal
deleted
inserted
replaced
4010:3aa1406620f6 | 4011:f5794774970d |
---|---|
292 case B_MOUSE_WHEEL_CHANGED: | 292 case B_MOUSE_WHEEL_CHANGED: |
293 { | 293 { |
294 float x, y; | 294 float x, y; |
295 x = y = 0; | 295 x = y = 0; |
296 if (msg->FindFloat("be:wheel_delta_x", &x) == B_OK && msg->FindFloat("be:wheel_delta_y", &y) == B_OK) { | 296 if (msg->FindFloat("be:wheel_delta_x", &x) == B_OK && msg->FindFloat("be:wheel_delta_y", &y) == B_OK) { |
297 if ( y ) { | 297 if (x < 0 || y < 0) { |
298 if (y < 0) { | 298 SDL_PrivateMouseButton(SDL_PRESSED, SDL_BUTTON_WHEELDOWN, 0, 0); |
299 SDL_PrivateMouseButton(SDL_PRESSED, SDL_BUTTON_WHEELDOWN, 0, 0); | 299 SDL_PrivateMouseButton(SDL_RELEASED, SDL_BUTTON_WHEELDOWN, 0, 0); |
300 SDL_PrivateMouseButton(SDL_RELEASED, SDL_BUTTON_WHEELDOWN, 0, 0); | 300 } else if (x > 0 || y > 0) { |
301 } else { | 301 SDL_PrivateMouseButton(SDL_PRESSED, SDL_BUTTON_WHEELUP, 0, 0); |
302 SDL_PrivateMouseButton(SDL_PRESSED, SDL_BUTTON_WHEELUP, 0, 0); | 302 SDL_PrivateMouseButton(SDL_RELEASED, SDL_BUTTON_WHEELUP, 0, 0); |
303 SDL_PrivateMouseButton(SDL_RELEASED, SDL_BUTTON_WHEELUP, 0, 0); | |
304 } | |
305 } | |
306 if ( x ) { | |
307 if (x < 0) { | |
308 SDL_PrivateMouseButton(SDL_PRESSED, SDL_BUTTON_WHEELRIGHT, 0, 0); | |
309 SDL_PrivateMouseButton(SDL_RELEASED, SDL_BUTTON_WHEELRIGHT, 0, 0); | |
310 } else { | |
311 SDL_PrivateMouseButton(SDL_PRESSED, SDL_BUTTON_WHEELLEFT, 0, 0); | |
312 SDL_PrivateMouseButton(SDL_RELEASED, SDL_BUTTON_WHEELLEFT, 0, 0); | |
313 } | |
314 } | 303 } |
315 } | 304 } |
316 break; | 305 break; |
317 } | 306 } |
318 | 307 |