hedgewars/uChat.pas
branchsdl2transition
changeset 9697 198c3ed28fe8
parent 9676 ce7396d4eaf7
child 9699 fab319c85a39
equal deleted inserted replaced
9694:e8d0fe885169 9697:198c3ed28fe8
   304 
   304 
   305 procedure CleanupInput;
   305 procedure CleanupInput;
   306 begin
   306 begin
   307     FreezeEnterKey;
   307     FreezeEnterKey;
   308     history:= 0;
   308     history:= 0;
   309 {$IFNDEF SDL2}
   309 {$IFDEF SDL2}
       
   310     SDL_StopTextInput();
       
   311 {$ELSE}
   310     SDL_EnableKeyRepeat(0,0);
   312     SDL_EnableKeyRepeat(0,0);
   311 {$ENDIF}
   313 {$ENDIF}
   312     GameState:= gsGame;
   314     GameState:= gsGame;
   313     ResetKbd;
   315     ResetKbd;
   314 end;
   316 end;
   429 
   431 
   430 procedure chChat(var s: shortstring);
   432 procedure chChat(var s: shortstring);
   431 begin
   433 begin
   432     s:= s; // avoid compiler hint
   434     s:= s; // avoid compiler hint
   433     GameState:= gsChat;
   435     GameState:= gsChat;
   434 {$IFNDEF SDL2}
   436 {$IFDEF SDL2}
       
   437     SDL_StartTextInput();
       
   438 {$ELSE}
   435     SDL_EnableKeyRepeat(200,45);
   439     SDL_EnableKeyRepeat(200,45);
   436 {$ENDIF}
   440 {$ENDIF}
   437     if length(s) = 0 then
   441     if length(s) = 0 then
   438         SetLine(InputStr, '', true)
   442         SetLine(InputStr, '', true)
   439     else
   443     else