mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-04-11 12:40:45 +00:00
Menüsupport für caedes r_mode -1
This commit is contained in:
parent
f6f5fd88a4
commit
7f20626edb
2 changed files with 26 additions and 12 deletions
|
@ -65,6 +65,7 @@ MENU INTERACTION
|
|||
*/
|
||||
#define SOFTWARE_MENU 0
|
||||
#define OPENGL_MENU 1
|
||||
#define CUSTOM_MODE 20
|
||||
|
||||
static menuframework_s s_software_menu;
|
||||
static menuframework_s s_opengl_menu;
|
||||
|
@ -154,9 +155,19 @@ static void ApplyChanges( void *unused )
|
|||
Cvar_SetValue( "gl_picmip", 3 - s_tq_slider.curvalue );
|
||||
Cvar_SetValue( "vid_fullscreen", s_fs_box[s_current_menu_index].curvalue );
|
||||
Cvar_SetValue( "gl_ext_palettedtexture", s_paletted_texture_box.curvalue );
|
||||
Cvar_SetValue( "sw_mode", s_mode_list[SOFTWARE_MENU].curvalue );
|
||||
Cvar_SetValue( "gl_mode", s_mode_list[OPENGL_MENU].curvalue );
|
||||
Cvar_SetValue( "_windowed_mouse", s_windowed_mouse.curvalue);
|
||||
|
||||
/* custom mode */
|
||||
if (s_mode_list[OPENGL_MENU].curvalue != CUSTOM_MODE)
|
||||
{
|
||||
printf("DEBUG: %i\n", s_mode_list[OPENGL_MENU].curvalue);
|
||||
Cvar_SetValue( "sw_mode", s_mode_list[SOFTWARE_MENU].curvalue );
|
||||
Cvar_SetValue( "gl_mode", s_mode_list[OPENGL_MENU].curvalue );
|
||||
}
|
||||
else
|
||||
{
|
||||
Cvar_SetValue( "sw_mode", -1 );
|
||||
Cvar_SetValue( "gl_mode", -1 );
|
||||
}
|
||||
|
||||
/*
|
||||
** must use an if here (instead of a switch), since the REF_'s are now variables
|
||||
|
@ -204,6 +215,7 @@ void VID_MenuInit( void )
|
|||
"[1280 800 ]",
|
||||
"[1680 1050]",
|
||||
"[1920 1200]",
|
||||
"[Custom ]",
|
||||
0
|
||||
};
|
||||
static const char *yesno_names[] =
|
||||
|
@ -262,8 +274,17 @@ void VID_MenuInit( void )
|
|||
if ( !_windowed_mouse)
|
||||
_windowed_mouse = Cvar_Get( "_windowed_mouse", "1", CVAR_ARCHIVE );
|
||||
|
||||
s_mode_list[SOFTWARE_MENU].curvalue = sw_mode->value;
|
||||
s_mode_list[OPENGL_MENU].curvalue = gl_mode->value;
|
||||
/* custom mode */
|
||||
if (gl_mode->value >= 1.0)
|
||||
{
|
||||
s_mode_list[SOFTWARE_MENU].curvalue = sw_mode->value;
|
||||
s_mode_list[OPENGL_MENU].curvalue = gl_mode->value;
|
||||
}
|
||||
else
|
||||
{
|
||||
s_mode_list[SOFTWARE_MENU].curvalue = CUSTOM_MODE;
|
||||
s_mode_list[OPENGL_MENU].curvalue = CUSTOM_MODE;
|
||||
}
|
||||
|
||||
if ( !scr_viewsize )
|
||||
scr_viewsize = Cvar_Get ("viewsize", "100", CVAR_ARCHIVE);
|
||||
|
|
|
@ -964,13 +964,6 @@ void R_Register( void )
|
|||
vid_ref = ri.Cvar_Get( "vid_ref", "soft", CVAR_ARCHIVE );
|
||||
|
||||
gl_customwidth = ri.Cvar_Get ("gl_customwidth", "1024", CVAR_ARCHIVE);
|
||||
:q
|
||||
|
||||
|
||||
|
||||
:q
|
||||
q
|
||||
sa
|
||||
gl_customheight = ri.Cvar_Get ("gl_customheight", "768", CVAR_ARCHIVE);
|
||||
|
||||
ri.Cmd_AddCommand( "imagelist", GL_ImageList_f );
|
||||
|
|
Loading…
Reference in a new issue