mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 13:20:27 -06:00
Unify the way of setting game ID, title ID, revision
The existing code from ConfigManager, ES and MIOS is merged into a new set of functions called SetRunningGameMetadata.
This commit is contained in:
@ -19,6 +19,14 @@ namespace DiscIO
|
||||
{
|
||||
enum class Language;
|
||||
enum class Region;
|
||||
class IVolume;
|
||||
}
|
||||
namespace IOS
|
||||
{
|
||||
namespace ES
|
||||
{
|
||||
class TMDReader;
|
||||
}
|
||||
}
|
||||
|
||||
// DSP Backend Types
|
||||
@ -209,17 +217,20 @@ struct SConfig : NonCopyable
|
||||
std::string m_strDefaultISO;
|
||||
std::string m_strDVDRoot;
|
||||
std::string m_strApploader;
|
||||
std::string m_strGameID;
|
||||
u64 m_title_id;
|
||||
std::string m_strWiiSDCardPath;
|
||||
u16 m_revision;
|
||||
|
||||
std::string m_perfDir;
|
||||
|
||||
const std::string& GetGameID() const { return m_game_id; }
|
||||
u64 GetTitleID() const { return m_title_id; }
|
||||
u16 GetRevision() const { return m_revision; }
|
||||
void ResetRunningGameMetadata();
|
||||
void SetRunningGameMetadata(const DiscIO::IVolume& volume);
|
||||
void SetRunningGameMetadata(const IOS::ES::TMDReader& tmd);
|
||||
|
||||
void LoadDefaults();
|
||||
static const char* GetDirectoryForRegion(DiscIO::Region region);
|
||||
bool AutoSetup(EBootBS2 _BootBS2);
|
||||
const std::string& GetGameID() const { return m_strGameID; }
|
||||
void CheckMemcardPath(std::string& memcardPath, const std::string& gameRegion, bool isSlotA);
|
||||
DiscIO::Language GetCurrentLanguage(bool wii) const;
|
||||
|
||||
@ -373,7 +384,12 @@ private:
|
||||
void LoadUSBPassthroughSettings(IniFile& ini);
|
||||
void LoadSysconfSettings(IniFile& ini);
|
||||
|
||||
void SetRunningGameMetadata(const std::string& game_id, u64 title_id, u16 revision);
|
||||
bool SetRegion(DiscIO::Region region, std::string* directory_name);
|
||||
|
||||
static SConfig* m_Instance;
|
||||
|
||||
std::string m_game_id;
|
||||
u64 m_title_id;
|
||||
u16 m_revision;
|
||||
};
|
||||
|
Reference in New Issue
Block a user