* Use Sys_Sleep to limit FPS, which will save CPU

* Add com_maxfpsUnfocused and com_maxfpsMinimized; self explanatory
* Fix reopening of bug 3703, I hope
This commit is contained in:
Tim Angus 2008-07-21 22:02:54 +00:00
parent 4ceb51e6ba
commit 0124371c01
7 changed files with 39 additions and 53 deletions

View file

@ -348,7 +348,7 @@ static void IN_DeactivateMouse( void )
if( mouseActive )
{
SDL_WM_GrabInput( SDL_GRAB_OFF );
SDL_WarpMouse( glConfig.vidWidth >> 1, glConfig.vidHeight >> 1 );
SDL_WarpMouse( glConfig.vidWidth / 2, glConfig.vidHeight / 2 );
SDL_ShowCursor( 1 );
mouseActive = qfalse;
@ -716,15 +716,6 @@ static void IN_ProcessEvents( void )
}
break;
case SDL_ACTIVEEVENT:
if( e.active.state == SDL_APPINPUTFOCUS ) {
if( e.active.gain )
IN_ActivateMouse();
else
IN_DeactivateMouse();
}
break;
case SDL_QUIT:
Sys_Quit();
break;