mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01:00
Move graphic options menu update to toggleFullScreen
This fixes a bug where using the fullscreen toggle keybind (Alt+Enter, Alt+F, or F11) wouldn't update the color of the "resize to nearest" menu option. The color doesn't functionally change anything - the option still won't work, and will still have the message telling you that you need to be in windowed mode when you move your menu selection to it - but it's an easy inconsistency to fix; just move the menu recreation in to Screen::toggleFullScreen() itself.
This commit is contained in:
parent
960bd4a519
commit
53b3811a4d
2 changed files with 7 additions and 4 deletions
|
@ -456,10 +456,6 @@ static void menuactionpress(void)
|
|||
case 0:
|
||||
music.playef(11);
|
||||
graphics.screenbuffer->toggleFullScreen();
|
||||
|
||||
// Recreate menu to update "resize to nearest"
|
||||
game.createmenu(game.currentmenuname, true);
|
||||
|
||||
game.savestatsandsettings_menu();
|
||||
break;
|
||||
case 1:
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include <stdio.h>
|
||||
|
||||
#include "FileSystemUtils.h"
|
||||
#include "Game.h"
|
||||
#include "GraphicsUtil.h"
|
||||
|
||||
// Used to create the window icon
|
||||
|
@ -328,6 +329,12 @@ void Screen::toggleFullScreen(void)
|
|||
{
|
||||
isWindowed = !isWindowed;
|
||||
ResizeScreen(-1, -1);
|
||||
|
||||
if (game.currentmenuname == Menu::graphicoptions)
|
||||
{
|
||||
/* Recreate menu to update "resize to nearest" */
|
||||
game.createmenu(game.currentmenuname, true);
|
||||
}
|
||||
}
|
||||
|
||||
void Screen::toggleStretchMode(void)
|
||||
|
|
Loading…
Reference in a new issue