Skip to content

Commit 48043de

Browse files
committed
libobs: Search through modules backwards
Plugins are now required to be installed in %PROGRAMDATA%. Since its module path is added after the default module paths, the plugins in there will be loaded last. With the load modules once PR (#12285), the module added in the default path will be the only one loaded. We want the one in %PROGRAMDATA% to be the one loaded instead.
1 parent d3c5d2c commit 48043de

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

libobs/obs-module.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -552,8 +552,8 @@ void obs_find_modules2(obs_find_module_callback2_t callback, void *param)
552552
if (!obs)
553553
return;
554554

555-
for (size_t i = 0; i < obs->module_paths.num; i++) {
556-
struct obs_module_path *omp = obs->module_paths.array + i;
555+
for (size_t i = obs->module_paths.num; i > 0; i--) {
556+
struct obs_module_path *omp = obs->module_paths.array + (i - 1);
557557
find_modules_in_path(omp, callback, param);
558558
}
559559
}

0 commit comments

Comments
 (0)