diff --git a/plugins/Cardinal/src/Ildaeil.cpp b/plugins/Cardinal/src/Ildaeil.cpp index ff682e8..5d1b4ee 100644 --- a/plugins/Cardinal/src/Ildaeil.cpp +++ b/plugins/Cardinal/src/Ildaeil.cpp @@ -60,6 +60,7 @@ namespace rack { enum SpecialPath { kSpecialPathUserProfile, kSpecialPathCommonProgramFiles, + kSpecialPathProgramFiles, kSpecialPathAppData, }; std::string getSpecialPath(const SpecialPath type); @@ -122,6 +123,8 @@ static const char* getPathForJSFX() path = homeDir() + "/Library/Application Support/REAPER/Effects"; #elif defined(CARLA_OS_WIN) path = getSpecialPath(kSpecialPathAppData) + "\\REAPER\\Effects"; + if (! system::exists(path)) + path = getSpecialPath(kSpecialPathProgramFiles) + "\\REAPER\\InstallData\\Effects"; #else if (const char* const configHome = std::getenv("XDG_CONFIG_HOME")) path = configHome; diff --git a/src/CardinalCommon.cpp b/src/CardinalCommon.cpp index b0682e7..b96557b 100644 --- a/src/CardinalCommon.cpp +++ b/src/CardinalCommon.cpp @@ -77,8 +77,11 @@ std::string getSpecialPath(const SpecialPath type) case kSpecialPathCommonProgramFiles: csidl = CSIDL_PROGRAM_FILES_COMMON; break; + case kSpecialPathProgramFiles: + csidl = CSIDL_PROGRAM_FILES; + break; case kSpecialPathAppData: - csidl = CSIDL_COMMON_APPDATA; + csidl = CSIDL_APPDATA; break; default: return {}; diff --git a/src/CardinalCommon.hpp b/src/CardinalCommon.hpp index 132155b..25ad855 100644 --- a/src/CardinalCommon.hpp +++ b/src/CardinalCommon.hpp @@ -47,6 +47,7 @@ bool isStandalone(); enum SpecialPath { kSpecialPathUserProfile, kSpecialPathCommonProgramFiles, + kSpecialPathProgramFiles, kSpecialPathAppData, }; std::string getSpecialPath(SpecialPath type);