From abc1d4aefaad531c06cd30de828a77fb79163664 Mon Sep 17 00:00:00 2001 From: Gliniak Date: Sat, 21 Sep 2024 18:55:51 +0200 Subject: [PATCH] [XAM] Fixed issue with lack of property modification --- src/xenia/kernel/xam/user_profile.cc | 6 +++--- src/xenia/kernel/xam/user_profile.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/xenia/kernel/xam/user_profile.cc b/src/xenia/kernel/xam/user_profile.cc index c086d881a..d2a69e49f 100644 --- a/src/xenia/kernel/xam/user_profile.cc +++ b/src/xenia/kernel/xam/user_profile.cc @@ -214,9 +214,9 @@ void UserProfile::SaveSetting(UserSetting* setting) { bool UserProfile::AddProperty(const Property* property) { // Find if property already exits - const Property* entry = GetProperty(property->GetPropertyId()); + Property* entry = GetProperty(property->GetPropertyId()); if (entry) { - entry = property; + *entry = *property; return true; } @@ -224,7 +224,7 @@ bool UserProfile::AddProperty(const Property* property) { return true; } -const Property* UserProfile::GetProperty(const AttributeKey id) const { +Property* UserProfile::GetProperty(const AttributeKey id) { for (auto& entry : properties_) { if (entry.GetPropertyId().value != id.value) { continue; diff --git a/src/xenia/kernel/xam/user_profile.h b/src/xenia/kernel/xam/user_profile.h index a97ef401c..b68d89fc8 100644 --- a/src/xenia/kernel/xam/user_profile.h +++ b/src/xenia/kernel/xam/user_profile.h @@ -164,7 +164,7 @@ class UserProfile { UserSetting* GetSetting(uint32_t setting_id); bool AddProperty(const Property* property); - const Property* GetProperty(const AttributeKey id) const; + Property* GetProperty(const AttributeKey id); std::map contexts_;