Mercurial > sdl-ios-xcode
diff 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 |
line wrap: on
line diff
--- a/src/video/bwindow/SDL_sysevents.cc Fri Jul 06 13:32:20 2007 +0000 +++ b/src/video/bwindow/SDL_sysevents.cc Fri Jul 06 13:39:03 2007 +0000 @@ -294,23 +294,12 @@ float x, y; x = y = 0; if (msg->FindFloat("be:wheel_delta_x", &x) == B_OK && msg->FindFloat("be:wheel_delta_y", &y) == B_OK) { - if ( y ) { - if (y < 0) { - SDL_PrivateMouseButton(SDL_PRESSED, SDL_BUTTON_WHEELDOWN, 0, 0); - SDL_PrivateMouseButton(SDL_RELEASED, SDL_BUTTON_WHEELDOWN, 0, 0); - } else { - SDL_PrivateMouseButton(SDL_PRESSED, SDL_BUTTON_WHEELUP, 0, 0); - SDL_PrivateMouseButton(SDL_RELEASED, SDL_BUTTON_WHEELUP, 0, 0); - } - } - if ( x ) { - if (x < 0) { - SDL_PrivateMouseButton(SDL_PRESSED, SDL_BUTTON_WHEELRIGHT, 0, 0); - SDL_PrivateMouseButton(SDL_RELEASED, SDL_BUTTON_WHEELRIGHT, 0, 0); - } else { - SDL_PrivateMouseButton(SDL_PRESSED, SDL_BUTTON_WHEELLEFT, 0, 0); - SDL_PrivateMouseButton(SDL_RELEASED, SDL_BUTTON_WHEELLEFT, 0, 0); - } + if (x < 0 || y < 0) { + SDL_PrivateMouseButton(SDL_PRESSED, SDL_BUTTON_WHEELDOWN, 0, 0); + SDL_PrivateMouseButton(SDL_RELEASED, SDL_BUTTON_WHEELDOWN, 0, 0); + } else if (x > 0 || y > 0) { + SDL_PrivateMouseButton(SDL_PRESSED, SDL_BUTTON_WHEELUP, 0, 0); + SDL_PrivateMouseButton(SDL_RELEASED, SDL_BUTTON_WHEELUP, 0, 0); } } break;