Mouse wheel fix patch.
authorSam Lantinga <slouken@libsdl.org>
Mon, 08 Apr 2002 17:50:30 +0000
changeset 3323d6dd1b7b7ba
parent 331 e9278438fb3b
child 333 f2ba51f64d49
Mouse wheel fix patch.
src/video/wincommon/SDL_sysevents.c
src/video/windx5/SDL_dx5events.c
     1.1 --- a/src/video/wincommon/SDL_sysevents.c	Thu Apr 04 18:06:33 2002 +0000
     1.2 +++ b/src/video/wincommon/SDL_sysevents.c	Mon Apr 08 17:50:30 2002 +0000
     1.3 @@ -370,6 +370,8 @@
     1.4  						button = 5;
     1.5  					posted = SDL_PrivateMouseButton(
     1.6  						SDL_PRESSED, button, 0, 0);
     1.7 +					posted |= SDL_PrivateMouseButton(
     1.8 +						SDL_RELEASED, button, 0, 0);
     1.9  				}
    1.10  			}
    1.11  			return(0);
     2.1 --- a/src/video/windx5/SDL_dx5events.c	Thu Apr 04 18:06:33 2002 +0000
     2.2 +++ b/src/video/windx5/SDL_dx5events.c	Mon Apr 08 17:50:30 2002 +0000
     2.3 @@ -392,11 +392,13 @@
     2.4  					yrel = 0;
     2.5  				}
     2.6  				if((int)ptrbuf[i].dwData > 0)
     2.7 +					button = 4;
     2.8 +				else
     2.9 +					button = 5;
    2.10  					posted = SDL_PrivateMouseButton(
    2.11 -							SDL_PRESSED, 4, 0, 0);
    2.12 -				else if((int)ptrbuf[i].dwData < 0)
    2.13 -					posted = SDL_PrivateMouseButton(
    2.14 -							SDL_PRESSED, 5, 0, 0);
    2.15 +						SDL_PRESSED, button, 0, 0);
    2.16 +				posted |= SDL_PrivateMouseButton(
    2.17 +						SDL_RELEASED, button, 0, 0);
    2.18  				break;
    2.19  			case DIMOFS_BUTTON0:
    2.20  			case DIMOFS_BUTTON1: