mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 16:19:21 +02:00
* Ensure compilation with older FPC versions (Work by Christian Ulrich)
git-svn-id: trunk@38640 -
This commit is contained in:
parent
e9ca615924
commit
b1626d7c0b
@ -525,13 +525,23 @@ procedure TFPFontCacheList.ReadStandardFonts;
|
|||||||
{$ifdef mswindows}
|
{$ifdef mswindows}
|
||||||
function GetWinFontsDir: string;
|
function GetWinFontsDir: string;
|
||||||
var
|
var
|
||||||
|
{$if FPC_FULLVERSION < 30400}
|
||||||
|
w : Array[0..MaxPathLen] of Char;
|
||||||
|
{$ELSE}
|
||||||
w : pwidechar;
|
w : pwidechar;
|
||||||
|
{$ENDIF}
|
||||||
begin
|
begin
|
||||||
|
{$if FPC_FULLVERSION < 30400}
|
||||||
|
SHGetSpecialFolderPath(0,w,CSIDL_FONTS,false);
|
||||||
|
{$else}
|
||||||
SHGetKnownFolderPath(FOLDERID_Fonts,0,0,w);
|
SHGetKnownFolderPath(FOLDERID_Fonts,0,0,w);
|
||||||
|
{$endif}
|
||||||
Result := w;
|
Result := w;
|
||||||
|
{$if FPC_FULLVERSION > 30400}
|
||||||
CoTaskMemFree(w);
|
CoTaskMemFree(w);
|
||||||
|
{$endif}
|
||||||
end;
|
end;
|
||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
{$ifdef HasFontsConf}
|
{$ifdef HasFontsConf}
|
||||||
var
|
var
|
||||||
@ -694,3 +704,4 @@ finalization
|
|||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user