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) {