changeset 5252:d844537c42fd

Allow windows to be created on non-primary displays.
author Sam Lantinga <slouken@libsdl.org>
date Thu, 10 Feb 2011 22:37:01 -0800
parents 58265e606e4e
children ff2564c24045
files test/common.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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) {