DEADSOFTWARE

fix key repeat in GUI
authorfgsfds <pvt.fgsfds@gmail.com>
Fri, 12 Apr 2019 12:09:51 +0000 (15:09 +0300)
committerfgsfds <pvt.fgsfds@gmail.com>
Fri, 12 Apr 2019 12:09:51 +0000 (15:09 +0300)
src/game/g_window.pas

index df44683f8276c42d790daa11396ed1d141f32a33..95e2c4ddc0844d228cde4ed1397c4bc6cc38c6c2 100644 (file)
@@ -61,7 +61,7 @@ uses
   g_console, e_input, g_options, g_game,
   g_basic, g_textures, e_sound, g_sound, g_menu, ENet, g_net,
   g_map, g_gfx, g_monsters, xprofiler,
   g_console, e_input, g_options, g_game,
   g_basic, g_textures, e_sound, g_sound, g_menu, ENet, g_net,
   g_map, g_gfx, g_monsters, xprofiler,
-  g_touch;
+  g_touch, g_gui;
 
 
 const
 
 
 const
@@ -513,7 +513,12 @@ begin
           if g_dbg_input then
             e_LogWritefln('Input Debug: keysym, press=%s, scancode=%s', [down, key]);
           e_KeyUpDown(key, down);
           if g_dbg_input then
             e_LogWritefln('Input Debug: keysym, press=%s, scancode=%s', [down, key]);
           e_KeyUpDown(key, down);
-          g_Console_ProcessBind(key, down)
+          g_Console_ProcessBind(key, down);
+        end
+        else if gConsoleShow or (g_ActiveWindow <> nil) then
+        begin
+          // key repeat in menus and shit
+          KeyPress(key);
         end;
       end;
 
         end;
       end;