src/SDL_compat.c
branchSDL-1.3
changeset 1716 6ab5e712e642
parent 1712 931d111e737a
child 1720 a1ebb17f9c52
equal deleted inserted replaced
1715:364df7679e6b 1716:6ab5e712e642
   304     if (!SDL_VideoWindow) {
   304     if (!SDL_VideoWindow) {
   305         return NULL;
   305         return NULL;
   306     }
   306     }
   307 
   307 
   308     window_flags = SDL_GetWindowFlags(SDL_VideoWindow);
   308     window_flags = SDL_GetWindowFlags(SDL_VideoWindow);
   309     surface_flags = SDL_SCREEN_SURFACE;
   309     surface_flags = 0;
   310     if (window_flags & SDL_WINDOW_FULLSCREEN) {
   310     if (window_flags & SDL_WINDOW_FULLSCREEN) {
   311         surface_flags |= SDL_FULLSCREEN;
   311         surface_flags |= SDL_FULLSCREEN;
   312     }
   312     }
   313     if (window_flags & SDL_WINDOW_OPENGL) {
   313     if (window_flags & SDL_WINDOW_OPENGL) {
   314         surface_flags |= SDL_OPENGL;
   314         surface_flags |= SDL_OPENGL;
   446                 SDL_CreateRGBSurface(0, width, height, bpp, 0, 0, 0, 0);
   446                 SDL_CreateRGBSurface(0, width, height, bpp, 0, 0, 0, 0);
   447         }
   447         }
   448         if (!SDL_ShadowSurface) {
   448         if (!SDL_ShadowSurface) {
   449             return NULL;
   449             return NULL;
   450         }
   450         }
   451         surface_flags &= ~SDL_SCREEN_SURFACE;
       
   452         surface_flags |= SDL_SHADOW_SURFACE;
       
   453         SDL_ShadowSurface->flags |= surface_flags;
   451         SDL_ShadowSurface->flags |= surface_flags;
   454 
   452 
   455         /* 8-bit SDL_ShadowSurface surfaces report that they have exclusive palette */
   453         /* 8-bit SDL_ShadowSurface surfaces report that they have exclusive palette */
   456         if (SDL_ShadowSurface->format->palette) {
   454         if (SDL_ShadowSurface->format->palette) {
   457             SDL_ShadowSurface->flags |= SDL_HWPALETTE;
   455             SDL_ShadowSurface->flags |= SDL_HWPALETTE;