DEADSOFTWARE

more input related fixes
[d2df-sdl.git] / src / game / g_main.pas
index ccad27b86c8e700b0b8ecaa43ff0f4d00d7a44b3..23113e77f629fd2b426ddc783bc1c31f0b30a33f 100644 (file)
@@ -202,10 +202,12 @@ begin
   e_InitInput();
   g_Touch_Init;
 
+(*
   if (e_JoysticksAvailable > 0) then
     e_WriteLog('Input: Joysticks available.', TMsgType.Notify)
   else
     e_WriteLog('Input: No Joysticks.', TMsgType.Notify);
+*)
 
   if (not gNoSound) then
   begin
@@ -500,7 +502,15 @@ begin
           g_Console_Switch()
       end;
 
-    IK_ESCAPE, VK_ESCAPE: // <Esc>:
+    IK_ESCAPE: // <Esc>:
+      begin
+        if gChatShow then
+          g_Console_Chat_Switch
+        else if gConsoleShow then
+          g_Console_Switch
+      end;
+
+    VK_ESCAPE: // <Esc>:
       begin
         if gChatShow then
         begin
@@ -515,7 +525,7 @@ begin
         else if (g_ActiveWindow <> nil) then
         begin
           Msg.Msg := WM_KEYDOWN;
-          Msg.WParam := IK_ESCAPE;
+          Msg.WParam := VK_ESCAPE;
           g_ActiveWindow.OnMessage(Msg);
           if (not g_Game_IsNet) and (g_ActiveWindow = nil) then g_Game_Pause(false); //Fn loves to do this
         end