Allow centering on a different display
authorSam Lantinga <slouken@libsdl.org>
Tue, 15 Feb 2011 22:51:29 -0800
changeset 530459e6e16351e6
parent 5303 d4074e52e739
child 5305 75f5ff92ad08
Allow centering on a different display
test/common.c
     1.1 --- a/test/common.c	Tue Feb 15 21:57:31 2011 -0800
     1.2 +++ b/test/common.c	Tue Feb 15 22:51:29 2011 -0800
     1.3 @@ -154,6 +154,10 @@
     1.4              state->window_x = SDL_WINDOWPOS_UNDEFINED_DISPLAY(state->display);
     1.5              state->window_y = SDL_WINDOWPOS_UNDEFINED_DISPLAY(state->display);
     1.6          }
     1.7 +        if (SDL_WINDOWPOS_ISCENTERED(state->window_x)) {
     1.8 +            state->window_x = SDL_WINDOWPOS_CENTERED_DISPLAY(state->display);
     1.9 +            state->window_y = SDL_WINDOWPOS_CENTERED_DISPLAY(state->display);
    1.10 +        }
    1.11          return 2;
    1.12      }
    1.13      if (SDL_strcasecmp(argv[index], "--fullscreen") == 0) {