mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-12 16:18:01 +00:00
engine: client: add definitions for borderless fullscreen mode
This commit is contained in:
parent
cb19fa2f6d
commit
1e43cb734b
@ -554,16 +554,12 @@ static void SetWidthAndHeightFromCommandLine( void )
|
||||
|
||||
static void SetFullscreenModeFromCommandLine( void )
|
||||
{
|
||||
#if !XASH_MOBILE_PLATFORM
|
||||
if( Sys_CheckParm( "-fullscreen" ))
|
||||
{
|
||||
if( Sys_CheckParm( "-borderless" ))
|
||||
Cvar_DirectSet( &vid_fullscreen, "2" );
|
||||
else if( Sys_CheckParm( "-fullscreen" ))
|
||||
Cvar_DirectSet( &vid_fullscreen, "1" );
|
||||
}
|
||||
else if( Sys_CheckParm( "-windowed" ))
|
||||
{
|
||||
Cvar_DirectSet( &vid_fullscreen, "0" );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void R_CollectRendererNames( void )
|
||||
|
@ -30,7 +30,7 @@ static CVAR_DEFINE_AUTO( vid_scale, "1.0", FCVAR_RENDERINFO|FCVAR_VIDRESTART, "p
|
||||
|
||||
CVAR_DEFINE_AUTO( vid_highdpi, "1", FCVAR_RENDERINFO|FCVAR_VIDRESTART, "enable High-DPI mode" );
|
||||
CVAR_DEFINE_AUTO( vid_maximized, "0", FCVAR_RENDERINFO, "window maximized state, read-only" );
|
||||
CVAR_DEFINE( vid_fullscreen, "fullscreen", "0", FCVAR_RENDERINFO|FCVAR_VIDRESTART, "enable fullscren mode" );
|
||||
CVAR_DEFINE( vid_fullscreen, "fullscreen", "0", FCVAR_RENDERINFO|FCVAR_VIDRESTART, "fullscreen state (0 windowed, 1 fullscreen, 2 borderless)" );
|
||||
CVAR_DEFINE( window_xpos, "_window_xpos", "-1", FCVAR_RENDERINFO, "window position by horizontal" );
|
||||
CVAR_DEFINE( window_ypos, "_window_ypos", "-1", FCVAR_RENDERINFO, "window position by vertical" );
|
||||
|
||||
@ -209,7 +209,7 @@ static void VID_Mode_f( void )
|
||||
return;
|
||||
}
|
||||
|
||||
R_ChangeDisplaySettings( w, h, !!vid_fullscreen.value );
|
||||
R_ChangeDisplaySettings( w, h, bound( 0, vid_fullscreen.value, WINDOW_MODE_COUNT - 1 ));
|
||||
}
|
||||
|
||||
void VID_Init( void )
|
||||
|
@ -9,6 +9,13 @@ typedef struct vidmode_s
|
||||
int height;
|
||||
} vidmode_t;
|
||||
|
||||
typedef enum window_mode_e
|
||||
{
|
||||
WINDOW_MODE_WINDOWED = 0,
|
||||
WINDOW_MODE_FULLSCREEN,
|
||||
WINDOW_MODE_BORDERLESS,
|
||||
WINDOW_MODE_COUNT,
|
||||
} window_mode_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@ -21,8 +28,6 @@ typedef struct
|
||||
qboolean initialized; // OpenGL subsystem started
|
||||
qboolean extended; // extended context allows to GL_Debug
|
||||
qboolean software;
|
||||
|
||||
|
||||
} glwstate_t;
|
||||
|
||||
extern glwstate_t glw_state;
|
||||
|
Loading…
Reference in New Issue
Block a user