changeset 3930:79a4c9017550 SDL-1.2

Fixed buggy SDL_VIDEO_X11_MOUSEACCEL behaviour...correctly free buffer, and only call XChangePointerControl() if we have valid arguments. Fixes Bugzilla #417.
author Ryan C. Gordon <icculus@icculus.org>
date Wed, 04 Apr 2007 09:15:39 +0000
parents 56ec4d962487
children d65b4a73c991
files src/video/x11/SDL_x11mouse.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/video/x11/SDL_x11mouse.c	Sun Apr 01 03:27:45 2007 +0000
+++ b/src/video/x11/SDL_x11mouse.c	Wed Apr 04 09:15:39 2007 +0000
@@ -216,11 +216,11 @@
 			mouse_param = NULL;
 		}
 	}
-	if ( mouse_param_buf ) {
+	if ( i == 3 ) {
 		XChangePointerControl(SDL_Display, True, True,
 			accel_value[0], accel_value[1], accel_value[2]);
-		SDL_free(mouse_param_buf);
 	}
+	SDL_stack_free(mouse_param_buf);
 }
 
 /* Check to see if we need to enter or leave mouse relative mode */