mirror of
https://github.com/ioquake/ioq3.git
synced 2025-06-02 01:42:12 +00:00
* 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:
parent
4ceb51e6ba
commit
0124371c01
7 changed files with 39 additions and 53 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue