diff src/video/windx5/SDL_dx5events.c @ 332:3d6dd1b7b7ba

Mouse wheel fix patch.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 08 Apr 2002 17:50:30 +0000
parents 13fc64213765
children a6fa62b1be09
line wrap: on
line diff
--- a/src/video/windx5/SDL_dx5events.c	Thu Apr 04 18:06:33 2002 +0000
+++ b/src/video/windx5/SDL_dx5events.c	Mon Apr 08 17:50:30 2002 +0000
@@ -392,11 +392,13 @@
 					yrel = 0;
 				}
 				if((int)ptrbuf[i].dwData > 0)
+					button = 4;
+				else
+					button = 5;
 					posted = SDL_PrivateMouseButton(
-							SDL_PRESSED, 4, 0, 0);
-				else if((int)ptrbuf[i].dwData < 0)
-					posted = SDL_PrivateMouseButton(
-							SDL_PRESSED, 5, 0, 0);
+						SDL_PRESSED, button, 0, 0);
+				posted |= SDL_PrivateMouseButton(
+						SDL_RELEASED, button, 0, 0);
 				break;
 			case DIMOFS_BUTTON0:
 			case DIMOFS_BUTTON1: