aboutsummaryrefslogtreecommitdiffstats
path: root/mediaplugin/src/base/UPlatformWindows.pas
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--mediaplugin/src/base/UPlatformWindows.pas10
1 files changed, 10 insertions, 0 deletions
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.