mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
Make the menu option for renderer switching transparent under NOHW
This commit is contained in:
parent
38492073fa
commit
7af2533d23
4 changed files with 16 additions and 0 deletions
|
@ -842,7 +842,9 @@ void D_RegisterClientCommands(void)
|
||||||
CV_RegisterVar(&cv_fullscreen);
|
CV_RegisterVar(&cv_fullscreen);
|
||||||
CV_RegisterVar(&cv_renderview);
|
CV_RegisterVar(&cv_renderview);
|
||||||
CV_RegisterVar(&cv_renderer);
|
CV_RegisterVar(&cv_renderer);
|
||||||
|
#ifdef HWRENDER
|
||||||
CV_RegisterVar(&cv_newrenderer);
|
CV_RegisterVar(&cv_newrenderer);
|
||||||
|
#endif
|
||||||
CV_RegisterVar(&cv_scr_depth);
|
CV_RegisterVar(&cv_scr_depth);
|
||||||
CV_RegisterVar(&cv_scr_width);
|
CV_RegisterVar(&cv_scr_width);
|
||||||
CV_RegisterVar(&cv_scr_height);
|
CV_RegisterVar(&cv_scr_height);
|
||||||
|
|
10
src/m_menu.c
10
src/m_menu.c
|
@ -389,7 +389,9 @@ static void M_ResetCvars(void);
|
||||||
|
|
||||||
// Consvar onchange functions
|
// Consvar onchange functions
|
||||||
static void Newgametype_OnChange(void);
|
static void Newgametype_OnChange(void);
|
||||||
|
#ifdef HWRENDER
|
||||||
static void Newrenderer_OnChange(void);
|
static void Newrenderer_OnChange(void);
|
||||||
|
#endif
|
||||||
static void Dummymares_OnChange(void);
|
static void Dummymares_OnChange(void);
|
||||||
|
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
|
@ -414,8 +416,10 @@ CV_PossibleValue_t gametype_cons_t[NUMGAMETYPES+1];
|
||||||
|
|
||||||
consvar_t cv_newgametype = {"newgametype", "Co-op", CV_HIDEN|CV_CALL, gametype_cons_t, Newgametype_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_newgametype = {"newgametype", "Co-op", CV_HIDEN|CV_CALL, gametype_cons_t, Newgametype_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
|
#ifdef HWRENDER
|
||||||
consvar_t cv_newrenderer = {"newrenderer", "Software", CV_HIDEN|CV_CALL, cv_renderer_t, Newrenderer_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_newrenderer = {"newrenderer", "Software", CV_HIDEN|CV_CALL, cv_renderer_t, Newrenderer_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||||
static int newrenderer_set = 1;/* Software doesn't need confirmation! */
|
static int newrenderer_set = 1;/* Software doesn't need confirmation! */
|
||||||
|
#endif
|
||||||
|
|
||||||
static CV_PossibleValue_t serversort_cons_t[] = {
|
static CV_PossibleValue_t serversort_cons_t[] = {
|
||||||
{0,"Ping"},
|
{0,"Ping"},
|
||||||
|
@ -1216,7 +1220,11 @@ static menuitem_t OP_VideoOptionsMenu[] =
|
||||||
{IT_STRING|IT_CVAR, NULL, "Fullscreen", &cv_fullscreen, 11},
|
{IT_STRING|IT_CVAR, NULL, "Fullscreen", &cv_fullscreen, 11},
|
||||||
#endif
|
#endif
|
||||||
{IT_STRING | IT_CVAR, NULL, "Vertical Sync", &cv_vidwait, 16},
|
{IT_STRING | IT_CVAR, NULL, "Vertical Sync", &cv_vidwait, 16},
|
||||||
|
#ifdef HWRENDER
|
||||||
{IT_STRING | IT_CVAR, NULL, "Renderer", &cv_newrenderer, 21},
|
{IT_STRING | IT_CVAR, NULL, "Renderer", &cv_newrenderer, 21},
|
||||||
|
#else
|
||||||
|
{IT_TRANSTEXT | IT_PAIR, "Renderer", "Software", &cv_renderer, 21},
|
||||||
|
#endif
|
||||||
|
|
||||||
{IT_HEADER, NULL, "Color Profile", NULL, 30},
|
{IT_HEADER, NULL, "Color Profile", NULL, 30},
|
||||||
{IT_STRING | IT_CVAR | IT_CV_SLIDER, NULL, "Brightness (F11)", &cv_globalgamma,36},
|
{IT_STRING | IT_CVAR | IT_CV_SLIDER, NULL, "Brightness (F11)", &cv_globalgamma,36},
|
||||||
|
@ -2229,6 +2237,7 @@ static void Newgametype_OnChange(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HWRENDER
|
||||||
static void Newrenderer_AREYOUSURE(INT32 c)
|
static void Newrenderer_AREYOUSURE(INT32 c)
|
||||||
{
|
{
|
||||||
int n;
|
int n;
|
||||||
|
@ -2266,6 +2275,7 @@ static void Newrenderer_OnChange(void)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif/*HWRENDER*/
|
||||||
|
|
||||||
void Screenshot_option_Onchange(void)
|
void Screenshot_option_Onchange(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -486,7 +486,9 @@ void SCR_ChangeRendererCVars(INT32 mode)
|
||||||
CV_StealthSetValue(&cv_renderer, 1);
|
CV_StealthSetValue(&cv_renderer, 1);
|
||||||
else if (mode == render_opengl)
|
else if (mode == render_opengl)
|
||||||
CV_StealthSetValue(&cv_renderer, 2);
|
CV_StealthSetValue(&cv_renderer, 2);
|
||||||
|
#ifdef HWRENDER
|
||||||
CV_StealthSetValue(&cv_newrenderer, cv_renderer.value);
|
CV_StealthSetValue(&cv_newrenderer, cv_renderer.value);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean SCR_IsAspectCorrect(INT32 width, INT32 height)
|
boolean SCR_IsAspectCorrect(INT32 width, INT32 height)
|
||||||
|
|
|
@ -184,7 +184,9 @@ extern UINT8 *scr_borderpatch; // patch used to fill the view borders
|
||||||
extern CV_PossibleValue_t cv_renderer_t[];
|
extern CV_PossibleValue_t cv_renderer_t[];
|
||||||
|
|
||||||
extern consvar_t cv_scr_width, cv_scr_height, cv_scr_depth, cv_renderview, cv_renderer, cv_fullscreen;
|
extern consvar_t cv_scr_width, cv_scr_height, cv_scr_depth, cv_renderview, cv_renderer, cv_fullscreen;
|
||||||
|
#ifdef HWRENDER
|
||||||
extern consvar_t cv_newrenderer;
|
extern consvar_t cv_newrenderer;
|
||||||
|
#endif
|
||||||
// wait for page flipping to end or not
|
// wait for page flipping to end or not
|
||||||
extern consvar_t cv_vidwait;
|
extern consvar_t cv_vidwait;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue