Commit 31327331 authored by Ryan C. Gordon's avatar Ryan C. Gordon

Fixed buggy SDL_VIDEO_X11_MOUSEACCEL behaviour...correctly free buffer, and

 only call XChangePointerControl() if we have valid arguments.

  Fixes Bugzilla #417.

--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402295
parent 749c11c0
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment