mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-17 23:21:22 +00:00
Don't let the user switch to OpenGL if NOHW
This commit is contained in:
parent
36c5bb7b0d
commit
e8db39229c
1 changed files with 11 additions and 2 deletions
13
src/screen.c
13
src/screen.c
|
@ -64,7 +64,13 @@ consvar_t cv_scr_depth = {"scr_depth", "16 bits", CV_SAVE, scr_depth_cons_t, NUL
|
|||
consvar_t cv_renderview = {"renderview", "On", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
static void SCR_ActuallyChangeRenderer(void);
|
||||
CV_PossibleValue_t cv_renderer_t[] = {{1, "Software"}, {2, "OpenGL"}, {0, NULL}};
|
||||
CV_PossibleValue_t cv_renderer_t[] = {
|
||||
{1, "Software"},
|
||||
#ifdef HWRENDER
|
||||
{2, "OpenGL"},
|
||||
#endif
|
||||
{0, NULL}
|
||||
};
|
||||
consvar_t cv_renderer = {"renderer", "Software", CV_SAVE|CV_NOLUA|CV_CALL, cv_renderer_t, SCR_ChangeRenderer, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
static void SCR_ChangeFullscreen(void);
|
||||
|
@ -454,9 +460,12 @@ void SCR_ChangeRenderer(void)
|
|||
if (con_startup)
|
||||
{
|
||||
target_renderer = cv_renderer.value;
|
||||
#ifdef HWRENDER
|
||||
if (M_CheckParm("-opengl"))
|
||||
target_renderer = rendermode = render_opengl;
|
||||
else if (M_CheckParm("-software"))
|
||||
else
|
||||
#endif
|
||||
if (M_CheckParm("-software"))
|
||||
target_renderer = rendermode = render_soft;
|
||||
// set cv_renderer back
|
||||
SCR_ChangeRendererCVars(rendermode);
|
||||
|
|
Loading…
Reference in a new issue