add in alt+enter keyboard shortcut to test common to toggle fullscreen desktop
authorEdward Rudd <urkle@outoforder.cc>
Tue, 04 Jun 2013 12:02:18 -0400
changeset 734072134ccb9502
parent 7339 2d2fd56db9b7
child 7341 675c85d46f30
add in alt+enter keyboard shortcut to test common to toggle fullscreen desktop
src/test/SDL_test_common.c
     1.1 --- a/src/test/SDL_test_common.c	Sat Jun 29 14:40:55 2013 -0700
     1.2 +++ b/src/test/SDL_test_common.c	Tue Jun 04 12:02:18 2013 -0400
     1.3 @@ -1307,6 +1307,17 @@
     1.4                          SDL_SetWindowFullscreen(window, SDL_TRUE);
     1.5                      }
     1.6                  }
     1.7 +            } else if (event->key.keysym.mod & KMOD_ALT) {
     1.8 +                /* Ctrl-Enter toggle fullscreen desktop */
     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) {
    1.13 +                        SDL_SetWindowFullscreen(window, SDL_FALSE);
    1.14 +                    } else {
    1.15 +                        SDL_SetWindowFullscreen(window, SDL_WINDOW_FULLSCREEN_DESKTOP);
    1.16 +                    }
    1.17 +                }
    1.18              }
    1.19              break;
    1.20          case SDLK_b: