mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-12-14 16:37:00 +00:00
Track online-enable and network-service settings per-account instead of globally
This commit is contained in:
parent
065fb7eb58
commit
3f8722f0a6
8 changed files with 164 additions and 102 deletions
|
|
@ -34,14 +34,15 @@ void NetworkConfig::Load(XMLConfigParser& parser)
|
|||
|
||||
bool NetworkConfig::XMLExists()
|
||||
{
|
||||
static std::optional<bool> s_exists; // caches result of fs::exists
|
||||
if(s_exists.has_value())
|
||||
return *s_exists;
|
||||
std::error_code ec;
|
||||
if (!fs::exists(ActiveSettings::GetConfigPath("network_services.xml"), ec))
|
||||
{
|
||||
if (static_cast<NetworkService>(GetConfig().account.active_service.GetValue()) == NetworkService::Custom)
|
||||
{
|
||||
GetConfig().account.active_service = 0;
|
||||
}
|
||||
s_exists = false;
|
||||
return false;
|
||||
}
|
||||
s_exists = true;
|
||||
return true;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue