Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
add in alt+enter keyboard shortcut to test common to toggle fullscree…
Browse files Browse the repository at this point in the history
…n desktop
  • Loading branch information
urkle committed Jun 4, 2013
1 parent c756245 commit 104a870
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/test/SDL_test_common.c
Expand Up @@ -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:
Expand Down

0 comments on commit 104a870

Please sign in to comment.