X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fsdl2%2Fg_system.pas;h=daec5d954e8ecc1885f9e8f5d5b2360ccfb83bc7;hb=67a536daf73aa6f586896b521dd4029a1068df27;hp=97e346e9005950ed3a9d98fe5b1e9abf34ace1fe;hpb=2d858c6e4a062a22f33d37cf08b4e5c25d649a91;p=d2df-sdl.git diff --git a/src/game/sdl2/g_system.pas b/src/game/sdl2/g_system.pas index 97e346e..daec5d9 100644 --- a/src/game/sdl2/g_system.pas +++ b/src/game/sdl2/g_system.pas @@ -48,7 +48,7 @@ implementation {$IFDEF ENABLE_HOLMES} sdlcarcass, {$ENDIF} - {$IFNDEF HEADLESS} + {$IFDEF ENABLE_RENDER} r_render, {$ENDIF} {$IFDEF ENABLE_MENU} @@ -392,15 +392,13 @@ implementation procedure sys_ShowKeyboard (yes: Boolean); begin - {$IFNDEF HEADLESS} - 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 - {$ENDIF} + 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 end; procedure HandleTouch (const ev: TSDL_TouchFingerEvent); @@ -408,10 +406,16 @@ implementation x, y, i, finger: Integer; function IntersectControl(ctl, xx, yy: Integer): Boolean; - var x, y, w, h: Integer; founded: Boolean; + {$IFDEF ENABLE_RENDER} + var x, y, w, h: Integer; founded: Boolean; + {$ENDIF} begin - r_Render_GetKeyRect(ctl, x, y, w, h, founded); - result := founded and (xx >= x) and (yy >= y) and (xx <= x + w) and (yy <= y + h); + {$IFDEF ENABLE_RENDER} + r_Render_GetKeyRect(ctl, x, y, w, h, founded); + Result := founded and (xx >= x) and (yy >= y) and (xx <= x + w) and (yy <= y + h); + {$ELSE} + Result := False + {$ENDIF} end; procedure KeyUp (finger, i: Integer);