Windows default to non-portable + Reworked MLC handling and related UI (#1252)

This commit is contained in:
Exzap 2024-07-23 03:13:36 +02:00 committed by GitHub
parent 7522c8470e
commit 64232ffdbd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 515 additions and 651 deletions

View file

@ -5,7 +5,6 @@
#include <wx/language.h>
#include "PermanentConfig.h"
#include "ActiveSettings.h"
XMLCemuConfig_t g_config(L"settings.xml");
@ -15,23 +14,6 @@ void CemuConfig::SetMLCPath(fs::path path, bool save)
mlc_path.SetValue(_pathToUtf8(path));
if(save)
g_config.Save();
// if custom mlc path has been selected, store it in permanent config
if (path != ActiveSettings::GetDefaultMLCPath())
{
try
{
auto pconfig = PermanentConfig::Load();
pconfig.custom_mlc_path = _pathToUtf8(path);
pconfig.Store();
}
catch (const PSDisabledException&) {}
catch (const std::exception& ex)
{
cemuLog_log(LogType::Force, "can't store custom mlc path in permanent storage: {}", ex.what());
}
}
Account::RefreshAccounts();
}