Skip to content

Commit

Permalink
add OFX::Host::PluginCache::useStdOFXPluginsLocation(bool) to select …
Browse files Browse the repository at this point in the history
…wether the default plugins location should be used
  • Loading branch information
devernay committed Jan 10, 2017
1 parent 42463b8 commit 55f4281
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions HostSupport/include/ofxhPluginCache.h
Expand Up @@ -382,6 +382,7 @@ namespace OFX {
bool _dirty;
bool _enablePluginSeek; ///< Turn off to make all seekPluginFile() calls return an empty string

static bool _useStdOFXPluginsLocation;
static PluginCache* gPluginCachePtr; ///< singleton plugin cache

public:
Expand All @@ -391,6 +392,9 @@ namespace OFX {
/// dtor
~PluginCache();

/// call this before the first call to getPluginCache() in order to ignore the standard OFX plugin path
static void useStdOFXPluginsLocation(bool val) { _useStdOFXPluginsLocation = val; }

/// get our plugin cache
static PluginCache* getPluginCache();

Expand Down
6 changes: 5 additions & 1 deletion HostSupport/src/ofxhPluginCache.cpp
Expand Up @@ -104,6 +104,7 @@ static const char *getArchStr()
#include "shlobj.h"
#endif

bool OFX::Host::PluginCache::_useStdOFXPluginsLocation = true;
OFX::Host::PluginCache* OFX::Host::PluginCache::gPluginCachePtr = 0;

// Define this to enable ofx plugin cache debug messages.
Expand Down Expand Up @@ -274,7 +275,10 @@ PluginCache::PluginCache() : _hostSpec(0), _xmlCurrentBinary(0), _xmlCurrentPlug

_pluginPath.push_back(path);
}


if (!_useStdOFXPluginsLocation)
return;

#if defined(WINDOWS)

std::wstring wpath = getStdOFXPluginPath();
Expand Down

0 comments on commit 55f4281

Please sign in to comment.