Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions frontend/widgets/OBSBasic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,24 @@ static void AddExtraModulePaths()
#endif
}

#if defined(_WIN32)
/* Search the standard OBS Studio installation directory so that
third-party plugins are available in development builds. */
{
char pf[512];
DWORD pf_len = GetEnvironmentVariableA("ProgramFiles", pf,
sizeof(pf));
if (pf_len > 0 && pf_len < sizeof(pf)) {
string std_bin =
string(pf) + "/obs-studio/obs-plugins/64bit";
string std_data = string(pf) +
"/obs-studio/data/obs-plugins/%module%";
obs_add_module_path(std_bin.c_str(),
std_data.c_str());
}
}
#endif

if (portable_mode)
return;

Expand Down Expand Up @@ -1407,6 +1425,8 @@ void OBSBasic::applicationShutdown() noexcept
patronJsonThread->wait();

delete screenshotData;
delete previewProjector;
delete studioProgramProjector;
delete previewProjectorSource;
delete previewProjectorMain;
delete sourceProjector;
Expand All @@ -1419,6 +1439,8 @@ void OBSBasic::applicationShutdown() noexcept
delete deinterlaceMenu;
delete perSceneTransitionMenu;
delete shortcutFilter;
delete trayIcon;
delete trayMenu;
delete programOptions;
delete program;

Expand Down
7 changes: 7 additions & 0 deletions libobs/obs-module.c
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,13 @@ static void load_all_callback(void *param, const struct obs_module_info2 *info)
return;
}

/* Skip modules already loaded from a higher-priority path. */
if (obs_get_module(info->name)) {
blog(LOG_DEBUG, "Skipping module '%s' (%s), already loaded",
info->name, info->bin_path);
return;
}

int code = obs_open_module(&module, info->bin_path, info->data_path);
switch (code) {
case MODULE_MISSING_EXPORTS:
Expand Down
Loading