diff --git a/README b/README index 0ff5dffa..a8636f9f 100644 --- a/README +++ b/README @@ -252,7 +252,7 @@ How do I record a demo? When playing in window mode my is locked onto the window. Can I change that, e.g. that Quake II is behaving like a normal window? - - Set "_windowed_mouse" to 0. + - Open the console with pressing ~ or ^ Hey, the game renders unplayable slow but my OpenGL is working?! - If you're using Mesa 7.0, 7.1, 7.2 or 7.3 thats a known bug of diff --git a/src/client/cl_scrn.c b/src/client/cl_scrn.c index d9af60e1..4f0d2bc7 100644 --- a/src/client/cl_scrn.c +++ b/src/client/cl_scrn.c @@ -502,6 +502,7 @@ void SCR_RunConsole (void) if (scr_conlines < scr_con_current) { + Cvar_SetValue("_windowed_mouse", 1); scr_con_current -= scr_conspeed->value*cls.frametime; if (scr_conlines > scr_con_current) scr_con_current = scr_conlines; @@ -509,6 +510,7 @@ void SCR_RunConsole (void) } else if (scr_conlines > scr_con_current) { + Cvar_SetValue("_windowed_mouse", 0); scr_con_current += scr_conspeed->value*cls.frametime; if (scr_conlines < scr_con_current) scr_con_current = scr_conlines; diff --git a/src/client/console/console.c b/src/client/console/console.c index d90878c0..6395a645 100644 --- a/src/client/console/console.c +++ b/src/client/console/console.c @@ -71,12 +71,14 @@ void Con_ToggleConsole_f (void) if (cl.attractloop) { + Cvar_SetValue("_windowed_mouse", 0); Cbuf_AddText("killserver\n"); return; } if (cls.state == ca_disconnected) { // start the demo loop again + Cvar_SetValue("_windowed_mouse", 1); Cbuf_AddText ("d1\n"); return; } diff --git a/src/posix/vid/menu.c b/src/posix/vid/menu.c index b1845905..ac252515 100644 --- a/src/posix/vid/menu.c +++ b/src/posix/vid/menu.c @@ -260,7 +260,7 @@ void VID_MenuInit( void ) sw_stipplealpha = Cvar_Get( "sw_stipplealpha", "0", CVAR_ARCHIVE ); if ( !_windowed_mouse) - _windowed_mouse = Cvar_Get( "_windowed_mouse", "0", CVAR_ARCHIVE ); + _windowed_mouse = Cvar_Get( "_windowed_mouse", "1", 0 ); s_mode_list[SOFTWARE_MENU].curvalue = sw_mode->value; s_mode_list[OPENGL_MENU].curvalue = gl_mode->value; diff --git a/src/sdl/refresh.c b/src/sdl/refresh.c index eb4e61cb..1bff9476 100644 --- a/src/sdl/refresh.c +++ b/src/sdl/refresh.c @@ -69,7 +69,7 @@ static float old_windowed_mouse; static cvar_t *_windowed_mouse; void RW_IN_PlatformInit() { - _windowed_mouse = ri.Cvar_Get ("_windowed_mouse", "1", CVAR_ARCHIVE); + _windowed_mouse = ri.Cvar_Get ("_windowed_mouse", "1", 0); } void RW_IN_Activate(qboolean active) diff --git a/src/server/sv_init.c b/src/server/sv_init.c index f0aed7d7..ec13e6fd 100644 --- a/src/server/sv_init.c +++ b/src/server/sv_init.c @@ -278,6 +278,7 @@ void SV_SpawnServer (char *server, char *spawnpoint, server_state_t serverstate, // set serverinfo variable Cvar_FullSet ("mapname", sv.name, CVAR_SERVERINFO | CVAR_NOSET); +Cvar_SetValue("_windowed_mouse", 1); Com_Printf ("-------------------------------------\n"); }