To reproduce:
- compile IOQ3 against SDL
- start it in windowed mode
- open the console
- move the mouse outside the window
- close the console
The mouse is now locked to the horizontal plane and cannot be moved more than approximately 45 degrees in both directions. The cause is likely a bug in SDL or xlib. This patch works around it by warping the mouse to the center of the window before grabbing it again.
(In reply to comment #0)
> The mouse is now locked to the horizontal plane and cannot be moved more than
> approximately 45 degrees in both directions. The cause is likely a bug in SDL
> or xlib. This patch works around it by warping the mouse to the center of the
> window before grabbing it again.
This was an SDL bug, but it was recently fixed.
http://bugzilla.libsdl.org/show_bug.cgi?id=299
The fix will be in SDL 1.2.12, but it isn't in any official release packages yet (SDL 1.2.9 and earlier aren't affected, nor are non-X11 video targets).
Not sure if that changes anything, just wanted to document where this really went wrong.
--ryan.
I always suspected this was an SDL bug or at least something in the X stuff, because I saw some VNC client using SDL exhibiting the same behaviour.
In my opinion, ioquake3 should not work around this as the bug clearly lies somewhere else and will go away on its own eventually.
Setting a QA contact on all ioquake3 bugs, even resolved ones. Sorry if you get a flood of email from this, it should only happen once. Apologies for the incovenience.
--ryan.
Created attachment 1186 [details] And here is the patch.