Turn F11 into a fullscreen toggle, and process it inside menus as well.

This commit is contained in:
spherallic 2022-01-31 14:39:51 +01:00
parent ff57a983d7
commit f5d4eb3e7a

View file

@ -1347,7 +1347,7 @@ static menuitem_t OP_VideoOptionsMenu[] =
#endif
{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", &cv_globalgamma,36},
{IT_STRING | IT_CVAR | IT_CV_SLIDER, NULL, "Saturation", &cv_globalsaturation, 41},
{IT_SUBMENU|IT_STRING, NULL, "Advanced Settings...", &OP_ColorOptionsDef, 46},
@ -3399,8 +3399,8 @@ boolean M_Responder(event_t *ev)
M_QuitSRB2(0);
return true;
case KEY_F11: // Gamma Level
CV_AddValue(&cv_globalgamma, 1);
case KEY_F11: // Fullscreen toggle, also processed inside menus
CV_SetValue(&cv_fullscreen, !cv_fullscreen.value);
return true;
// Spymode on F12 handled in game logic
@ -3579,6 +3579,10 @@ boolean M_Responder(event_t *ev)
// M_SetupNextMenu(currentMenu->prevMenu);
return false;
case KEY_F11: // Fullscreen toggle, also processed outside menus
CV_SetValue(&cv_fullscreen, !cv_fullscreen.value);
return true;
default:
CON_Responder(ev);
break;