From 7d0f03cb61686f3e82eb0850bf8633484928d6dd Mon Sep 17 00:00:00 2001 From: Soren Jorvang Date: Sat, 5 Jun 2010 18:52:56 +0000 Subject: Don't store the absolute pathname of plugins in the configuration file, just the basename like libPlugin_foo.dylib. Dolphin then loads the plugins relative to the compiled-in plugins directory. This means that you won't have to reselect the plugins when running different builds (in different directories) and is most obviously beneficial on OS X where application bundles are not (should not) be expected to stay in the place where they are first installed. This is tested on OS X and Linux with local/global build options, but not Windows. I don't anticipate any problems on Windows, but that OS does have slightly different semantics with regard to path component separators and file suffixes, so it's something to watch out for. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5621 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Common/Src/DynamicLibrary.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Source/Core/Common/Src/DynamicLibrary.cpp') diff --git a/Source/Core/Common/Src/DynamicLibrary.cpp b/Source/Core/Common/Src/DynamicLibrary.cpp index 824f8ee258..3ca0b58f8f 100644 --- a/Source/Core/Common/Src/DynamicLibrary.cpp +++ b/Source/Core/Common/Src/DynamicLibrary.cpp @@ -59,6 +59,9 @@ const char *DllGetLastError() */ int DynamicLibrary::Load(const char* filename) { + std::string LibraryPath = File::GetPluginsDirectory() + filename; + filename = LibraryPath.c_str(); + INFO_LOG(COMMON, "DL: Loading dynamic library %s", filename); if (!filename || strlen(filename) == 0) { -- cgit v1.2.3