From c5d64f36c16a548303cd46af65d9c6dcb3757602 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 15 Feb 2011 22:51:29 -0800 Subject: [PATCH] Allow centering on a different display --- test/common.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/common.c b/test/common.c index 98f91e7df..b79ae892d 100644 --- a/test/common.c +++ b/test/common.c @@ -154,6 +154,10 @@ CommonArg(CommonState * state, int index) 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) {