summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan C. Gordon <icculus@icculus.org>2007-04-04 09:15:39 +0000
committerRyan C. Gordon <icculus@icculus.org>2007-04-04 09:15:39 +0000
commite97d9c5e30d6d94d021a54fbc7ebc34976e59e94 (patch)
treed0b8a8944390b8f7f7262e99799182376e403ee5
parent429e380a721b4c5a9c655d5b18af73925c399326 (diff)
downloadsdl-e97d9c5e30d6d94d021a54fbc7ebc34976e59e94.tar.gz
Fixed buggy SDL_VIDEO_X11_MOUSEACCEL behaviour...correctly free buffer, and
only call XChangePointerControl() if we have valid arguments. Fixes Bugzilla #417.
-rw-r--r--src/video/x11/SDL_x11mouse.c4
1 files 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 */