added using setup option for displaying overlay touch buttons
[rocksndiamonds.git] / src / game.c
index 259d19b6c54f858bee6ca6701bd6ce5b64ec94fd..abf350ce93311d668bc344cc1301affb90fa0a1e 100644 (file)
@@ -15692,6 +15692,7 @@ void RequestQuitGameExt(boolean skip_request, boolean quick_quit, char *message)
     {
       // prevent short reactivation of overlay buttons while closing door
       SetOverlayActive(FALSE);
+      UnmapGameButtons();
 
       // door may still be open due to skipped or envelope style request
       CloseDoor(score_info_tape_play ? DOOR_CLOSE_ALL : DOOR_CLOSE_1);
@@ -16299,6 +16300,10 @@ void CreateGameButtons(void)
     int y = (is_touch_button ? pos->y : GDI_ACTIVE_POS(pos->y));
     int id = i;
 
+    // do not use touch buttons if overlay touch buttons are disabled
+    if (is_touch_button && !setup.touch.overlay_buttons)
+      continue;
+
     if (gfx->bitmap == NULL)
     {
       game_gadget[id] = NULL;