From bb31832c1156afdf882aea73fb45b2dff7c55a98 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Wed, 4 Apr 2007 09:15:39 +0000 Subject: [PATCH] Fixed buggy SDL_VIDEO_X11_MOUSEACCEL behaviour...correctly free buffer, and only call XChangePointerControl() if we have valid arguments. Fixes Bugzilla #417. --- src/video/x11/SDL_x11mouse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video/x11/SDL_x11mouse.c b/src/video/x11/SDL_x11mouse.c index c5c30a781..221032b82 100644 --- a/src/video/x11/SDL_x11mouse.c +++ b/src/video/x11/SDL_x11mouse.c @@ -216,11 +216,11 @@ static void SetMouseAccel(_THIS, const char *accel_param) 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 */