diff -r 65a3b4bea459 -r c213645ff848 hedgewars/uChat.pas --- a/hedgewars/uChat.pas Fri Mar 02 19:44:09 2018 +0100 +++ b/hedgewars/uChat.pas Sun Mar 04 00:13:38 2018 +0100 @@ -303,7 +303,7 @@ top := 10 + visibleCount * ClHeight; // we start with input line (if any) // draw chat input line first and under all other lines -if (GameState = gsChat) and (InputStr.Tex <> nil) then +if isInChatMode and (InputStr.Tex <> nil) then begin if InputLinePrefix.Tex = nil then @@ -575,7 +575,7 @@ history:= 0; SDL_StopTextInput(); //SDL_EnableKeyRepeat(0,0); - GameState:= gsGame; + isInChatMode:= false; ResetKbd; end; @@ -1101,7 +1101,7 @@ var i: Integer; begin s:= s; // avoid compiler hint - GameState:= gsChat; + isInChatMode:= true; SDL_StopTextInput(); SDL_StartTextInput(); //Make REALLY sure unexpected events are flushed (1 time is insufficient as of SDL 2.0.7)