mirror of
https://github.com/ioquake/ioq3.git
synced 2025-06-02 01:42:12 +00:00
Modular rendering system. Patch by use.less01
This might break MSVC builds. I'll take care of it later
This commit is contained in:
parent
8ab958fab9
commit
40dfcee06e
24 changed files with 335 additions and 186 deletions
|
@ -464,7 +464,7 @@ static void IN_ActivateMouse( void )
|
|||
}
|
||||
|
||||
// in_nograb makes no sense in fullscreen mode
|
||||
if( !r_fullscreen->integer )
|
||||
if( !Cvar_VariableIntegerValue("r_fullscreen") )
|
||||
{
|
||||
if( in_nograb->modified || !mouseActive )
|
||||
{
|
||||
|
@ -492,7 +492,7 @@ static void IN_DeactivateMouse( void )
|
|||
|
||||
// Always show the cursor when the mouse is disabled,
|
||||
// but not when fullscreen
|
||||
if( !r_fullscreen->integer )
|
||||
if( !Cvar_VariableIntegerValue("r_fullscreen") )
|
||||
SDL_ShowCursor( 1 );
|
||||
|
||||
if( !mouseAvailable )
|
||||
|
@ -525,7 +525,7 @@ static void IN_DeactivateMouse( void )
|
|||
|
||||
// Don't warp the mouse unless the cursor is within the window
|
||||
if( SDL_GetAppState( ) & SDL_APPMOUSEFOCUS )
|
||||
SDL_WarpMouse( glConfig.vidWidth / 2, glConfig.vidHeight / 2 );
|
||||
SDL_WarpMouse( cls.glconfig.vidWidth / 2, cls.glconfig.vidHeight / 2 );
|
||||
|
||||
mouseActive = qfalse;
|
||||
}
|
||||
|
@ -936,9 +936,9 @@ static void IN_ProcessEvents( void )
|
|||
char width[32], height[32];
|
||||
Com_sprintf( width, sizeof(width), "%d", e.resize.w );
|
||||
Com_sprintf( height, sizeof(height), "%d", e.resize.h );
|
||||
ri.Cvar_Set( "r_customwidth", width );
|
||||
ri.Cvar_Set( "r_customheight", height );
|
||||
ri.Cvar_Set( "r_mode", "-1" );
|
||||
Cvar_Set( "r_customwidth", width );
|
||||
Cvar_Set( "r_customheight", height );
|
||||
Cvar_Set( "r_mode", "-1" );
|
||||
/* wait until user stops dragging for 1 second, so
|
||||
we aren't constantly recreating the GL context while
|
||||
he tries to drag...*/
|
||||
|
@ -975,12 +975,12 @@ void IN_Frame( void )
|
|||
// If not DISCONNECTED (main menu) or ACTIVE (in game), we're loading
|
||||
loading = !!( clc.state != CA_DISCONNECTED && clc.state != CA_ACTIVE );
|
||||
|
||||
if( !r_fullscreen->integer && ( Key_GetCatcher( ) & KEYCATCH_CONSOLE ) )
|
||||
if( !Cvar_VariableIntegerValue("r_fullscreen") && ( Key_GetCatcher( ) & KEYCATCH_CONSOLE ) )
|
||||
{
|
||||
// Console is down in windowed mode
|
||||
IN_DeactivateMouse( );
|
||||
}
|
||||
else if( !r_fullscreen->integer && loading )
|
||||
else if( !Cvar_VariableIntegerValue("r_fullscreen") && loading )
|
||||
{
|
||||
// Loading in windowed mode
|
||||
IN_DeactivateMouse( );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue