X-Git-Url: http://deadsoftware.ru/gitweb?p=d2df-sdl.git;a=blobdiff_plain;f=src%2Fgame%2Fsdl2%2Fg_system.pas;h=74e8d0354079582af6be99980952b11d6e8f5769;hp=abfbfb322dfebceeb83d4f5c9b99fd7ee204e6fb;hb=bb931202515154fd56edaa5657d0f69f1cce0e75;hpb=335e018a96e0da3bb62e8c220ce162e586356255 diff --git a/src/game/sdl2/g_system.pas b/src/game/sdl2/g_system.pas index abfbfb3..74e8d03 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} @@ -407,10 +407,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);