Explorar el Código

Delphi compatibility

PascalCoin hace 7 años
padre
commit
d7573a5286
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  1. 5 1
      src/core/UBaseTypes.pas

+ 5 - 1
src/core/UBaseTypes.pas

@@ -89,6 +89,10 @@ Type
 
 implementation
 
+{$IFNDEF FPC}
+Uses windows;
+{$ENDIF}
+
 { TBaseType }
 
 {$IFnDEF FPC}
@@ -300,7 +304,7 @@ end;
 
 class function TPlatform.GetTickCount: TTickCount;
 begin
-  Result := {$IFDEF CPU64}GetTickCount64{$ELSE}SysUtils.GetTickCount{$ENDIF};
+  Result := {$IFDEF CPU64}GetTickCount64{$ELSE}{$IFNDEF FPC}Windows.{$ELSE}SysUtils.{$ENDIF}GetTickCount{$ENDIF};
 end;
 
 { TNotifyEventToMany }