[XAM] Implemented SPA XMAT

This commit is contained in:
Adrian
2025-11-08 15:28:18 +00:00
committed by Radosław Gliński
parent 520353e95a
commit 6783bea223
5 changed files with 59 additions and 3 deletions

View File

@@ -103,6 +103,8 @@ GameInfoDatabase::Context GameInfoDatabase::GetContext(
context.max_value = xdbf_context->max_value;
context.is_system = xam::UserData::is_system_property(xdbf_context->id);
context.is_presence = GetPresence().property_bag.contexts.contains(id);
context.is_matchmaking =
GetMatchmakingCollection().contexts.contains(xdbf_context->id);
context.description = GetLocalizedString(xdbf_context->string_id);
return context;
}
@@ -124,6 +126,8 @@ GameInfoDatabase::Property GameInfoDatabase::GetProperty(
property.data_size = xdbf_property->data_size;
property.is_system = xam::UserData::is_system_property(xdbf_property->id);
property.is_presence = GetPresence().property_bag.properties.contains(id);
property.is_matchmaking =
GetMatchmakingCollection().properties.contains(xdbf_property->id);
property.description = GetLocalizedString(xdbf_property->string_id);
return property;
}
@@ -350,6 +354,11 @@ GameInfoDatabase::ProductInformation GameInfoDatabase::GetProductInformation()
return info;
}
GameInfoDatabase::PropertyBag GameInfoDatabase::GetMatchmakingCollection()
const {
return GetPropertyBag(*spa_gamedata_->GetMatchCollection());
}
// Aggregators
std::vector<GameInfoDatabase::Context> GameInfoDatabase::GetContexts() const {
std::vector<Context> contexts;

View File

@@ -34,6 +34,7 @@ class GameInfoDatabase {
uint32_t default_value;
bool is_system;
bool is_presence;
bool is_matchmaking;
std::string description;
};
@@ -42,6 +43,7 @@ class GameInfoDatabase {
uint32_t data_size;
bool is_system;
bool is_presence;
bool is_matchmaking;
std::string description;
};
@@ -160,6 +162,7 @@ class GameInfoDatabase {
Query GetQueryData(const uint32_t id) const;
std::vector<XLanguage> GetSupportedLanguages() const;
ProductInformation GetProductInformation() const;
PropertyBag GetMatchmakingCollection() const;
// Aggregators for specific usecases
std::vector<Context> GetContexts() const;