diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d321638..0a4c73ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,8 @@ Versioning](https://semver.org/spec/v2.0.0.html). symlinking plugins. Now you can use a symlink to a copy of `libyabridge.so` that's installed for a plugin in another directory. This is not recommended though. Fixes #3. +- Changed Wine prefix detection to be relative to the plugin's `.dll` file, + rather than the loaded `.so` file. - Clarified the error that appears when we're unable to load the `.dll`. ### Fixed diff --git a/src/plugin/host-bridge.cpp b/src/plugin/host-bridge.cpp index 60fa14ff..47564901 100644 --- a/src/plugin/host-bridge.cpp +++ b/src/plugin/host-bridge.cpp @@ -646,9 +646,10 @@ std::string create_logger_prefix(const fs::path& socket_path) { } std::optional find_wineprefix() { - // Try to locate the Wine prefix this .so file is located in by finding the - // first parent directory that contains a directory named `dosdevices` - fs::path wineprefix_path = get_this_file_location().remove_filename(); + // Try to locate the Wine prefix the plugin's .dll file is located in by + // finding the first parent directory that contains a directory named + // `dosdevices` + fs::path wineprefix_path = find_vst_plugin(); while (wineprefix_path != "") { if (fs::is_directory(wineprefix_path / "dosdevices")) { return wineprefix_path;