Fix user settings on Windows
Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
parent
2f558407c0
commit
adfd296638
2 changed files with 10 additions and 2 deletions
|
@ -818,9 +818,9 @@ std::string getSpecialPath(const SpecialPath type)
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
WCHAR path[MAX_PATH + 256];
|
WCHAR path[MAX_PATH] = {};
|
||||||
|
|
||||||
if (SHGetSpecialFolderPathW(nullptr, path, csidl, FALSE))
|
if (SHGetFolderPathW(nullptr, csidl, nullptr, SHGFP_TYPE_CURRENT, path) == S_OK)
|
||||||
return string::UTF16toUTF8(path);
|
return string::UTF16toUTF8(path);
|
||||||
|
|
||||||
return {};
|
return {};
|
||||||
|
|
|
@ -518,6 +518,14 @@ public:
|
||||||
rack::system::removeRecursively(fAutosavePath);
|
rack::system::removeRecursively(fAutosavePath);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS
|
||||||
|
if (fInitializer->shouldSaveSettings)
|
||||||
|
{
|
||||||
|
INFO("Save settings");
|
||||||
|
rack::settings::save();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
rack::contextSet(nullptr);
|
rack::contextSet(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue