From 829376033c4beb3cb8ce6ea76e995c732973b2b9 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 10 Feb 2011 22:37:01 -0800 Subject: [PATCH] Allow windows to be created on non-primary displays. --- test/common.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/common.c b/test/common.c index 2767bb372..98f91e7df 100644 --- a/test/common.c +++ b/test/common.c @@ -150,6 +150,10 @@ CommonArg(CommonState * state, int index) return -1; } state->display = SDL_atoi(argv[index]); + if (SDL_WINDOWPOS_ISUNDEFINED(state->window_x)) { + state->window_x = SDL_WINDOWPOS_UNDEFINED_DISPLAY(state->display); + state->window_y = SDL_WINDOWPOS_UNDEFINED_DISPLAY(state->display); + } return 2; } if (SDL_strcasecmp(argv[index], "--fullscreen") == 0) {