Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

add in alt+enter keyboard shortcut to test common to toggle fullscree…

…n desktop
  • Loading branch information
urkle committed Jun 4, 2013
1 parent c756245 commit 104a87046b6deff1e307c5571ff67a7407729e27

File 1 of 1 in 104a870

@@ -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:

0 comments on commit 104a870

Please sign in to comment.