mirror of
https://git.vladimir.cc/vladimir/ewsdr.git
synced 2026-08-25 20:27:33 +00:00
fix macOS build
This commit is contained in:
+6
-3
@@ -6,7 +6,7 @@ unit Settings;
|
||||
}
|
||||
{$mode objfpc}{$H+}
|
||||
interface
|
||||
uses SysUtils, Classes, Math, fpJSON, jsonparser, jsonscanner;
|
||||
uses SysUtils, Classes, Math, fpJSON, jsonparser, jsonscanner, PlatformUtils;
|
||||
|
||||
const
|
||||
SETTINGS_FILE = 'hpsdr_settings.json';
|
||||
@@ -268,7 +268,7 @@ type
|
||||
procedure JW(O: TJSONObject; const K: string; V: Boolean); overload;
|
||||
procedure JWS(O: TJSONObject; const K: string; const V: string);
|
||||
public
|
||||
constructor Create(const FilePath: string = SETTINGS_FILE);
|
||||
constructor Create(const FilePath: string = '');
|
||||
destructor Destroy; override;
|
||||
procedure Load;
|
||||
procedure Save;
|
||||
@@ -428,7 +428,10 @@ end;
|
||||
constructor TSettingsManager.Create(const FilePath: string);
|
||||
begin
|
||||
inherited Create;
|
||||
FFilePath := FilePath;
|
||||
if FilePath = '' then
|
||||
FFilePath := GetAppCfgDir + SETTINGS_FILE
|
||||
else
|
||||
FFilePath := FilePath;
|
||||
FRoot := TJSONObject.Create;
|
||||
end;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user