Fixed mouse wheel motion position on Windows
authorSam Lantinga
Fri, 31 Aug 2001 21:21:24 +0000
changeset 1620a26c92c2385
parent 161 eb6b76a95f2d
child 163 2dc7252dc53e
Fixed mouse wheel motion position on Windows
src/video/wincommon/SDL_sysevents.c
     1.1 --- a/src/video/wincommon/SDL_sysevents.c	Fri Aug 31 21:08:30 2001 +0000
     1.2 +++ b/src/video/wincommon/SDL_sysevents.c	Fri Aug 31 21:21:24 2001 +0000
     1.3 @@ -335,24 +335,15 @@
     1.4  		case WM_MOUSEWHEEL: 
     1.5  			if ( SDL_VideoSurface && ! DINPUT_FULLSCREEN() ) {
     1.6  				Sint16 x, y;
     1.7 -				Uint8 button = 0;
     1.8  				int move = (short)HIWORD(wParam);
     1.9 -				if(move > 0)
    1.10 -					button = 4;
    1.11 -				else if(move < 0)
    1.12 -					button = 5;
    1.13 -				if(button)
    1.14 -				{
    1.15 -					if ( mouse_relative ) {
    1.16 -					/*	RJR: March 28, 2000
    1.17 -						report internal mouse position if in relative mode */
    1.18 -						x = 0; y = 0;
    1.19 -					} else {
    1.20 -						x = (Sint16)LOWORD(lParam);
    1.21 -						y = (Sint16)HIWORD(lParam);
    1.22 -					}
    1.23 +				if ( move ) {
    1.24 +					Uint8 button;
    1.25 +					if ( move > 0 )
    1.26 +						button = 4;
    1.27 +					else
    1.28 +						button = 5;
    1.29  					posted = SDL_PrivateMouseButton(
    1.30 -								SDL_PRESSED, button, x, y);
    1.31 +						SDL_PRESSED, button, 0, 0);
    1.32  				}
    1.33  			}
    1.34  			return(0);