Mercurial > sdl-ios-xcode
diff src/video/windx5/SDL_dx5events.c @ 61:994ed1d668e7
Mouse wheel sends mouse button (4/5) events on Windows
author | Sam Lantinga <slouken@lokigames.com> |
---|---|
date | Sat, 16 Jun 2001 01:01:42 +0000 |
parents | 74212992fb08 |
children | 29a638dc26db |
line wrap: on
line diff
--- a/src/video/windx5/SDL_dx5events.c Mon Jun 11 22:54:34 2001 +0000 +++ b/src/video/windx5/SDL_dx5events.c Sat Jun 16 01:01:42 2001 +0000 @@ -379,6 +379,20 @@ case DIMOFS_Y: yrel += (Sint16)ptrbuf[i].dwData; break; + case DIMOFS_Z: + if ( xrel || yrel ) { + posted = SDL_PrivateMouseMotion( + 0, 1, xrel, yrel); + xrel = 0; + yrel = 0; + } + if((int)ptrbuf[i].dwData > 0) + posted = SDL_PrivateMouseButton( + SDL_PRESSED, 4, 0, 0); + else if((int)ptrbuf[i].dwData < 0) + posted = SDL_PrivateMouseButton( + SDL_PRESSED, 5, 0, 0); + break; case DIMOFS_BUTTON0: case DIMOFS_BUTTON1: case DIMOFS_BUTTON2: