Skip to content

Commit

Permalink
Test: Add Shift-Enter to switch between FS and desktop FS.
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgenpt committed Jan 15, 2014
1 parent a6a56af commit a442f12
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/test/SDL_test_common.c
Expand Up @@ -1433,7 +1433,19 @@ SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done)
SDL_SetWindowFullscreen(window, SDL_WINDOW_FULLSCREEN_DESKTOP);
}
}
} else if (withShift) {
/* Shift-Enter toggle fullscreen desktop / fullscreen */
SDL_Window *window = SDL_GetWindowFromID(event->key.windowID);
if (window) {
Uint32 flags = SDL_GetWindowFlags(window);
if ((flags & SDL_WINDOW_FULLSCREEN_DESKTOP) == SDL_WINDOW_FULLSCREEN_DESKTOP) {
SDL_SetWindowFullscreen(window, SDL_WINDOW_FULLSCREEN);
} else {
SDL_SetWindowFullscreen(window, SDL_WINDOW_FULLSCREEN_DESKTOP);
}
}
}

break;
case SDLK_b:
if (withControl) {
Expand Down

0 comments on commit a442f12

Please sign in to comment.