fixed ignoring clicks on global animations after executing event actions
[rocksndiamonds.git] / src / tools.c
index 6d3a0aeb00f5866603f28f4a720b0b05bd17d3b5..24fecfb31d478829d2f89bf2e59fa93a93a8e812 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 */
@@ -5304,7 +5304,8 @@ void CreateToolButtons()
 
   for (i = 0; i < NUM_TOOL_BUTTONS; i++)
   {
-    struct GraphicInfo *gfx = &graphic_info[toolbutton_info[i].graphic];
+    int graphic = toolbutton_info[i].graphic;
+    struct GraphicInfo *gfx = &graphic_info[graphic];
     struct TextPosInfo *pos = toolbutton_info[i].pos;
     struct GadgetInfo *gi;
     Bitmap *deco_bitmap = None;
@@ -5370,6 +5371,7 @@ void CreateToolButtons()
     }
 
     gi = CreateGadget(GDI_CUSTOM_ID, id,
+                     GDI_IMAGE_ID, graphic,
                      GDI_INFO_TEXT, toolbutton_info[i].infotext,
                      GDI_X, dx + x,
                      GDI_Y, dy + y,