aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL
diff options
context:
space:
mode:
authorcat_or_not <41955154+catornot@users.noreply.github.com>2023-05-05 12:20:51 -0400
committerGitHub <noreply@github.com>2023-05-05 18:20:51 +0200
commit6857b93f623dffedffac23fdd3983c74621d2b64 (patch)
tree9463bb0114fcf4def42b7a8a6049937690af634b /NorthstarDLL
parent6fa48abd3387a7fe0c00f462f08bf4b680f656f9 (diff)
downloadNorthstarLauncher-6857b93f623dffedffac23fdd3983c74621d2b64.tar.gz
NorthstarLauncher-6857b93f623dffedffac23fdd3983c74621d2b64.zip
Support loading plugins from subdirs (#460)
Support loading plugins from subdirs to allow for better organising plugins and easier mod-manager installation
Diffstat (limited to 'NorthstarDLL')
-rw-r--r--NorthstarDLL/plugins/plugins.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/NorthstarDLL/plugins/plugins.cpp b/NorthstarDLL/plugins/plugins.cpp
index 6e3ceb5a..001f3578 100644
--- a/NorthstarDLL/plugins/plugins.cpp
+++ b/NorthstarDLL/plugins/plugins.cpp
@@ -52,8 +52,8 @@ std::optional<Plugin> PluginManager::LoadPlugin(fs::path path, PluginInitFuncs*
Plugin plugin {};
- std::string pathstring = (pluginPath / path).string();
- std::wstring wpath = (pluginPath / path).wstring();
+ std::string pathstring = path.string();
+ std::wstring wpath = path.wstring();
LPCWSTR wpptr = wpath.c_str();
HMODULE datafile = LoadLibraryExW(wpptr, 0, LOAD_LIBRARY_AS_DATAFILE | LOAD_LIBRARY_AS_IMAGE_RESOURCE); // Load the DLL as a data file
@@ -222,7 +222,7 @@ bool PluginManager::LoadPlugins()
for (auto const& entry : iterator)
{
if (fs::is_regular_file(entry) && entry.path().extension() == ".dll")
- paths.emplace_back(entry.path().filename());
+ paths.emplace_back(entry.path());
}
for (fs::path path : paths)
{