cl_main:CL_UpdateWindowedMouse() optimization.

This commit is contained in:
svdijk 2012-11-15 08:38:28 +01:00 committed by Yamagi Burmeister
parent a76d7d5cfb
commit 561add00a8

View file

@ -700,11 +700,17 @@ CL_UpdateWindowedMouse(void)
if (cls.key_dest == key_menu || cls.key_dest == key_console ||
(cls.key_dest == key_game && (cls.state != ca_active || !cl.refresh_prepped)))
{
Cvar_SetValue("windowed_mouse", 0);
if (windowed_mouse->value)
{
Cvar_SetValue("windowed_mouse", 0);
}
}
else
{
Cvar_SetValue("windowed_mouse", 1);
if (!windowed_mouse->value)
{
Cvar_SetValue("windowed_mouse", 1);
}
}
}