X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fgame%2Fg_touch.pas;h=697187971a198bea8a001a8badf3f9703206fd64;hb=7b4a04daaa9ce5de0842defe5072ec05b4c58f55;hp=7cdc3282c1dd25057ed91b4ef4a251c4c3f6f7a9;hpb=32feca26531633f6175ac01859db60016a9d0455;p=d2df-sdl.git diff --git a/src/game/g_touch.pas b/src/game/g_touch.pas index 7cdc328..6971879 100644 --- a/src/game/g_touch.pas +++ b/src/game/g_touch.pas @@ -2,8 +2,7 @@ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * the Free Software Foundation, version 3 of the License ONLY. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -184,6 +183,7 @@ implementation procedure g_Touch_Init; begin {$IFNDEF HEADLESS} + g_Touch_ShowKeyboard(FALSE); g_touch_enabled := SDL_GetNumTouchDevices() > 0 {$ENDIF} end; @@ -191,10 +191,10 @@ implementation procedure g_Touch_ShowKeyboard(yes: Boolean); begin {$IFNDEF HEADLESS} - if not g_touch_enabled then - Exit; - - if yes then + if g_dbg_input then + e_LogWritefln('g_Touch_ShowKeyboard(%s)', [yes]); + (* on desktop we always receive text (needed for cheats) *) + if yes or (SDL_HasScreenKeyboardSupport() = SDL_FALSE) then SDL_StartTextInput else SDL_StopTextInput