X-Git-Url: http://deadsoftware.ru/gitweb?p=d2df-sdl.git;a=blobdiff_plain;f=src%2Fgame%2Fsdl2%2Fg_system.pas;h=f46c3278669f208ae7258eef957b5caab3991d89;hp=45a45fd54a3c3bf9c6dfaeb29d25f6d5494a5e61;hb=2d2ce4c1770a59c3e780f3fd31249ce6043f374c;hpb=cf154570c3e691c4b95c021376c810020d689167 diff --git a/src/game/sdl2/g_system.pas b/src/game/sdl2/g_system.pas index 45a45fd..f46c327 100644 --- a/src/game/sdl2/g_system.pas +++ b/src/game/sdl2/g_system.pas @@ -408,14 +408,12 @@ implementation procedure HandleTextInput (var ev: TSDL_TextInputEvent); var ch: UnicodeChar; sch: AnsiChar; begin - if g_dbg_input then - e_LogWritefln('Input Debug: text, text=%s', [ev.text]); Utf8ToUnicode(@ch, PChar(ev.text), 1); - if IsValid1251(Word(ch)) then - begin - sch := AnsiChar(wchar2win(ch)); + sch := AnsiChar(wchar2win(ch)); + if g_dbg_input then + e_LogWritefln('Input Debug: text, text="%s", ch = %s, sch = %s', [ev.text, Ord(ch), Ord(sch)]); + if IsValid1251(Word(ch)) and IsPrintable1251(ch) then CharPress(sch); - end; end; function sys_HandleInput (): Boolean;