mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 12:49:33 +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}
|
||||
function GetWinFontsDir: string;
|
||||
var
|
||||
{$if FPC_FULLVERSION < 30400}
|
||||
w : Array[0..MaxPathLen] of Char;
|
||||
{$ELSE}
|
||||
w : pwidechar;
|
||||
{$ENDIF}
|
||||
begin
|
||||
{$if FPC_FULLVERSION < 30400}
|
||||
SHGetSpecialFolderPath(0,w,CSIDL_FONTS,false);
|
||||
{$else}
|
||||
SHGetKnownFolderPath(FOLDERID_Fonts,0,0,w);
|
||||
{$endif}
|
||||
Result := w;
|
||||
{$if FPC_FULLVERSION > 30400}
|
||||
CoTaskMemFree(w);
|
||||
{$endif}
|
||||
end;
|
||||
{$endif}
|
||||
{$endif}
|
||||
|
||||
{$ifdef HasFontsConf}
|
||||
var
|
||||
@ -694,3 +704,4 @@ finalization
|
||||
|
||||
end.
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user