add in alt+enter keyboard shortcut to test common to toggle fullscreen desktop
This commit is contained in:
parent
7ff764a482
commit
60315067e3
1 changed files with 11 additions and 0 deletions
|
@ -1307,6 +1307,17 @@ SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done)
|
|||
SDL_SetWindowFullscreen(window, SDL_TRUE);
|
||||
}
|
||||
}
|
||||
} else if (event->key.keysym.mod & KMOD_ALT) {
|
||||
/* Ctrl-Enter toggle fullscreen desktop */
|
||||
SDL_Window *window = SDL_GetWindowFromID(event->key.windowID);
|
||||
if (window) {
|
||||
Uint32 flags = SDL_GetWindowFlags(window);
|
||||
if (flags & SDL_WINDOW_FULLSCREEN) {
|
||||
SDL_SetWindowFullscreen(window, SDL_FALSE);
|
||||
} else {
|
||||
SDL_SetWindowFullscreen(window, SDL_WINDOW_FULLSCREEN_DESKTOP);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SDLK_b:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue