Allow the fullscreen key combo to work while in the menu

This commit is contained in:
Lior Halphon 2019-12-30 16:19:06 +01:00 committed by Lior Halphon
parent 4c24323530
commit e434b625ea
1 changed files with 9 additions and 0 deletions

View File

@ -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();