mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-12-20 09:51:29 +00:00
Replace F10's near-useless game quit option with a renderer toggle.
This commit is contained in:
parent
0cfc75070d
commit
5fdc0b889b
1 changed files with 13 additions and 3 deletions
16
src/m_menu.c
16
src/m_menu.c
|
@ -1341,7 +1341,7 @@ static menuitem_t OP_VideoOptionsMenu[] =
|
||||||
#endif
|
#endif
|
||||||
{IT_STRING | IT_CVAR, NULL, "Vertical Sync", &cv_vidwait, 16},
|
{IT_STRING | IT_CVAR, NULL, "Vertical Sync", &cv_vidwait, 16},
|
||||||
#ifdef HWRENDER
|
#ifdef HWRENDER
|
||||||
{IT_STRING | IT_CVAR, NULL, "Renderer", &cv_renderer, 21},
|
{IT_STRING | IT_CVAR, NULL, "Renderer (F10)", &cv_renderer, 21},
|
||||||
#else
|
#else
|
||||||
{IT_TRANSTEXT | IT_PAIR, "Renderer", "Software", &cv_renderer, 21},
|
{IT_TRANSTEXT | IT_PAIR, "Renderer", "Software", &cv_renderer, 21},
|
||||||
#endif
|
#endif
|
||||||
|
@ -3395,8 +3395,11 @@ boolean M_Responder(event_t *ev)
|
||||||
// Screenshots on F8 now handled elsewhere
|
// Screenshots on F8 now handled elsewhere
|
||||||
// Same with Moviemode on F9
|
// Same with Moviemode on F9
|
||||||
|
|
||||||
case KEY_F10: // Quit SRB2
|
case KEY_F10: // Renderer toggle, also processed inside menus
|
||||||
M_QuitSRB2(0);
|
if (cv_renderer.value == render_soft)
|
||||||
|
CV_SetValue(&cv_renderer, render_opengl);
|
||||||
|
else if (cv_renderer.value == render_opengl)
|
||||||
|
CV_SetValue(&cv_renderer, render_soft);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case KEY_F11: // Fullscreen toggle, also processed inside menus
|
case KEY_F11: // Fullscreen toggle, also processed inside menus
|
||||||
|
@ -3579,6 +3582,13 @@ boolean M_Responder(event_t *ev)
|
||||||
// M_SetupNextMenu(currentMenu->prevMenu);
|
// M_SetupNextMenu(currentMenu->prevMenu);
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
case KEY_F10: // Renderer toggle, also processed outside menus
|
||||||
|
if (cv_renderer.value == render_soft)
|
||||||
|
CV_SetValue(&cv_renderer, render_opengl);
|
||||||
|
else if (cv_renderer.value == render_opengl)
|
||||||
|
CV_SetValue(&cv_renderer, render_soft);
|
||||||
|
return true;
|
||||||
|
|
||||||
case KEY_F11: // Fullscreen toggle, also processed outside menus
|
case KEY_F11: // Fullscreen toggle, also processed outside menus
|
||||||
CV_SetValue(&cv_fullscreen, !cv_fullscreen.value);
|
CV_SetValue(&cv_fullscreen, !cv_fullscreen.value);
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue