File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 13
13
#include " OpenRGBThemeManager.h"
14
14
#include " SettingsManager.h"
15
15
16
+ #ifdef _WIN32
17
+ #include < Windows.h>
18
+ #endif
19
+
16
20
PluginManager::PluginManager ()
17
21
{
18
22
/* ---------------------------------------------------------*\
@@ -64,6 +68,24 @@ void PluginManager::ScanAndLoadPlugins()
64
68
\*---------------------------------------------------------*/
65
69
ScanAndLoadPluginsFrom (OPENRGB_SYSTEM_PLUGIN_DIRECTORY, true );
66
70
#endif
71
+
72
+ #ifdef _WIN32
73
+ /* ---------------------------------------------------------*\
74
+ | Get the exe folder plugins directory (Windows) |
75
+ | |
76
+ | On Windows, system plugins are located in a folder called |
77
+ | "plugins" inside the folder where the OpenRGB.exe file is |
78
+ | installed. Typically, C:\Program Files\OpenRGB but other |
79
+ | install paths are allowed. |
80
+ \*---------------------------------------------------------*/
81
+ char path[MAX_PATH];
82
+ GetModuleFileName (NULL , path, MAX_PATH);
83
+
84
+ filesystem::path exe_dir (path);
85
+ exe_dir = exe_dir.remove_filename () / plugins_path;
86
+
87
+ ScanAndLoadPluginsFrom (exe_dir, true );
88
+ #endif
67
89
}
68
90
69
91
void PluginManager::ScanAndLoadPluginsFrom (const filesystem::path & plugins_dir, bool is_system)
You can’t perform that action at this time.
0 commit comments