DEADSOFTWARE

menu: optionally disable menu in client
[d2df-sdl.git] / src / game / sdl2 / g_touch.pas
index da6edc87bf1e9e90d28678c566859e454999ff73..645176010962aafa8b105f8389d3116f3cf3660b 100644 (file)
@@ -35,8 +35,12 @@ interface
 implementation
 
   uses
+    {$IFDEF ENABLE_MENU}
+      g_gui,
+    {$ENDIF}
     SysUtils,
-    e_log, r_graphics, r_game, e_input, g_options, g_game, g_gui, g_weapons, g_console;
+    e_log, r_graphics, r_game, e_input, g_options, g_game, g_weapons, g_console
+  ;
 
   var
     angleFire: Boolean;
@@ -219,7 +223,11 @@ implementation
       g_Console_ProcessBind(i, False);
 
       (* up/down + fire hack *)
+{$IFDEF ENABLE_MENU}
       if g_touch_fire and (gGameSettings.GameType <> GT_NONE) and (g_ActiveWindow = nil) and angleFire then
+{$ELSE}
+      if g_touch_fire and (gGameSettings.GameType <> GT_NONE) and angleFire then
+{$ENDIF}
       begin
         if (i = VK_UP) or (i = VK_DOWN) then
         begin
@@ -241,7 +249,11 @@ implementation
       g_Console_ProcessBind(i, True);
 
       (* up/down + fire hack *)
+{$IFDEF ENABLE_MENU}
       if g_touch_fire and (gGameSettings.GameType <> GT_NONE) and (g_ActiveWindow = nil) then
+{$ELSE}
+      if g_touch_fire and (gGameSettings.GameType <> GT_NONE) then
+{$ENDIF}
       begin
         if i = VK_UP then
         begin