mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-14 18:58:29 +12:00
nn_olv: Added community related API (#873)
- Initialize - Download communities (self-made / favorites / officials) - Upload communities (create subcommunity) - Upload favorite status (Add/Delete favorite to a subcommunity) Enough for support of Mario Kart 8 tournaments
This commit is contained in:
parent
1beec40445
commit
a8d157d310
24 changed files with 3125 additions and 56 deletions
|
@ -16,6 +16,8 @@ struct ParsedMetaXml
|
|||
std::array<std::string, 12> m_short_name;
|
||||
std::array<std::string, 12> m_publisher;
|
||||
|
||||
uint32 m_olv_accesskey;
|
||||
|
||||
std::string GetShortName(CafeConsoleLanguage languageId) const
|
||||
{
|
||||
return m_short_name[(size_t)languageId].empty() ? m_short_name[(size_t)CafeConsoleLanguage::EN] : m_short_name[(size_t)languageId];
|
||||
|
@ -51,6 +53,11 @@ struct ParsedMetaXml
|
|||
return m_company_code;
|
||||
}
|
||||
|
||||
uint32 GetOlvAccesskey() const
|
||||
{
|
||||
return m_olv_accesskey;
|
||||
}
|
||||
|
||||
static ParsedMetaXml* Parse(uint8* xmlData, size_t xmlSize)
|
||||
{
|
||||
if (xmlSize == 0)
|
||||
|
@ -98,6 +105,8 @@ struct ParsedMetaXml
|
|||
if (index != -1)
|
||||
parsedMetaXml->m_publisher[index] = child.text().as_string();
|
||||
}
|
||||
else if (boost::starts_with(name, L"olv_accesskey"))
|
||||
parsedMetaXml->m_olv_accesskey = child.text().as_uint(-1);
|
||||
}
|
||||
if (parsedMetaXml->m_title_id == 0)
|
||||
{
|
||||
|
|
|
@ -615,6 +615,16 @@ CafeConsoleRegion TitleInfo::GetMetaRegion() const
|
|||
return CafeConsoleRegion::JPN;
|
||||
}
|
||||
|
||||
uint32 TitleInfo::GetOlvAccesskey() const
|
||||
{
|
||||
cemu_assert_debug(m_isValid);
|
||||
if (m_parsedMetaXml)
|
||||
return m_parsedMetaXml->GetOlvAccesskey();
|
||||
|
||||
cemu_assert_suspicious();
|
||||
return -1;
|
||||
}
|
||||
|
||||
std::string TitleInfo::GetArgStr() const
|
||||
{
|
||||
cemu_assert_debug(m_parsedCosXml);
|
||||
|
|
|
@ -122,6 +122,7 @@ public:
|
|||
uint32 GetAppType() const; // from app.xml
|
||||
std::string GetTitleName() const; // from meta.xml
|
||||
CafeConsoleRegion GetMetaRegion() const; // from meta.xml
|
||||
uint32 GetOlvAccesskey() const;
|
||||
|
||||
// cos.xml
|
||||
std::string GetArgStr() const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue