Merge pull request #5040 from JosJuice/remove-strname

ConfigManager: Remove m_strName
This commit is contained in:
Markus Wick 2017-03-08 21:23:18 +01:00 committed by GitHub
commit 5a7d67a64f
5 changed files with 2 additions and 15 deletions

View File

@ -783,7 +783,6 @@ void SConfig::LoadDefaults()
bJITSystemRegistersOff = false; bJITSystemRegistersOff = false;
bJITBranchOff = false; bJITBranchOff = false;
m_strName = "NONE";
m_strGameID = "00000000"; m_strGameID = "00000000";
m_title_id = 0; m_title_id = 0;
m_revision = 0; m_revision = 0;
@ -871,7 +870,6 @@ bool SConfig::AutoSetup(EBootBS2 _BootBS2)
m_strFilename.c_str()); m_strFilename.c_str());
return false; return false;
} }
m_strName = pVolume->GetInternalName();
m_strGameID = pVolume->GetGameID(); m_strGameID = pVolume->GetGameID();
pVolume->GetTitleID(&m_title_id); pVolume->GetTitleID(&m_title_id);
m_revision = pVolume->GetRevision(); m_revision = pVolume->GetRevision();
@ -938,7 +936,6 @@ bool SConfig::AutoSetup(EBootBS2 _BootBS2)
if (pVolume) if (pVolume)
{ {
m_strName = pVolume->GetInternalName();
m_strGameID = pVolume->GetGameID(); m_strGameID = pVolume->GetGameID();
pVolume->GetTitleID(&m_title_id); pVolume->GetTitleID(&m_title_id);
} }
@ -946,7 +943,6 @@ bool SConfig::AutoSetup(EBootBS2 _BootBS2)
{ {
// null pVolume means that we are loading from nand folder (Most Likely Wii Menu) // null pVolume means that we are loading from nand folder (Most Likely Wii Menu)
// if this is the second boot we would be using the Name and id of the last title // if this is the second boot we would be using the Name and id of the last title
m_strName.clear();
m_strGameID.clear(); m_strGameID.clear();
m_title_id = 0; m_title_id = 0;
} }
@ -956,10 +952,6 @@ bool SConfig::AutoSetup(EBootBS2 _BootBS2)
// (specifically sysmenu could potentially apply to other things) // (specifically sysmenu could potentially apply to other things)
std::string titleidstr = StringFromFormat("%016" PRIx64, m_title_id); std::string titleidstr = StringFromFormat("%016" PRIx64, m_title_id);
if (m_strName.empty())
{
m_strName = titleidstr;
}
if (m_strGameID.empty()) if (m_strGameID.empty())
{ {
m_strGameID = titleidstr; m_strGameID = titleidstr;

View File

@ -211,7 +211,6 @@ struct SConfig : NonCopyable
std::string m_strApploader; std::string m_strApploader;
std::string m_strGameID; std::string m_strGameID;
u64 m_title_id; u64 m_title_id;
std::string m_strName;
std::string m_strWiiSDCardPath; std::string m_strWiiSDCardPath;
u16 m_revision; u16 m_revision;

View File

@ -145,8 +145,6 @@ void TitleContext::Update(const IOS::ES::TMDReader& tmd_, const IOS::ES::TicketR
void TitleContext::UpdateRunningGame() const void TitleContext::UpdateRunningGame() const
{ {
// This one does not always make sense for Wii titles, so let's reset it back to a sane value.
SConfig::GetInstance().m_strName = "";
if (IOS::ES::IsTitleType(tmd.GetTitleId(), IOS::ES::TitleType::Game) || if (IOS::ES::IsTitleType(tmd.GetTitleId(), IOS::ES::TitleType::Game) ||
IOS::ES::IsTitleType(tmd.GetTitleId(), IOS::ES::TitleType::GameWithChannel)) IOS::ES::IsTitleType(tmd.GetTitleId(), IOS::ES::TitleType::GameWithChannel))
{ {

View File

@ -126,7 +126,6 @@ static void UpdateRunningGame()
DVDThread::WaitUntilIdle(); DVDThread::WaitUntilIdle();
const DiscIO::IVolume& volume = DVDInterface::GetVolume(); const DiscIO::IVolume& volume = DVDInterface::GetVolume();
SConfig::GetInstance().m_BootType = SConfig::BOOT_MIOS; SConfig::GetInstance().m_BootType = SConfig::BOOT_MIOS;
SConfig::GetInstance().m_strName = volume.GetInternalName();
SConfig::GetInstance().m_strGameID = volume.GetGameID(); SConfig::GetInstance().m_strGameID = volume.GetGameID();
SConfig::GetInstance().m_revision = volume.GetRevision(); SConfig::GetInstance().m_revision = volume.GetRevision();
@ -135,8 +134,7 @@ static void UpdateRunningGame()
::HLE::Clear(); ::HLE::Clear();
::HLE::PatchFunctions(); ::HLE::PatchFunctions();
NOTICE_LOG(IOS, "Running game: %s (%s)", SConfig::GetInstance().m_strName.c_str(), NOTICE_LOG(IOS, "Running game: %s", SConfig::GetInstance().m_strGameID.c_str());
SConfig::GetInstance().m_strGameID.c_str());
} }
constexpr u32 ADDRESS_INIT_SEMAPHORE = 0x30f8; constexpr u32 ADDRESS_INIT_SEMAPHORE = 0x30f8;

View File

@ -190,7 +190,7 @@ void wxCheatsWindow::UpdateGUI()
// write the ISO name in the title // write the ISO name in the title
if (Core::IsRunning()) if (Core::IsRunning())
SetTitle(title + StrToWxStr(": " + m_game_id + " - " + parameters.m_strName)); SetTitle(title + StrToWxStr(": " + m_game_id));
else else
SetTitle(title); SetTitle(title);
} }