X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fflexui%2Fsdlcarcass.pas;h=4bd2a6b135bb91dbd9c57dea5d86689fa3b83b94;hb=416e7ea60867edd8d4a535f507df1624190b02c2;hp=a9e254bd725365b52b5444a1370d62bd14ee14fb;hpb=563e770b462d67b2c8265b0e2b53384152afb7c1;p=d2df-sdl.git diff --git a/src/flexui/sdlcarcass.pas b/src/flexui/sdlcarcass.pas index a9e254b..4bd2a6b 100644 --- a/src/flexui/sdlcarcass.pas +++ b/src/flexui/sdlcarcass.pas @@ -69,11 +69,17 @@ implementation uses SysUtils, Classes, - GL, GLExt, - {$IF DEFINED(LINUX)} + {$IFDEF USE_NANOGL} + nanoGL, + {$ELSE} + GL, GLExt, + {$ENDIF} + {$IF DEFINED(LINUX) OR DEFINED(ANDROID)} unixtype, linux {$ELSEIF DEFINED(WINDOWS)} Windows + {$ELSEIF DEFINED(HAIKU)} + unixtype {$ELSE} {$WARNING You suck!} {$ENDIF} @@ -111,7 +117,7 @@ begin if not mHasHPTimer then raise Exception.Create('profiler error: hires timer is not available'); mFrequency := 1; // just a flag if (r.tv_nsec <> 0) then mFrequency := 1000000000000000000 div r.tv_nsec; -{$ELSE} +{$ELSEIF DEFINED(WINDOWS)} mHasHPTimer := QueryPerformanceFrequency(r); if not mHasHPTimer then raise Exception.Create('profiler error: hires timer is not available'); mFrequency := r; @@ -128,7 +134,7 @@ begin {$IF DEFINED(LINUX)} clock_gettime(CLOCK_MONOTONIC, @r); result := UInt64(r.tv_sec)*1000000+UInt64(r.tv_nsec) div 1000; // microseconds - {$ELSE} + {$ELSEIF DEFINED(WINDOWS)} QueryPerformanceCounter(r); result := UInt64(r)*1000000 div mFrequency; {$ENDIF}