changed some platform-related preprocessor definition names
[rocksndiamonds.git] / src / libgame / sdl.c
index 4108b2b531c533825c092df0ceab9fb1fd596d90..5be4c0dc173c9ea57455fcba7a3046eb8b88af36 100644 (file)
@@ -151,6 +151,9 @@ static void UpdateScreenExt(SDL_Rect *rect, boolean with_frame_delay)
     dst_rect1 = &dst_rect_screen;
 
 #if defined(HAS_SCREEN_KEYBOARD)
+  SDL_Rect src_rect_up = { 0, 0,  video.width, video.height };
+  SDL_Rect dst_rect_up = dst_rect_screen;
+
   if (video.shifted_up || video.shifted_up_delay)
   {
     int time_current = SDL_GetTicks();
@@ -171,8 +174,9 @@ static void UpdateScreenExt(SDL_Rect *rect, boolean with_frame_delay)
       video.shifted_up_delay = 0;
     }
 
-    SDL_Rect src_rect_up = { 0,    pos,  video.width, video.height - pos };
-    SDL_Rect dst_rect_up = { xoff, yoff, video.width, video.height - pos };
+    src_rect_up.y = pos;
+    src_rect_up.h = video.height - pos;
+    dst_rect_up.h = video.height - pos;
 
     if (video.screen_rendering_mode == SPECIAL_RENDERING_TARGET ||
        video.screen_rendering_mode == SPECIAL_RENDERING_DOUBLE)
@@ -260,7 +264,7 @@ static void SDLSetWindowIcon(char *basename)
   // (setting the window icon on Mac OS X would replace the high-quality
   // dock icon with the currently smaller (and uglier) icon from file)
 
-#if !defined(PLATFORM_MACOSX)
+#if !defined(PLATFORM_MAC)
   char *filename = getCustomImageFilename(basename);
   SDL_Surface *surface;
 
@@ -1225,6 +1229,9 @@ void SDLFadeRectangle(int x, int y, int width, int height,
          draw_border_function();
 
        UpdateScreen_WithFrameDelay(&dst_rect2);
+
+       if (PendingEscapeKeyEvent())
+         break;
       }
     }
   }
@@ -1281,6 +1288,9 @@ void SDLFadeRectangle(int x, int y, int width, int height,
 
       // only update the region of the screen that is affected from fading
       UpdateScreen_WithFrameDelay(&dst_rect2);
+
+      if (PendingEscapeKeyEvent())
+       break;
     }
   }
   else         // fading in, fading out or cross-fading
@@ -1307,6 +1317,9 @@ void SDLFadeRectangle(int x, int y, int width, int height,
 
       // only update the region of the screen that is affected from fading
       UpdateScreen_WithFrameDelay(&dst_rect);
+
+      if (PendingEscapeKeyEvent())
+       break;
     }
   }