removed explicit check for Android for displaying virtual buttons
[rocksndiamonds.git] / src / libgame / system.c
index 29c3b24cb6f82df737a596d97b3f27d5b5024f62..3d499768e1a3a088d8559c2d89a4ba8b8e33a6ba 100644 (file)
@@ -325,12 +325,24 @@ void InitTileCursorInfo()
 
 void InitOverlayInfo()
 {
+  int nr = GRID_ACTIVE_NR();
+  int x, y;
+
   overlay.enabled = FALSE;
   overlay.active = FALSE;
 
   overlay.show_grid = FALSE;
 
-#if defined(PLATFORM_ANDROID)
+  overlay.grid_xsize = setup.touch.grid_xsize[nr];
+  overlay.grid_ysize = setup.touch.grid_ysize[nr];
+
+  for (x = 0; x < MAX_GRID_XSIZE; x++)
+    for (y = 0; y < MAX_GRID_YSIZE; y++)
+      overlay.grid_button[x][y] = setup.touch.grid_button[nr][x][y];
+
+  overlay.grid_button_highlight = CHAR_GRID_BUTTON_NONE;
+
+#if defined(USE_TOUCH_INPUT_OVERLAY)
   if (strEqual(setup.touch.control_type, TOUCH_CONTROL_VIRTUAL_BUTTONS))
     overlay.enabled = TRUE;
 #endif