mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Volume: Return volume type as an enum
ISOFile and GameFile were using IsWiiDisc() and IsWadFile() to set an enum value. The volume might as well return an enum directly. I increased the Qt CACHE_REVISION because m_platform now is saved as u32 instead of int, but increasing the wx CACHE_REVISION is not necessary.
This commit is contained in:
@ -85,8 +85,8 @@ static int CompareGameListItems(const GameListItem* iso1, const GameListItem* is
|
||||
sortData = -sortData;
|
||||
}
|
||||
|
||||
DiscIO::IVolume::ELanguage languageOne = SConfig::GetInstance().m_LocalCoreStartupParameter.GetCurrentLanguage(iso1->GetPlatform() != GameListItem::GAMECUBE_DISC);
|
||||
DiscIO::IVolume::ELanguage languageOther = SConfig::GetInstance().m_LocalCoreStartupParameter.GetCurrentLanguage(iso2->GetPlatform() != GameListItem::GAMECUBE_DISC);
|
||||
DiscIO::IVolume::ELanguage languageOne = SConfig::GetInstance().m_LocalCoreStartupParameter.GetCurrentLanguage(iso1->GetPlatform() != DiscIO::IVolume::GAMECUBE_DISC);
|
||||
DiscIO::IVolume::ELanguage languageOther = SConfig::GetInstance().m_LocalCoreStartupParameter.GetCurrentLanguage(iso2->GetPlatform() != DiscIO::IVolume::GAMECUBE_DISC);
|
||||
|
||||
switch (sortData)
|
||||
{
|
||||
@ -519,11 +519,11 @@ void CGameListCtrl::ScanForISOs()
|
||||
|
||||
switch(iso_file->GetPlatform())
|
||||
{
|
||||
case GameListItem::WII_DISC:
|
||||
case DiscIO::IVolume::WII_DISC:
|
||||
if (!SConfig::GetInstance().m_ListWii)
|
||||
list = false;
|
||||
break;
|
||||
case GameListItem::WII_WAD:
|
||||
case DiscIO::IVolume::WII_WAD:
|
||||
if (!SConfig::GetInstance().m_ListWad)
|
||||
list = false;
|
||||
break;
|
||||
@ -842,7 +842,7 @@ void CGameListCtrl::OnRightClick(wxMouseEvent& event)
|
||||
popupMenu.Append(IDM_GAME_WIKI, _("&Wiki"));
|
||||
popupMenu.AppendSeparator();
|
||||
|
||||
if (selected_iso->GetPlatform() != GameListItem::GAMECUBE_DISC)
|
||||
if (selected_iso->GetPlatform() != DiscIO::IVolume::GAMECUBE_DISC)
|
||||
{
|
||||
popupMenu.Append(IDM_OPEN_SAVE_FOLDER, _("Open Wii &save folder"));
|
||||
popupMenu.Append(IDM_EXPORT_SAVE, _("Export Wii save (Experimental)"));
|
||||
@ -858,7 +858,7 @@ void CGameListCtrl::OnRightClick(wxMouseEvent& event)
|
||||
popupMenu.AppendSeparator();
|
||||
popupMenu.Append(IDM_DELETE_ISO, _("&Delete ISO..."));
|
||||
|
||||
if (selected_iso->GetPlatform() != GameListItem::WII_WAD)
|
||||
if (selected_iso->GetPlatform() != DiscIO::IVolume::WII_WAD)
|
||||
{
|
||||
if (selected_iso->IsCompressed())
|
||||
popupMenu.Append(IDM_COMPRESS_ISO, _("Decompress ISO..."));
|
||||
@ -870,8 +870,8 @@ void CGameListCtrl::OnRightClick(wxMouseEvent& event)
|
||||
{
|
||||
popupMenu.Append(IDM_LIST_INSTALL_WAD, _("Install to Wii Menu"));
|
||||
}
|
||||
if (selected_iso->GetPlatform() == GameListItem::GAMECUBE_DISC ||
|
||||
selected_iso->GetPlatform() == GameListItem::WII_DISC)
|
||||
if (selected_iso->GetPlatform() == DiscIO::IVolume::GAMECUBE_DISC ||
|
||||
selected_iso->GetPlatform() == DiscIO::IVolume::WII_DISC)
|
||||
{
|
||||
wxMenuItem* changeDiscItem = popupMenu.Append(IDM_LIST_CHANGE_DISC, _("Change &Disc"));
|
||||
changeDiscItem->Enable(Core::IsRunning());
|
||||
@ -1079,7 +1079,7 @@ void CGameListCtrl::CompressSelection(bool _compress)
|
||||
for (u32 i = 0; i < m_numberItem; i++)
|
||||
{
|
||||
const GameListItem* iso = GetSelectedISO();
|
||||
if (iso->GetPlatform() == GameListItem::WII_WAD || iso->GetFileName().rfind(".wbfs") != std::string::npos)
|
||||
if (iso->GetPlatform() == DiscIO::IVolume::WII_WAD || iso->GetFileName().rfind(".wbfs") != std::string::npos)
|
||||
continue;
|
||||
|
||||
if (!iso->IsCompressed() && _compress)
|
||||
@ -1104,7 +1104,7 @@ void CGameListCtrl::CompressSelection(bool _compress)
|
||||
|
||||
all_good &= DiscIO::CompressFileToBlob(iso->GetFileName(),
|
||||
OutputFileName,
|
||||
(iso->GetPlatform() == GameListItem::WII_DISC) ? 1 : 0,
|
||||
(iso->GetPlatform() == DiscIO::IVolume::WII_DISC) ? 1 : 0,
|
||||
16384, &MultiCompressCB, &progressDialog);
|
||||
}
|
||||
else if (iso->IsCompressed() && !_compress)
|
||||
@ -1112,7 +1112,7 @@ void CGameListCtrl::CompressSelection(bool _compress)
|
||||
std::string FileName, FileExt;
|
||||
SplitPath(iso->GetFileName(), nullptr, &FileName, &FileExt);
|
||||
m_currentFilename = FileName;
|
||||
if (iso->GetPlatform() == GameListItem::WII_DISC)
|
||||
if (iso->GetPlatform() == DiscIO::IVolume::WII_DISC)
|
||||
FileName.append(".iso");
|
||||
else
|
||||
FileName.append(".gcm");
|
||||
@ -1165,7 +1165,7 @@ void CGameListCtrl::OnCompressISO(wxCommandEvent& WXUNUSED (event))
|
||||
if (iso->IsCompressed())
|
||||
{
|
||||
wxString FileType;
|
||||
if (iso->GetPlatform() == GameListItem::WII_DISC)
|
||||
if (iso->GetPlatform() == DiscIO::IVolume::WII_DISC)
|
||||
FileType = _("All Wii ISO files (iso)") + "|*.iso";
|
||||
else
|
||||
FileType = _("All GameCube GCM files (gcm)") + "|*.gcm";
|
||||
@ -1220,7 +1220,7 @@ void CGameListCtrl::OnCompressISO(wxCommandEvent& WXUNUSED (event))
|
||||
else
|
||||
all_good = DiscIO::CompressFileToBlob(iso->GetFileName(),
|
||||
WxStrToStr(path),
|
||||
(iso->GetPlatform() == GameListItem::WII_DISC) ? 1 : 0,
|
||||
(iso->GetPlatform() == DiscIO::IVolume::WII_DISC) ? 1 : 0,
|
||||
16384, &CompressCB, &dialog);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user