removed SDL 2.0 key symbols (using preprocessor) when compiling for SDL 1.2
[rocksndiamonds.git] / src / tools.c
index 76b40a291272a7c899ca1fba7c003f69ccfcf72b..9e06ab4ad18d4b9b70ac3162f9d48562693cf939 100644 (file)
@@ -1574,6 +1574,10 @@ void getSizedGraphicSourceExt(int graphic, int frame, int tilesize,
 {
   struct GraphicInfo *g = &graphic_info[graphic];
 
+  // if no graphics defined at all, use fallback graphics
+  if (g->bitmaps == NULL)
+    *g = graphic_info[IMG_CHAR_EXCLAM];
+
   // if no in-game graphics defined, always use standard graphic size
   if (g->bitmaps[IMG_BITMAP_GAME] == NULL)
     tilesize = TILESIZE;
@@ -4182,8 +4186,8 @@ static int RequestHandleEvents(unsigned int req_state)
 
              case KSYM_Return:
              case KSYM_y:
-             case KSYM_Y:
 #if defined(TARGET_SDL2)
+             case KSYM_Y:
              case KSYM_Select:
              case KSYM_Menu:
 #if defined(KSYM_Rewind)
@@ -4195,8 +4199,8 @@ static int RequestHandleEvents(unsigned int req_state)
 
              case KSYM_Escape:
              case KSYM_n:
-             case KSYM_N:
 #if defined(TARGET_SDL2)
+             case KSYM_N:
              case KSYM_Back:
 #if defined(KSYM_FastForward)
              case KSYM_FastForward:    /* for Amazon Fire TV remote */