added not using touch buttons if touch controls are disabled
[rocksndiamonds.git] / src / game.c
index 3985ce1b47564ae57618bd167260cb80bc41a71b..68fb40c6e12dc3c2c27433c0955fb5ea7a4e086a 100644 (file)
@@ -16300,6 +16300,11 @@ void CreateGameButtons(void)
     int y = (is_touch_button ? pos->y : GDI_ACTIVE_POS(pos->y));
     int id = i;
 
+    // do not use touch buttons if touch controls are disabled
+    if (is_touch_button &&
+       strEqual(setup.touch.control_type, TOUCH_CONTROL_OFF))
+      continue;
+
     if (gfx->bitmap == NULL)
     {
       game_gadget[id] = NULL;