mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 07:12:07 +00:00
caedes Patch für freie Auflösungswahl. Läuft noch nicht.
This commit is contained in:
parent
6c689a2f3f
commit
cea384c8f5
3 changed files with 24 additions and 3 deletions
|
@ -106,6 +106,10 @@ cvar_t *gl_lightmap;
|
||||||
cvar_t *gl_shadows;
|
cvar_t *gl_shadows;
|
||||||
cvar_t * gl_stencilshadow;
|
cvar_t * gl_stencilshadow;
|
||||||
cvar_t *gl_mode;
|
cvar_t *gl_mode;
|
||||||
|
|
||||||
|
cvar_t *gl_customwidth;
|
||||||
|
cvar_t *gl_customheight;
|
||||||
|
|
||||||
cvar_t *gl_dynamic;
|
cvar_t *gl_dynamic;
|
||||||
cvar_t *gl_monolightmap;
|
cvar_t *gl_monolightmap;
|
||||||
cvar_t *gl_modulate;
|
cvar_t *gl_modulate;
|
||||||
|
@ -958,6 +962,9 @@ void R_Register( void )
|
||||||
vid_fullscreen = ri.Cvar_Get( "vid_fullscreen", "0", CVAR_ARCHIVE );
|
vid_fullscreen = ri.Cvar_Get( "vid_fullscreen", "0", CVAR_ARCHIVE );
|
||||||
vid_gamma = ri.Cvar_Get( "vid_gamma", "1.0", CVAR_ARCHIVE );
|
vid_gamma = ri.Cvar_Get( "vid_gamma", "1.0", CVAR_ARCHIVE );
|
||||||
vid_ref = ri.Cvar_Get( "vid_ref", "soft", CVAR_ARCHIVE );
|
vid_ref = ri.Cvar_Get( "vid_ref", "soft", CVAR_ARCHIVE );
|
||||||
|
|
||||||
|
gl_customwidth = ri.Cvar_Get ("gl_customwidth", "1024", CVAR_ARCHIVE);
|
||||||
|
gl_customheight = ri.Cvar_Get ("gl_customheight", "768", CVAR_ARCHIVE);
|
||||||
|
|
||||||
ri.Cmd_AddCommand( "imagelist", GL_ImageList_f );
|
ri.Cmd_AddCommand( "imagelist", GL_ImageList_f );
|
||||||
ri.Cmd_AddCommand( "screenshot", GL_ScreenShot_f );
|
ri.Cmd_AddCommand( "screenshot", GL_ScreenShot_f );
|
||||||
|
@ -979,10 +986,18 @@ qboolean R_SetMode (void)
|
||||||
|
|
||||||
vid_fullscreen->modified = false;
|
vid_fullscreen->modified = false;
|
||||||
gl_mode->modified = false;
|
gl_mode->modified = false;
|
||||||
|
|
||||||
|
// a bit hackish approach to enable custom resolutions:
|
||||||
|
// Glimp_SetMode needs these values set for mode -1
|
||||||
|
vid.width = gl_customwidth->value;
|
||||||
|
vid.height = gl_customheight->value;
|
||||||
|
|
||||||
if ( ( err = GLimp_SetMode( &vid.width, &vid.height, gl_mode->value, fullscreen ) ) == rserr_ok )
|
if ( ( err = GLimp_SetMode( &vid.width, &vid.height, gl_mode->value, fullscreen ) ) == rserr_ok )
|
||||||
{
|
{
|
||||||
gl_state.prev_mode = gl_mode->value;
|
if(gl_mode->value == -1)
|
||||||
|
gl_state.prev_mode = 3; // safe default for custom mode
|
||||||
|
else
|
||||||
|
gl_state.prev_mode = gl_mode->value;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -195,6 +195,10 @@ extern cvar_t *gl_particle_att_c;
|
||||||
extern cvar_t *gl_nosubimage;
|
extern cvar_t *gl_nosubimage;
|
||||||
extern cvar_t *gl_bitdepth;
|
extern cvar_t *gl_bitdepth;
|
||||||
extern cvar_t *gl_mode;
|
extern cvar_t *gl_mode;
|
||||||
|
|
||||||
|
extern cvar_t *gl_customwidth;
|
||||||
|
extern cvar_t *gl_customheight;
|
||||||
|
|
||||||
extern cvar_t *gl_log;
|
extern cvar_t *gl_log;
|
||||||
extern cvar_t *gl_lightmap;
|
extern cvar_t *gl_lightmap;
|
||||||
extern cvar_t *gl_shadows;
|
extern cvar_t *gl_shadows;
|
||||||
|
|
|
@ -419,8 +419,10 @@ void GLimp_EndFrame (void)
|
||||||
int GLimp_SetMode( int *pwidth, int *pheight, int mode, qboolean fullscreen )
|
int GLimp_SetMode( int *pwidth, int *pheight, int mode, qboolean fullscreen )
|
||||||
{
|
{
|
||||||
ri.Con_Printf (PRINT_ALL, "setting mode %d:", mode );
|
ri.Con_Printf (PRINT_ALL, "setting mode %d:", mode );
|
||||||
|
|
||||||
if ( !ri.Vid_GetModeInfo( pwidth, pheight, mode ) )
|
// mode -1 is not in the vid mode table - so we keep the values in pwidth
|
||||||
|
// and pheight and don't even try to look up the mode info
|
||||||
|
if ( mode != -1 && !ri.Vid_GetModeInfo( pwidth, pheight, mode ) )
|
||||||
{
|
{
|
||||||
ri.Con_Printf( PRINT_ALL, " invalid mode\n" );
|
ri.Con_Printf( PRINT_ALL, " invalid mode\n" );
|
||||||
return rserr_invalid_mode;
|
return rserr_invalid_mode;
|
||||||
|
|
Loading…
Reference in a new issue