mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-05-08 03:28:31 +03:00
TitleDatabase: Add GetTitleName for title IDs
This commit is contained in:
parent
239167245d
commit
e1c0b8d011
2 changed files with 12 additions and 0 deletions
|
@ -14,6 +14,7 @@
|
|||
#include "Common/MsgHandler.h"
|
||||
#include "Common/StringUtil.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/IOS/ES/Formats.h"
|
||||
#include "DiscIO/Enums.h"
|
||||
|
||||
namespace Core
|
||||
|
@ -165,6 +166,14 @@ std::string TitleDatabase::GetTitleName(const std::string& game_id, TitleType ty
|
|||
return iterator != map.end() ? iterator->second : "";
|
||||
}
|
||||
|
||||
std::string TitleDatabase::GetTitleName(u64 title_id) const
|
||||
{
|
||||
const std::string id{
|
||||
{static_cast<char>((title_id >> 24) & 0xff), static_cast<char>((title_id >> 16) & 0xff),
|
||||
static_cast<char>((title_id >> 8) & 0xff), static_cast<char>(title_id & 0xff)}};
|
||||
return GetTitleName(id, IOS::ES::IsChannel(title_id) ? TitleType::Channel : TitleType::Other);
|
||||
}
|
||||
|
||||
std::string TitleDatabase::Describe(const std::string& game_id, TitleType type) const
|
||||
{
|
||||
const std::string title_name = GetTitleName(game_id, type);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue