From e434b625ea14ee8f9937e0cc6e1ea39ec5d040b8 Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Mon, 30 Dec 2019 16:19:06 +0100 Subject: [PATCH] Allow the fullscreen key combo to work while in the menu --- SDL/gui.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/SDL/gui.c b/SDL/gui.c index 3bfd99e..1664e74 100644 --- a/SDL/gui.c +++ b/SDL/gui.c @@ -1012,6 +1012,15 @@ void run_gui(bool is_running) } case SDL_KEYDOWN: + if (event.key.keysym.scancode == SDL_SCANCODE_F && event.key.keysym.mod & MODIFIER) { + if ((SDL_GetWindowFlags(window) & SDL_WINDOW_FULLSCREEN_DESKTOP) == false) { + SDL_SetWindowFullscreen(window, SDL_WINDOW_FULLSCREEN_DESKTOP); + } + else { + SDL_SetWindowFullscreen(window, 0); + } + } + break; if (event.key.keysym.scancode == SDL_SCANCODE_O) { if (event.key.keysym.mod & MODIFIER) { char *filename = do_open_rom_dialog();