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