[XAM] Fixed incorrect setting order being used.
Instead of: Title->Profile->Default It used: Title->Default
This commit is contained in:
@@ -520,30 +520,22 @@ const Property* UserTracker::GetProperty(const uint64_t xuid,
|
|||||||
|
|
||||||
std::optional<UserSetting> UserTracker::GetGpdSetting(
|
std::optional<UserSetting> UserTracker::GetGpdSetting(
|
||||||
UserProfile* user, uint32_t title_id, uint32_t setting_id) const {
|
UserProfile* user, uint32_t title_id, uint32_t setting_id) const {
|
||||||
if (!spa_data_) {
|
auto game_gpd = user->games_gpd_.find(title_id);
|
||||||
// There is no data about current title. Use dashboard info.
|
if (game_gpd != user->games_gpd_.cend()) {
|
||||||
auto setting = user->dashboard_gpd_.GetSetting(setting_id);
|
auto setting = game_gpd->second.GetSetting(setting_id);
|
||||||
if (!setting) {
|
if (setting) {
|
||||||
return std::nullopt;
|
return std::make_optional<UserSetting>(
|
||||||
|
setting, game_gpd->second.GetSettingData(setting_id));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
auto setting = user->dashboard_gpd_.GetSetting(setting_id);
|
||||||
|
if (setting) {
|
||||||
return std::make_optional<UserSetting>(
|
return std::make_optional<UserSetting>(
|
||||||
setting, user->dashboard_gpd_.GetSettingData(setting_id));
|
setting, user->dashboard_gpd_.GetSettingData(setting_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
auto game_gpd = user->games_gpd_.find(title_id);
|
return std::nullopt;
|
||||||
if (game_gpd == user->games_gpd_.cend()) {
|
|
||||||
return std::nullopt;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto setting = game_gpd->second.GetSetting(setting_id);
|
|
||||||
if (!setting) {
|
|
||||||
// Refer to default values
|
|
||||||
return std::nullopt;
|
|
||||||
}
|
|
||||||
|
|
||||||
return std::make_optional<UserSetting>(
|
|
||||||
setting, game_gpd->second.GetSettingData(setting_id));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<UserSetting> UserTracker::GetSetting(UserProfile* user,
|
std::optional<UserSetting> UserTracker::GetSetting(UserProfile* user,
|
||||||
|
|||||||
Reference in New Issue
Block a user