src/SDL_compat.c
changeset 5287 d1823573d005
parent 5286 73d27f06a715
child 5288 d4381f3b0d1e
--- a/src/SDL_compat.c	Sun Feb 13 01:29:29 2011 -0800
+++ b/src/SDL_compat.c	Sun Feb 13 01:31:07 2011 -0800
@@ -32,7 +32,6 @@
 
 
 static SDL_Window *SDL_VideoWindow = NULL;
-static SDL_Surface *SDL_WindowSurface = NULL;
 static SDL_Surface *SDL_VideoSurface = NULL;
 static SDL_Surface *SDL_ShadowSurface = NULL;
 static SDL_Surface *SDL_PublicSurface = NULL;
@@ -411,9 +410,9 @@
         return 0;
     }
 
-    /* Get the surface for the window */
-    SDL_WindowSurface = SDL_GetWindowSurface(SDL_VideoWindow);
-    if (!SDL_WindowSurface) {
+    /* Destroy the screen texture and recreate it */
+    SDL_VideoSurface = SDL_GetWindowSurface(SDL_VideoWindow);
+    if (!SDL_VideoSurface) {
         return -1;
     }
 
@@ -550,8 +549,8 @@
     }
 
     /* Create the screen surface */
-    SDL_WindowSurface = SDL_GetWindowSurface(SDL_VideoWindow);
-    if (!SDL_WindowSurface) {
+    SDL_VideoSurface = SDL_GetWindowSurface(SDL_VideoWindow);
+    if (!SDL_VideoSurface) {
         return NULL;
     }
     SDL_VideoSurface->flags |= surface_flags;