File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,19 @@ void PluginManager::ScanAndLoadPlugins()
4141 | The plugins directory is a directory named "plugins" in |
4242 | the configuration directory |
4343 \*---------------------------------------------------------*/
44- const QDir plugins_dir = QString (ResourceManager::get ()->GetConfigurationDirectory ().c_str ()).append (plugins_path);
44+ ScanAndLoadPluginsFrom (QString (ResourceManager::get ()->GetConfigurationDirectory ().c_str ()).append (plugins_path));
45+
46+ #ifdef OPENRGB_EXTRA_PLUGIN_DIRECTORY
47+ /* -----------------------------------------------------------------*\
48+ | An additional plugin directory can be set during build time, e.g. |
49+ | by the Linux distro to load plugins installed via package manager |
50+ \*-----------------------------------------------------------------*/
51+ ScanAndLoadPluginsFrom (QString ().fromStdString (OPENRGB_EXTRA_PLUGIN_DIRECTORY));
52+ #endif
53+ }
54+
55+ void PluginManager::ScanAndLoadPluginsFrom (QDir plugins_dir)
56+ {
4557 LOG_INFO (" [PluginManager] Scanning plugin directory: %s" , plugins_dir.absolutePath ().toStdString ().c_str ());
4658
4759 /* ---------------------------------------------------------*\
Original file line number Diff line number Diff line change @@ -47,6 +47,8 @@ class PluginManager
4747 std::vector<OpenRGBPluginEntry> ActivePlugins;
4848
4949private:
50+ void ScanAndLoadPluginsFrom (QDir plugins_dir);
51+
5052 AddPluginCallback AddPluginCallbackVal;
5153 void * AddPluginCallbackArg;
5254
You can’t perform that action at this time.
0 commit comments