Allow windows to be created on non-primary displays.
authorSam Lantinga <slouken@libsdl.org>
Thu, 10 Feb 2011 22:37:01 -0800
changeset 5247d844537c42fd
parent 5246 58265e606e4e
child 5248 ff2564c24045
Allow windows to be created on non-primary displays.
test/common.c
     1.1 --- a/test/common.c	Thu Feb 10 14:44:25 2011 -0800
     1.2 +++ b/test/common.c	Thu Feb 10 22:37:01 2011 -0800
     1.3 @@ -150,6 +150,10 @@
     1.4              return -1;
     1.5          }
     1.6          state->display = SDL_atoi(argv[index]);
     1.7 +        if (SDL_WINDOWPOS_ISUNDEFINED(state->window_x)) {
     1.8 +            state->window_x = SDL_WINDOWPOS_UNDEFINED_DISPLAY(state->display);
     1.9 +            state->window_y = SDL_WINDOWPOS_UNDEFINED_DISPLAY(state->display);
    1.10 +        }
    1.11          return 2;
    1.12      }
    1.13      if (SDL_strcasecmp(argv[index], "--fullscreen") == 0) {