Esempio n. 1
0
void MainMenuBar::RefreshWiiSystemMenuLabel() const
{
  auto* const item = FindItem(IDM_LOAD_WII_MENU);

  if (Core::IsRunning())
  {
    item->Enable(false);
    for (const int idm : {IDM_PERFORM_ONLINE_UPDATE_CURRENT, IDM_PERFORM_ONLINE_UPDATE_EUR,
      IDM_PERFORM_ONLINE_UPDATE_JPN, IDM_PERFORM_ONLINE_UPDATE_KOR,
      IDM_PERFORM_ONLINE_UPDATE_USA})
    {
      FindItem(idm)->Enable(false);
    }
    return;
  }

  IOS::HLE::Kernel ios;
  const IOS::ES::TMDReader sys_menu_tmd = ios.GetES()->FindInstalledTMD(Titles::SYSTEM_MENU);
  if (sys_menu_tmd.IsValid())
  {
    const u16 version_number = sys_menu_tmd.GetTitleVersion();
    const wxString version_string = StrToWxStr(DiscIO::GetSysMenuVersionString(version_number));
    item->Enable();
    item->SetItemLabel(wxString::Format(_("Load Wii System Menu %s"), version_string));
    EnableUpdateMenu(UpdateMenuMode::CurrentRegionOnly);
  }
  else
  {
    item->Enable(false);
    item->SetItemLabel(_("Load Wii System Menu"));
    EnableUpdateMenu(UpdateMenuMode::SpecificRegionsOnly);
  }
}
Esempio n. 2
0
void SConfig::SetRunningGameMetadata(const IOS::ES::TMDReader& tmd)
{
  const u64 tmd_title_id = tmd.GetTitleId();

  // If we're launching a disc game, we want to read the revision from
  // the disc header instead of the TMD. They can differ.
  // (IOS HLE ES calls us with a TMDReader rather than a volume when launching
  // a disc game, because ES has no reason to be accessing the disc directly.)
  if (!DVDInterface::UpdateRunningGameMetadata(tmd_title_id))
  {
    // If not launching a disc game, just read everything from the TMD.
    const DiscIO::Country country =
        DiscIO::CountryCodeToCountry(static_cast<u8>(tmd_title_id), DiscIO::Platform::WiiWAD,
                                     tmd.GetRegion(), tmd.GetTitleVersion());
    SetRunningGameMetadata(tmd.GetGameID(), tmd.GetGameTDBID(), tmd_title_id, tmd.GetTitleVersion(),
                           country);
  }
}
Esempio n. 3
0
void SConfig::SetRunningGameMetadata(const IOS::ES::TMDReader& tmd)
{
  const u64 tmd_title_id = tmd.GetTitleId();

  // If we're launching a disc game, we want to read the revision from
  // the disc header instead of the TMD. They can differ.
  // (IOS HLE ES calls us with a TMDReader rather than a volume when launching
  // a disc game, because ES has no reason to be accessing the disc directly.)
  if (!DVDInterface::UpdateRunningGameMetadata(tmd_title_id))
  {
    // If not launching a disc game, just read everything from the TMD.
    SetRunningGameMetadata(tmd.GetGameID(), tmd_title_id, tmd.GetTitleVersion(),
                           Core::TitleDatabase::TitleType::Channel);
  }
}