diff --git a/engine/Engine.cpp b/engine/Engine.cpp index e389aa9d..39d61f51 100644 --- a/engine/Engine.cpp +++ b/engine/Engine.cpp @@ -1310,6 +1310,17 @@ bool Engine::loadPluginDir(const String& relPath) path += PATH_SEP; path += relPath; } + if (path.endsWith(s_modsuffix)) { + int sep = path.rfind(PATH_SEP[0]); + if (sep >= 0) + sep++; + else + sep = 0; + String name = path.substr(sep); + if (loadPlugin(path,s_cfg.getBoolValue("localsym",name,s_localsymbol), + s_cfg.getBoolValue("nounload",name))) + return true; + } if (path.endsWith(PATH_SEP)) path = path.substr(0,path.length()-1); #ifdef _WINDOWS diff --git a/yatengine.h b/yatengine.h index ba86ddff..be3b924f 100644 --- a/yatengine.h +++ b/yatengine.h @@ -1122,9 +1122,9 @@ public: { return m_dispatcher.handlerCount(); } /** - * Loads the plugins from an extra plugins directory + * Loads the plugins from an extra plugins directory or just an extra plugin * @param relPath Path to the extra directory, relative to the main modules - * @return True if the directory could at least be opened + * @return True if the plugin was loaded or the directory could at least be opened */ bool loadPluginDir(const String& relPath);