From 88502e130e54afc758a042c4692589f49dd790b9 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Thu, 4 Jun 2020 02:15:27 +1000 Subject: [PATCH] Settings: Fix memory cards not syncing with disc change in title mode --- src/core/settings.cpp | 8 ++++++++ src/core/settings.h | 5 +---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/core/settings.cpp b/src/core/settings.cpp index 153f7bf81..04d7b71a2 100644 --- a/src/core/settings.cpp +++ b/src/core/settings.cpp @@ -2,9 +2,17 @@ #include "common/string_util.h" #include "host_interface.h" #include +#include Settings::Settings() = default; +bool Settings::HasAnyPerGameMemoryCards() const +{ + return std::any_of(memory_card_types.begin(), memory_card_types.end(), [](MemoryCardType t) { + return (t == MemoryCardType::PerGame || t == MemoryCardType::PerGameTitle); + }); +} + void Settings::Load(SettingsInterface& si) { region = diff --git a/src/core/settings.h b/src/core/settings.h index 33dc89365..8a26155a5 100644 --- a/src/core/settings.h +++ b/src/core/settings.h @@ -113,10 +113,7 @@ struct Settings bool log_to_window = false; bool log_to_file = false; - ALWAYS_INLINE bool HasAnyPerGameMemoryCards() const - { - return (memory_card_types[0] == MemoryCardType::PerGame || memory_card_types[1] == MemoryCardType::PerGame); - } + bool HasAnyPerGameMemoryCards() const; enum : u32 {