Test: Add Shift-Enter to switch between FS and desktop FS.
authorJørgen P. Tjernø
Wed, 15 Jan 2014 11:08:55 -0800
changeset 810919f0074531cf
parent 8108 9733fba62719
child 8110 98646f687e2b
Test: Add Shift-Enter to switch between FS and desktop FS.
src/test/SDL_test_common.c
     1.1 --- a/src/test/SDL_test_common.c	Wed Jan 15 10:40:14 2014 -0800
     1.2 +++ b/src/test/SDL_test_common.c	Wed Jan 15 11:08:55 2014 -0800
     1.3 @@ -1433,7 +1433,19 @@
     1.4                          SDL_SetWindowFullscreen(window, SDL_WINDOW_FULLSCREEN_DESKTOP);
     1.5                      }
     1.6                  }
     1.7 +            } else if (withShift) {
     1.8 +                /* Shift-Enter toggle fullscreen desktop / fullscreen */
     1.9 +                SDL_Window *window = SDL_GetWindowFromID(event->key.windowID);
    1.10 +                if (window) {
    1.11 +                    Uint32 flags = SDL_GetWindowFlags(window);
    1.12 +                    if ((flags & SDL_WINDOW_FULLSCREEN_DESKTOP) == SDL_WINDOW_FULLSCREEN_DESKTOP) {
    1.13 +                        SDL_SetWindowFullscreen(window, SDL_WINDOW_FULLSCREEN);
    1.14 +                    } else {
    1.15 +                        SDL_SetWindowFullscreen(window, SDL_WINDOW_FULLSCREEN_DESKTOP);
    1.16 +                    }
    1.17 +                }
    1.18              }
    1.19 +
    1.20              break;
    1.21          case SDLK_b:
    1.22              if (withControl) {