1
0
Fork 0

Add plugin directory to the search path

development
ζeh Matt 2023-09-21 12:58:01 +03:00
parent e2b658f0a3
commit 68112f51da
No known key found for this signature in database
GPG Key ID: 18CE582C71A225B0
1 changed files with 8 additions and 0 deletions

View File

@ -499,6 +499,14 @@ void pluginloadall(const char* pluginDir)
for(const std::wstring & pluginName : availablePlugins)
{
// Check if the plugin is a sub-directory and also add it to the search paths.
std::wstring pluginPath = pluginDirectory + L"\\" + pluginName;
if(PathIsDirectoryW(pluginPath.c_str()))
{
pAddDllDirectory(pluginPath.c_str());
}
pluginload(StringUtils::Utf16ToUtf8(pluginName).c_str(), true);
}