libobs: Blacklist old obs-browser version on macOS

On macOS, the older version of the browser plugin used to reside in a
different directory.  This would cause two versions of obs-browser to
load if you installed the new version of OBS over the old version of
OBS.  This fixes that bug with an slightly unsightly hack by
blacklisting that older module if it tries to load an obs-module that
resides in that specific older directory.
This commit is contained in:
jp9000 2018-08-27 19:36:39 -07:00
parent 864e3698e8
commit deba492a2d

View File

@ -85,6 +85,17 @@ int obs_open_module(obs_module_t **module, const char *path,
if (!module || !path || !obs)
return MODULE_ERROR;
#ifdef __APPLE__
/* HACK: Do not load obsolete obs-browser build on macOS; the
* obs-browser plugin used to live in the Application Support
* directory. */
if (astrstri(path, "Library/Application Support") != NULL &&
astrstri(path, "obs-browser") != NULL) {
blog(LOG_WARNING, "Ignoring old obs-browser.so version");
return MODULE_ERROR;
}
#endif
blog(LOG_DEBUG, "---------------------------------");
mod.module = os_dlopen(path);