[quake3] Weird mouse problem on Edgy
Ben Noordhuis
bnoordhuis at gmail.com
Fri Dec 1 18:16:50 EST 2006
On 11/18/06, Thilo Schulz <arny at ats.s.bawue.de> wrote:
> Yes I have had this problem too, though it seemed to appear after an update of
> my x libraries.
Probably not xlib but SDL since this bug only manifests itself when
compiling with sdl_glimp.c. Attached is a patch for ioquake3 that
works around it.
-------------- next part --------------
--- code/unix/sdl_glimp.c 2006-12-02 00:07:07.000000000 +0100
+++ code/unix/sdl_glimp.c.new 2006-12-02 00:06:48.000000000 +0100
@@ -1371,6 +1371,8 @@
}
void IN_Frame (void) {
+ // 061201 mis -- workaround for SDL mouse locking bug.
+ static qboolean consoleDown = qfalse;
// bk001130 - from cvs 1.17 (mkv)
IN_JoyMove(); // FIXME: disable if on desktop?
@@ -1384,10 +1386,19 @@
&& strcmp( Cvar_VariableString("r_glDriver"), _3DFX_DRIVER_NAME ) )
{
IN_DeactivateMouse ();
+ consoleDown = qtrue;
return;
}
}
+ if (consoleDown) {
+ // warp mouse, don't grab it until the next frame
+ SDL_WarpMouse(screen->w / 2, screen->h / 2);
+ IN_DeactivateMouse();
+ consoleDown = qfalse;
+ return;
+ }
+
IN_ActivateMouse();
}
More information about the quake3
mailing list