Allow windows to be created on non-primary displays.
authorSam Lantinga <slouken@libsdl.org>
Thu, 10 Feb 2011 22:37:01 -0800
changeset 5247 d844537c42fd
parent 5246 58265e606e4e
child 5248 ff2564c24045
Allow windows to be created on non-primary displays.
test/common.c
--- a/test/common.c	Thu Feb 10 14:44:25 2011 -0800
+++ b/test/common.c	Thu Feb 10 22:37:01 2011 -0800
@@ -150,6 +150,10 @@
             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) {