diff --git a/src/game/g_touch.pas b/src/game/g_touch.pas
index 0638cc2713bfbfb432e484160ff431faa77adcbf..7cdc3282c1dd25057ed91b4ef4a251c4c3f6f7a9 100644 (file)
--- a/src/game/g_touch.pas
+++ b/src/game/g_touch.pas
uses
SysUtils,
- e_log, e_graphics, e_input, g_options, g_game, g_main, g_weapons, g_console;
+ e_log, e_graphics, e_input, g_options, g_game, g_main, g_gui, g_weapons, g_console, g_window;
var
angleFire: Boolean;
procedure KeyUp (finger, i: Integer);
begin
+ if g_dbg_input then
+ e_LogWritefln('Input Debug: g_touch.KeyUp, finger=%s, key=%s', [finger, i]);
+
keyFinger[i] := 0;
e_KeyUpDown(i, False);
g_Console_ProcessBind(i, False);
(* up/down + fire hack *)
- if g_touch_fire and (gGameSettings.GameType <> GT_NONE) and angleFire then
+ if g_touch_fire and (gGameSettings.GameType <> GT_NONE) and (g_ActiveWindow = nil) and angleFire then
begin
if (i = VK_UP) or (i = VK_DOWN) then
begin
procedure KeyDown (finger, i: Integer);
begin
- KeyPress(i); // Menu events
+ if g_dbg_input then
+ e_LogWritefln('Input Debug: g_touch.KeyDown, finger=%s, key=%s', [finger, i]);
+
keyFinger[i] := finger;
e_KeyUpDown(i, True);
g_Console_ProcessBind(i, True);
(* up/down + fire hack *)
- if g_touch_fire and (gGameSettings.GameType <> GT_NONE) then
+ if g_touch_fire and (gGameSettings.GameType <> GT_NONE) and (g_ActiveWindow = nil) then
begin
if i = VK_UP then
begin