Commit d865e46b authored by Sam Lantinga's avatar Sam Lantinga

Allow centering on a different display

parent 3e5d117b
...@@ -154,6 +154,10 @@ CommonArg(CommonState * state, int index) ...@@ -154,6 +154,10 @@ CommonArg(CommonState * state, int index)
state->window_x = SDL_WINDOWPOS_UNDEFINED_DISPLAY(state->display); state->window_x = SDL_WINDOWPOS_UNDEFINED_DISPLAY(state->display);
state->window_y = 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; return 2;
} }
if (SDL_strcasecmp(argv[index], "--fullscreen") == 0) { if (SDL_strcasecmp(argv[index], "--fullscreen") == 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment