mirror of
https://git.vladimir.cc/vladimir/ewsdr.git
synced 2026-08-25 17:27:32 +00:00
fix macOS build
This commit is contained in:
@@ -13,6 +13,11 @@ interface
|
||||
function QtPlatformAllowsOpenGLControls: Boolean;
|
||||
function HasOpenGLSpectrumSwitch: Boolean;
|
||||
function CurrentScreenDPI: Integer;
|
||||
// Возвращает каталог для хранения конфигурации (с завершающим разделителем).
|
||||
// macOS: ~/Library/Application Support/ewsdr/
|
||||
// Linux: ~/.config/ewsdr/
|
||||
// Windows: каталог исполняемого файла
|
||||
function GetAppCfgDir: string;
|
||||
|
||||
implementation
|
||||
|
||||
@@ -61,4 +66,15 @@ begin
|
||||
if Result <= 0 then Result := 96;
|
||||
end;
|
||||
|
||||
function GetAppCfgDir: string;
|
||||
begin
|
||||
{$IFDEF WINDOWS}
|
||||
Result := IncludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0)));
|
||||
{$ELSE}
|
||||
Result := IncludeTrailingPathDelimiter(GetAppConfigDir(False));
|
||||
if not DirectoryExists(Result) then
|
||||
ForceDirectories(Result);
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
Reference in New Issue
Block a user