diff options
Diffstat (limited to '')
-rw-r--r-- | mediaplugin/src/base/UPlatform.pas | 19 | ||||
-rw-r--r-- | mediaplugin/src/base/UPlatformWindows.pas | 10 |
2 files changed, 28 insertions, 1 deletions
diff --git a/mediaplugin/src/base/UPlatform.pas b/mediaplugin/src/base/UPlatform.pas index 6d884979..4239e21a 100644 --- a/mediaplugin/src/base/UPlatform.pas +++ b/mediaplugin/src/base/UPlatform.pas @@ -51,9 +51,11 @@ type procedure Halt; virtual; function GetLogPath: IPath; virtual; abstract; - function GetMusicPath: IPath; virtual; abstract; + function GetMusicPath: IPath; virtual; function GetGameSharedPath: IPath; virtual; abstract; function GetGameUserPath: IPath; virtual; abstract; + + procedure AddLibrarySearchPath(const DLLPath: IPath); virtual; end; function Platform(): TPlatform; @@ -113,6 +115,21 @@ begin Result := ExecDir.GetAbsolutePath(); end; +{** + * Dummy implementation (Mac specific) + *} +function TPlatform.GetMusicPath: IPath; +begin + Result := PATH_NONE; +end; + +{** + * Dummy implementation (Windows specific) + *} +procedure TPlatform.AddLibrarySearchPath(const DLLPath: IPath); +begin +end; + (** * Default TerminateIfAlreadyRunning() implementation *) diff --git a/mediaplugin/src/base/UPlatformWindows.pas b/mediaplugin/src/base/UPlatformWindows.pas index 91d3cce6..a0059687 100644 --- a/mediaplugin/src/base/UPlatformWindows.pas +++ b/mediaplugin/src/base/UPlatformWindows.pas @@ -51,6 +51,7 @@ type public procedure Init; override; function TerminateIfAlreadyRunning(var WndTitle: String): Boolean; override; + procedure AddLibrarySearchPath(const DLLPath: IPath); override; function GetLogPath: IPath; override; function GetGameSharedPath: IPath; override; @@ -63,6 +64,7 @@ uses SysUtils, ShlObj, Windows, + UPathUtils, UConfig; procedure TPlatformWindows.Init; @@ -206,4 +208,12 @@ begin Result := GetSpecialPath(CSIDL_APPDATA).Append('ultrastardx', pdAppend); end; +function SetDllDirectory(lpPathName: PWideChar): Bool; stdcall; + external kernel32 name 'SetDllDirectoryW'; + +procedure TPlatformWindows.AddLibrarySearchPath(const DLLPath: IPath); +begin + SetDllDirectory(PWideChar(DLLPath.ToWide())); +end; + end. |