added not using touch buttons if touch controls are disabled
[rocksndiamonds.git] / src / tools.c
index bb6668d132352245bea54c643be154ea6c1b6ed3..912b18360309377682654e9b9d831604eaaf0005 100644 (file)
@@ -5857,6 +5857,11 @@ void CreateToolButtons(void)
     int y = pos->y;
     int id = i;
 
     int y = 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 (global.use_envelope_request && !is_touch_button)
     {
       setRequestPosition(&base_x, &base_y, TRUE);
     if (global.use_envelope_request && !is_touch_button)
     {
       setRequestPosition(&base_x, &base_y, TRUE);