DPF

DISTRHO Plugin Framework
Log | Files | Refs | Submodules | README | LICENSE

commit f24e5317cd7b57c8ab36b0987ec29a5579cd5dd2
parent f2cd4c825953971ca62a24f529f8b554cb30bbaa
Author: falkTX <falktx@falktx.com>
Date:   Mon, 14 Feb 2022 02:25:42 +0000

Fix VST3 bundle find on Windows

Signed-off-by: falkTX <falktx@falktx.com>

Diffstat:
Mdistrho/src/DistrhoPluginVST3.cpp | 4++--
Mdistrho/src/DistrhoUtils.cpp | 2+-
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/distrho/src/DistrhoPluginVST3.cpp b/distrho/src/DistrhoPluginVST3.cpp @@ -4216,9 +4216,9 @@ bool ENTRYFNNAME(void*) String tmpPath(getBinaryFilename()); tmpPath.truncate(tmpPath.rfind(DISTRHO_OS_SEP)); tmpPath.truncate(tmpPath.rfind(DISTRHO_OS_SEP)); - DISTRHO_SAFE_ASSERT_RETURN(tmpPath.endsWith("/Contents"), true); + DISTRHO_SAFE_ASSERT_RETURN(tmpPath.endsWith(DISTRHO_OS_SEP_STR "Contents"), true); - tmpPath.truncate(tmpPath.rfind('/')); + tmpPath.truncate(tmpPath.rfind(DISTRHO_OS_SEP)); bundlePath = tmpPath; d_nextBundlePath = bundlePath.buffer(); } diff --git a/distrho/src/DistrhoUtils.cpp b/distrho/src/DistrhoUtils.cpp @@ -59,7 +59,7 @@ const char* getBinaryFilename() # endif CHAR filenameBuf[MAX_PATH]; filenameBuf[0] = '\0'; - GetModuleFileName(hInstance, filenameBuf, sizeof(filenameBuf)); + GetModuleFileNameA(hInstance, filenameBuf, sizeof(filenameBuf)); filename = filenameBuf; #elif !defined(STATIC_BUILD) Dl_info info;