src/SDL_compat.c
changeset 5286 73d27f06a715
parent 5267 93ea62a5ba8f
child 5287 d1823573d005
     1.1 --- a/src/SDL_compat.c	Sun Feb 13 00:18:05 2011 -0800
     1.2 +++ b/src/SDL_compat.c	Sun Feb 13 01:29:29 2011 -0800
     1.3 @@ -32,6 +32,7 @@
     1.4  
     1.5  
     1.6  static SDL_Window *SDL_VideoWindow = NULL;
     1.7 +static SDL_Surface *SDL_WindowSurface = NULL;
     1.8  static SDL_Surface *SDL_VideoSurface = NULL;
     1.9  static SDL_Surface *SDL_ShadowSurface = NULL;
    1.10  static SDL_Surface *SDL_PublicSurface = NULL;
    1.11 @@ -410,9 +411,9 @@
    1.12          return 0;
    1.13      }
    1.14  
    1.15 -    /* Destroy the screen texture and recreate it */
    1.16 -    SDL_VideoSurface = SDL_GetWindowSurface(SDL_VideoWindow);
    1.17 -    if (!SDL_VideoSurface) {
    1.18 +    /* Get the surface for the window */
    1.19 +    SDL_WindowSurface = SDL_GetWindowSurface(SDL_VideoWindow);
    1.20 +    if (!SDL_WindowSurface) {
    1.21          return -1;
    1.22      }
    1.23  
    1.24 @@ -549,8 +550,8 @@
    1.25      }
    1.26  
    1.27      /* Create the screen surface */
    1.28 -    SDL_VideoSurface = SDL_GetWindowSurface(SDL_VideoWindow);
    1.29 -    if (!SDL_VideoSurface) {
    1.30 +    SDL_WindowSurface = SDL_GetWindowSurface(SDL_VideoWindow);
    1.31 +    if (!SDL_WindowSurface) {
    1.32          return NULL;
    1.33      }
    1.34      SDL_VideoSurface->flags |= surface_flags;