src/video/android/SDL_androidwindow.c
changeset 5001 77df56570442
parent 4998 a514bfe6952a
child 5222 c66b2a778b7e
     1.1 --- a/src/video/android/SDL_androidwindow.c	Thu Jan 13 18:03:56 2011 -0800
     1.2 +++ b/src/video/android/SDL_androidwindow.c	Thu Jan 13 18:31:15 2011 -0800
     1.3 @@ -29,6 +29,12 @@
     1.4  int
     1.5  Android_CreateWindow(_THIS, SDL_Window * window)
     1.6  {
     1.7 +    if (Android_Window) {
     1.8 +        SDL_SetError("Android only supports one window");
     1.9 +        return -1;
    1.10 +    }
    1.11 +    Android_Window = window;
    1.12 +
    1.13      /* Adjust the window data to match the screen */
    1.14      window->x = 0;
    1.15      window->y = 0;
    1.16 @@ -47,6 +53,9 @@
    1.17  void
    1.18  Android_DestroyWindow(_THIS, SDL_Window * window)
    1.19  {
    1.20 +    if (window == Android_Window) {
    1.21 +        Android_Window = NULL;
    1.22 +    }
    1.23  }
    1.24  
    1.25  /* vi: set ts=4 sw=4 expandtab: */