removed SDL 2.0 key symbols (using preprocessor) when compiling for SDL 1.2
authorHolger Schemel <info@artsoft.org>
Thu, 14 Jun 2018 17:53:30 +0000 (19:53 +0200)
committerHolger Schemel <info@artsoft.org>
Thu, 14 Jun 2018 17:53:42 +0000 (19:53 +0200)
src/screens.c
src/tools.c

index ad21972ceafc8d89c377d84bab1276dc86913785..1291b8ea9dacc8d010d869ddfba418de7ff98341 100644 (file)
@@ -7558,13 +7558,19 @@ boolean ConfigureVirtualButtonsMain()
 
            /* press 'Enter' to keep the existing key binding */
            if (key == KSYM_Return ||
+#if defined(TARGET_SDL2)
                key == KSYM_Menu ||
+#endif
                key == KSYM_space)
            {
              step_nr++;
            }
-           else if (key == KSYM_BackSpace ||
-                    key == KSYM_Back)
+           else if (key == KSYM_BackSpace
+#if defined(TARGET_SDL2)
+                    ||
+                    key == KSYM_Back
+#endif
+                    )
            {
              if (step_nr == 0)
              {
index 6d3a0aeb00f5866603f28f4a720b0b05bd17d3b5..9e06ab4ad18d4b9b70ac3162f9d48562693cf939 100644 (file)
@@ -4186,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)
@@ -4199,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 */