mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-31 01:59:52 -06:00
Move DiscIO enums to a new file
At first there weren't many enums in Volume.h, but the number has been growing, and I'm planning to add one more for regions. To not make Volume.h too large, and to avoid needing to include Volume.h in code that doesn't use volume objects, I'm moving the enums to a new file. I'm also turning them into enum classes while I'm at it.
This commit is contained in:
@ -11,7 +11,7 @@
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE.h"
|
||||
#include "DiscIO/Volume.h"
|
||||
#include "DiscIO/Enums.h"
|
||||
#include "DolphinWX/Config/WiiConfigPane.h"
|
||||
#include "DolphinWX/WxUtils.h"
|
||||
|
||||
@ -139,8 +139,8 @@ void WiiConfigPane::OnConnectKeyboardCheckBoxChanged(wxCommandEvent& event)
|
||||
|
||||
void WiiConfigPane::OnSystemLanguageChoiceChanged(wxCommandEvent& event)
|
||||
{
|
||||
DiscIO::IVolume::ELanguage wii_system_lang =
|
||||
(DiscIO::IVolume::ELanguage)m_system_language_choice->GetSelection();
|
||||
DiscIO::Language wii_system_lang =
|
||||
static_cast<DiscIO::Language>(m_system_language_choice->GetSelection());
|
||||
SConfig::GetInstance().m_SYSCONF->SetData("IPL.LNG", wii_system_lang);
|
||||
u8 country_code = GetSADRCountryCode(wii_system_lang);
|
||||
|
||||
@ -155,30 +155,30 @@ void WiiConfigPane::OnAspectRatioChoiceChanged(wxCommandEvent& event)
|
||||
|
||||
// Change from IPL.LNG value to IPL.SADR country code.
|
||||
// http://wiibrew.org/wiki/Country_Codes
|
||||
u8 WiiConfigPane::GetSADRCountryCode(DiscIO::IVolume::ELanguage language)
|
||||
u8 WiiConfigPane::GetSADRCountryCode(DiscIO::Language language)
|
||||
{
|
||||
switch (language)
|
||||
{
|
||||
case DiscIO::IVolume::LANGUAGE_JAPANESE:
|
||||
case DiscIO::Language::LANGUAGE_JAPANESE:
|
||||
return 1; // Japan
|
||||
case DiscIO::IVolume::LANGUAGE_ENGLISH:
|
||||
case DiscIO::Language::LANGUAGE_ENGLISH:
|
||||
return 49; // USA
|
||||
case DiscIO::IVolume::LANGUAGE_GERMAN:
|
||||
case DiscIO::Language::LANGUAGE_GERMAN:
|
||||
return 78; // Germany
|
||||
case DiscIO::IVolume::LANGUAGE_FRENCH:
|
||||
case DiscIO::Language::LANGUAGE_FRENCH:
|
||||
return 77; // France
|
||||
case DiscIO::IVolume::LANGUAGE_SPANISH:
|
||||
case DiscIO::Language::LANGUAGE_SPANISH:
|
||||
return 105; // Spain
|
||||
case DiscIO::IVolume::LANGUAGE_ITALIAN:
|
||||
case DiscIO::Language::LANGUAGE_ITALIAN:
|
||||
return 83; // Italy
|
||||
case DiscIO::IVolume::LANGUAGE_DUTCH:
|
||||
case DiscIO::Language::LANGUAGE_DUTCH:
|
||||
return 94; // Netherlands
|
||||
case DiscIO::IVolume::LANGUAGE_SIMPLIFIED_CHINESE:
|
||||
case DiscIO::IVolume::LANGUAGE_TRADITIONAL_CHINESE:
|
||||
case DiscIO::Language::LANGUAGE_SIMPLIFIED_CHINESE:
|
||||
case DiscIO::Language::LANGUAGE_TRADITIONAL_CHINESE:
|
||||
return 157; // China
|
||||
case DiscIO::IVolume::LANGUAGE_KOREAN:
|
||||
case DiscIO::Language::LANGUAGE_KOREAN:
|
||||
return 136; // Korea
|
||||
case DiscIO::IVolume::LANGUAGE_UNKNOWN:
|
||||
case DiscIO::Language::LANGUAGE_UNKNOWN:
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,11 @@
|
||||
#include <wx/arrstr.h>
|
||||
#include <wx/panel.h>
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "DiscIO/Volume.h"
|
||||
|
||||
namespace DiscIO
|
||||
{
|
||||
enum class Language;
|
||||
}
|
||||
|
||||
class wxCheckBox;
|
||||
class wxChoice;
|
||||
@ -29,7 +33,7 @@ private:
|
||||
void OnSystemLanguageChoiceChanged(wxCommandEvent&);
|
||||
void OnAspectRatioChoiceChanged(wxCommandEvent&);
|
||||
|
||||
static u8 GetSADRCountryCode(DiscIO::IVolume::ELanguage language);
|
||||
static u8 GetSADRCountryCode(DiscIO::Language language);
|
||||
|
||||
wxArrayString m_system_language_strings;
|
||||
wxArrayString m_aspect_ratio_strings;
|
||||
|
@ -45,6 +45,7 @@
|
||||
#include "Core/HW/WiiSaveCrypted.h"
|
||||
#include "Core/Movie.h"
|
||||
#include "DiscIO/Blob.h"
|
||||
#include "DiscIO/Enums.h"
|
||||
#include "DiscIO/Volume.h"
|
||||
#include "DiscIO/VolumeCreator.h"
|
||||
#include "DolphinWX/Frame.h"
|
||||
@ -179,59 +180,48 @@ CGameListCtrl::~CGameListCtrl()
|
||||
ClearIsoFiles();
|
||||
}
|
||||
|
||||
void CGameListCtrl::InitBitmaps()
|
||||
template <typename T>
|
||||
static void InitBitmap(wxImageList* img_list, std::vector<int>* vector, T index,
|
||||
const std::string& name)
|
||||
{
|
||||
wxSize size(96, 32);
|
||||
(*vector)[static_cast<size_t>(index)] = img_list->Add(WxUtils::LoadResourceBitmap(name, size));
|
||||
}
|
||||
|
||||
void CGameListCtrl::InitBitmaps()
|
||||
{
|
||||
wxImageList* img_list = new wxImageList(96, 32);
|
||||
AssignImageList(img_list, wxIMAGE_LIST_SMALL);
|
||||
|
||||
m_FlagImageIndex.resize(DiscIO::IVolume::NUMBER_OF_COUNTRIES);
|
||||
m_FlagImageIndex[DiscIO::IVolume::COUNTRY_JAPAN] =
|
||||
img_list->Add(WxUtils::LoadResourceBitmap("Flag_Japan", size));
|
||||
m_FlagImageIndex[DiscIO::IVolume::COUNTRY_EUROPE] =
|
||||
img_list->Add(WxUtils::LoadResourceBitmap("Flag_Europe", size));
|
||||
m_FlagImageIndex[DiscIO::IVolume::COUNTRY_USA] =
|
||||
img_list->Add(WxUtils::LoadResourceBitmap("Flag_USA", size));
|
||||
m_FlagImageIndex[DiscIO::IVolume::COUNTRY_AUSTRALIA] =
|
||||
img_list->Add(WxUtils::LoadResourceBitmap("Flag_Australia", size));
|
||||
m_FlagImageIndex[DiscIO::IVolume::COUNTRY_FRANCE] =
|
||||
img_list->Add(WxUtils::LoadResourceBitmap("Flag_France", size));
|
||||
m_FlagImageIndex[DiscIO::IVolume::COUNTRY_GERMANY] =
|
||||
img_list->Add(WxUtils::LoadResourceBitmap("Flag_Germany", size));
|
||||
m_FlagImageIndex[DiscIO::IVolume::COUNTRY_ITALY] =
|
||||
img_list->Add(WxUtils::LoadResourceBitmap("Flag_Italy", size));
|
||||
m_FlagImageIndex[DiscIO::IVolume::COUNTRY_KOREA] =
|
||||
img_list->Add(WxUtils::LoadResourceBitmap("Flag_Korea", size));
|
||||
m_FlagImageIndex[DiscIO::IVolume::COUNTRY_NETHERLANDS] =
|
||||
img_list->Add(WxUtils::LoadResourceBitmap("Flag_Netherlands", size));
|
||||
m_FlagImageIndex[DiscIO::IVolume::COUNTRY_RUSSIA] =
|
||||
img_list->Add(WxUtils::LoadResourceBitmap("Flag_Russia", size));
|
||||
m_FlagImageIndex[DiscIO::IVolume::COUNTRY_SPAIN] =
|
||||
img_list->Add(WxUtils::LoadResourceBitmap("Flag_Spain", size));
|
||||
m_FlagImageIndex[DiscIO::IVolume::COUNTRY_TAIWAN] =
|
||||
img_list->Add(WxUtils::LoadResourceBitmap("Flag_Taiwan", size));
|
||||
m_FlagImageIndex[DiscIO::IVolume::COUNTRY_WORLD] =
|
||||
img_list->Add(WxUtils::LoadResourceBitmap("Flag_International", size));
|
||||
m_FlagImageIndex[DiscIO::IVolume::COUNTRY_UNKNOWN] =
|
||||
img_list->Add(WxUtils::LoadResourceBitmap("Flag_Unknown", size));
|
||||
m_FlagImageIndex.resize(static_cast<size_t>(DiscIO::Country::NUMBER_OF_COUNTRIES));
|
||||
InitBitmap(img_list, &m_FlagImageIndex, DiscIO::Country::COUNTRY_JAPAN, "Flag_Japan");
|
||||
InitBitmap(img_list, &m_FlagImageIndex, DiscIO::Country::COUNTRY_EUROPE, "Flag_Europe");
|
||||
InitBitmap(img_list, &m_FlagImageIndex, DiscIO::Country::COUNTRY_USA, "Flag_USA");
|
||||
InitBitmap(img_list, &m_FlagImageIndex, DiscIO::Country::COUNTRY_AUSTRALIA, "Flag_Australia");
|
||||
InitBitmap(img_list, &m_FlagImageIndex, DiscIO::Country::COUNTRY_FRANCE, "Flag_France");
|
||||
InitBitmap(img_list, &m_FlagImageIndex, DiscIO::Country::COUNTRY_GERMANY, "Flag_Germany");
|
||||
InitBitmap(img_list, &m_FlagImageIndex, DiscIO::Country::COUNTRY_ITALY, "Flag_Italy");
|
||||
InitBitmap(img_list, &m_FlagImageIndex, DiscIO::Country::COUNTRY_KOREA, "Flag_Korea");
|
||||
InitBitmap(img_list, &m_FlagImageIndex, DiscIO::Country::COUNTRY_NETHERLANDS, "Flag_Netherlands");
|
||||
InitBitmap(img_list, &m_FlagImageIndex, DiscIO::Country::COUNTRY_RUSSIA, "Flag_Russia");
|
||||
InitBitmap(img_list, &m_FlagImageIndex, DiscIO::Country::COUNTRY_SPAIN, "Flag_Spain");
|
||||
InitBitmap(img_list, &m_FlagImageIndex, DiscIO::Country::COUNTRY_TAIWAN, "Flag_Taiwan");
|
||||
InitBitmap(img_list, &m_FlagImageIndex, DiscIO::Country::COUNTRY_WORLD, "Flag_International");
|
||||
InitBitmap(img_list, &m_FlagImageIndex, DiscIO::Country::COUNTRY_UNKNOWN, "Flag_Unknown");
|
||||
|
||||
m_PlatformImageIndex.resize(4);
|
||||
m_PlatformImageIndex[DiscIO::IVolume::GAMECUBE_DISC] =
|
||||
img_list->Add(WxUtils::LoadResourceBitmap("Platform_Gamecube", size));
|
||||
m_PlatformImageIndex[DiscIO::IVolume::WII_DISC] =
|
||||
img_list->Add(WxUtils::LoadResourceBitmap("Platform_Wii", size));
|
||||
m_PlatformImageIndex[DiscIO::IVolume::WII_WAD] =
|
||||
img_list->Add(WxUtils::LoadResourceBitmap("Platform_Wad", size));
|
||||
m_PlatformImageIndex[DiscIO::IVolume::ELF_DOL] =
|
||||
img_list->Add(WxUtils::LoadResourceBitmap("Platform_File", size));
|
||||
m_PlatformImageIndex.resize(static_cast<size_t>(DiscIO::Platform::NUMBER_OF_PLATFORMS));
|
||||
InitBitmap(img_list, &m_PlatformImageIndex, DiscIO::Platform::GAMECUBE_DISC, "Platform_Gamecube");
|
||||
InitBitmap(img_list, &m_PlatformImageIndex, DiscIO::Platform::WII_DISC, "Platform_Wii");
|
||||
InitBitmap(img_list, &m_PlatformImageIndex, DiscIO::Platform::WII_WAD, "Platform_Wad");
|
||||
InitBitmap(img_list, &m_PlatformImageIndex, DiscIO::Platform::ELF_DOL, "Platform_File");
|
||||
|
||||
m_EmuStateImageIndex.resize(6);
|
||||
m_EmuStateImageIndex[0] = img_list->Add(WxUtils::LoadResourceBitmap("rating0", size));
|
||||
m_EmuStateImageIndex[1] = img_list->Add(WxUtils::LoadResourceBitmap("rating1", size));
|
||||
m_EmuStateImageIndex[2] = img_list->Add(WxUtils::LoadResourceBitmap("rating2", size));
|
||||
m_EmuStateImageIndex[3] = img_list->Add(WxUtils::LoadResourceBitmap("rating3", size));
|
||||
m_EmuStateImageIndex[4] = img_list->Add(WxUtils::LoadResourceBitmap("rating4", size));
|
||||
m_EmuStateImageIndex[5] = img_list->Add(WxUtils::LoadResourceBitmap("rating5", size));
|
||||
InitBitmap(img_list, &m_EmuStateImageIndex, 0, "rating0");
|
||||
InitBitmap(img_list, &m_EmuStateImageIndex, 1, "rating1");
|
||||
InitBitmap(img_list, &m_EmuStateImageIndex, 2, "rating2");
|
||||
InitBitmap(img_list, &m_EmuStateImageIndex, 3, "rating3");
|
||||
InitBitmap(img_list, &m_EmuStateImageIndex, 4, "rating4");
|
||||
InitBitmap(img_list, &m_EmuStateImageIndex, 5, "rating5");
|
||||
}
|
||||
|
||||
void CGameListCtrl::BrowseForDirectory()
|
||||
@ -403,7 +393,8 @@ void CGameListCtrl::UpdateItemAtColumn(long _Index, int column)
|
||||
{
|
||||
case COLUMN_PLATFORM:
|
||||
{
|
||||
SetItemColumnImage(_Index, COLUMN_PLATFORM, m_PlatformImageIndex[rISOFile.GetPlatform()]);
|
||||
SetItemColumnImage(_Index, COLUMN_PLATFORM,
|
||||
m_PlatformImageIndex[static_cast<size_t>(rISOFile.GetPlatform())]);
|
||||
break;
|
||||
}
|
||||
case COLUMN_BANNER:
|
||||
@ -442,7 +433,8 @@ void CGameListCtrl::UpdateItemAtColumn(long _Index, int column)
|
||||
m_EmuStateImageIndex[rISOFile.GetEmuState()]);
|
||||
break;
|
||||
case COLUMN_COUNTRY:
|
||||
SetItemColumnImage(_Index, COLUMN_COUNTRY, m_FlagImageIndex[rISOFile.GetCountry()]);
|
||||
SetItemColumnImage(_Index, COLUMN_COUNTRY,
|
||||
m_FlagImageIndex[static_cast<size_t>(rISOFile.GetCountry())]);
|
||||
break;
|
||||
case COLUMN_SIZE:
|
||||
SetItem(_Index, COLUMN_SIZE, NiceSizeFormat(rISOFile.GetFileSize()), -1);
|
||||
@ -576,15 +568,15 @@ void CGameListCtrl::ScanForISOs()
|
||||
|
||||
switch (iso_file->GetPlatform())
|
||||
{
|
||||
case DiscIO::IVolume::WII_DISC:
|
||||
case DiscIO::Platform::WII_DISC:
|
||||
if (!SConfig::GetInstance().m_ListWii)
|
||||
list = false;
|
||||
break;
|
||||
case DiscIO::IVolume::WII_WAD:
|
||||
case DiscIO::Platform::WII_WAD:
|
||||
if (!SConfig::GetInstance().m_ListWad)
|
||||
list = false;
|
||||
break;
|
||||
case DiscIO::IVolume::ELF_DOL:
|
||||
case DiscIO::Platform::ELF_DOL:
|
||||
if (!SConfig::GetInstance().m_ListElfDol)
|
||||
list = false;
|
||||
break;
|
||||
@ -596,59 +588,59 @@ void CGameListCtrl::ScanForISOs()
|
||||
|
||||
switch (iso_file->GetCountry())
|
||||
{
|
||||
case DiscIO::IVolume::COUNTRY_AUSTRALIA:
|
||||
case DiscIO::Country::COUNTRY_AUSTRALIA:
|
||||
if (!SConfig::GetInstance().m_ListAustralia)
|
||||
list = false;
|
||||
break;
|
||||
case DiscIO::IVolume::COUNTRY_EUROPE:
|
||||
case DiscIO::Country::COUNTRY_EUROPE:
|
||||
if (!SConfig::GetInstance().m_ListPal)
|
||||
list = false;
|
||||
break;
|
||||
case DiscIO::IVolume::COUNTRY_FRANCE:
|
||||
case DiscIO::Country::COUNTRY_FRANCE:
|
||||
if (!SConfig::GetInstance().m_ListFrance)
|
||||
list = false;
|
||||
break;
|
||||
case DiscIO::IVolume::COUNTRY_GERMANY:
|
||||
case DiscIO::Country::COUNTRY_GERMANY:
|
||||
if (!SConfig::GetInstance().m_ListGermany)
|
||||
list = false;
|
||||
break;
|
||||
case DiscIO::IVolume::COUNTRY_ITALY:
|
||||
case DiscIO::Country::COUNTRY_ITALY:
|
||||
if (!SConfig::GetInstance().m_ListItaly)
|
||||
list = false;
|
||||
break;
|
||||
case DiscIO::IVolume::COUNTRY_JAPAN:
|
||||
case DiscIO::Country::COUNTRY_JAPAN:
|
||||
if (!SConfig::GetInstance().m_ListJap)
|
||||
list = false;
|
||||
break;
|
||||
case DiscIO::IVolume::COUNTRY_KOREA:
|
||||
case DiscIO::Country::COUNTRY_KOREA:
|
||||
if (!SConfig::GetInstance().m_ListKorea)
|
||||
list = false;
|
||||
break;
|
||||
case DiscIO::IVolume::COUNTRY_NETHERLANDS:
|
||||
case DiscIO::Country::COUNTRY_NETHERLANDS:
|
||||
if (!SConfig::GetInstance().m_ListNetherlands)
|
||||
list = false;
|
||||
break;
|
||||
case DiscIO::IVolume::COUNTRY_RUSSIA:
|
||||
case DiscIO::Country::COUNTRY_RUSSIA:
|
||||
if (!SConfig::GetInstance().m_ListRussia)
|
||||
list = false;
|
||||
break;
|
||||
case DiscIO::IVolume::COUNTRY_SPAIN:
|
||||
case DiscIO::Country::COUNTRY_SPAIN:
|
||||
if (!SConfig::GetInstance().m_ListSpain)
|
||||
list = false;
|
||||
break;
|
||||
case DiscIO::IVolume::COUNTRY_TAIWAN:
|
||||
case DiscIO::Country::COUNTRY_TAIWAN:
|
||||
if (!SConfig::GetInstance().m_ListTaiwan)
|
||||
list = false;
|
||||
break;
|
||||
case DiscIO::IVolume::COUNTRY_USA:
|
||||
case DiscIO::Country::COUNTRY_USA:
|
||||
if (!SConfig::GetInstance().m_ListUsa)
|
||||
list = false;
|
||||
break;
|
||||
case DiscIO::IVolume::COUNTRY_WORLD:
|
||||
case DiscIO::Country::COUNTRY_WORLD:
|
||||
if (!SConfig::GetInstance().m_ListWorld)
|
||||
list = false;
|
||||
break;
|
||||
case DiscIO::IVolume::COUNTRY_UNKNOWN:
|
||||
case DiscIO::Country::COUNTRY_UNKNOWN:
|
||||
default:
|
||||
if (!SConfig::GetInstance().m_ListUnknown)
|
||||
list = false;
|
||||
@ -937,22 +929,22 @@ void CGameListCtrl::OnRightClick(wxMouseEvent& event)
|
||||
if (selected_iso)
|
||||
{
|
||||
wxMenu popupMenu;
|
||||
DiscIO::IVolume::EPlatform platform = selected_iso->GetPlatform();
|
||||
DiscIO::Platform platform = selected_iso->GetPlatform();
|
||||
|
||||
if (platform != DiscIO::IVolume::ELF_DOL)
|
||||
if (platform != DiscIO::Platform::ELF_DOL)
|
||||
{
|
||||
popupMenu.Append(IDM_PROPERTIES, _("&Properties"));
|
||||
popupMenu.Append(IDM_GAME_WIKI, _("&Wiki"));
|
||||
popupMenu.AppendSeparator();
|
||||
}
|
||||
if (platform == DiscIO::IVolume::WII_DISC || platform == DiscIO::IVolume::WII_WAD)
|
||||
if (platform == DiscIO::Platform::WII_DISC || platform == DiscIO::Platform::WII_WAD)
|
||||
{
|
||||
popupMenu.Append(IDM_OPEN_SAVE_FOLDER, _("Open Wii &save folder"));
|
||||
popupMenu.Append(IDM_EXPORT_SAVE, _("Export Wii save (Experimental)"));
|
||||
}
|
||||
popupMenu.Append(IDM_OPEN_CONTAINING_FOLDER, _("Open &containing folder"));
|
||||
|
||||
if (platform != DiscIO::IVolume::ELF_DOL)
|
||||
if (platform != DiscIO::Platform::ELF_DOL)
|
||||
popupMenu.AppendCheckItem(IDM_SET_DEFAULT_ISO, _("Set as &default ISO"));
|
||||
|
||||
// First we have to decide a starting value when we append it
|
||||
@ -962,7 +954,7 @@ void CGameListCtrl::OnRightClick(wxMouseEvent& event)
|
||||
popupMenu.AppendSeparator();
|
||||
popupMenu.Append(IDM_DELETE_ISO, _("&Delete File..."));
|
||||
|
||||
if (platform == DiscIO::IVolume::GAMECUBE_DISC || platform == DiscIO::IVolume::WII_DISC)
|
||||
if (platform == DiscIO::Platform::GAMECUBE_DISC || platform == DiscIO::Platform::WII_DISC)
|
||||
{
|
||||
if (selected_iso->GetBlobType() == DiscIO::BlobType::GCZ)
|
||||
popupMenu.Append(IDM_COMPRESS_ISO, _("Decompress ISO..."));
|
||||
@ -973,7 +965,7 @@ void CGameListCtrl::OnRightClick(wxMouseEvent& event)
|
||||
changeDiscItem->Enable(Core::IsRunning());
|
||||
}
|
||||
|
||||
if (platform == DiscIO::IVolume::WII_WAD)
|
||||
if (platform == DiscIO::Platform::WII_WAD)
|
||||
popupMenu.Append(IDM_LIST_INSTALL_WAD, _("Install to Wii Menu"));
|
||||
|
||||
PopupMenu(&popupMenu);
|
||||
@ -1156,8 +1148,8 @@ void CGameListCtrl::CompressSelection(bool _compress)
|
||||
for (const GameListItem* iso : GetAllSelectedISOs())
|
||||
{
|
||||
// Don't include items that we can't do anything with
|
||||
if (iso->GetPlatform() != DiscIO::IVolume::GAMECUBE_DISC &&
|
||||
iso->GetPlatform() != DiscIO::IVolume::WII_DISC)
|
||||
if (iso->GetPlatform() != DiscIO::Platform::GAMECUBE_DISC &&
|
||||
iso->GetPlatform() != DiscIO::Platform::WII_DISC)
|
||||
continue;
|
||||
if (iso->GetBlobType() != DiscIO::BlobType::PLAIN &&
|
||||
iso->GetBlobType() != DiscIO::BlobType::GCZ)
|
||||
@ -1167,7 +1159,7 @@ void CGameListCtrl::CompressSelection(bool _compress)
|
||||
|
||||
// Show the Wii compression warning if it's relevant and it hasn't been shown already
|
||||
if (!wii_compression_warning_accepted && _compress && !iso->IsCompressed() &&
|
||||
iso->GetPlatform() == DiscIO::IVolume::WII_DISC)
|
||||
iso->GetPlatform() == DiscIO::Platform::WII_DISC)
|
||||
{
|
||||
if (WiiCompressWarning())
|
||||
wii_compression_warning_accepted = true;
|
||||
@ -1216,7 +1208,7 @@ void CGameListCtrl::CompressSelection(bool _compress)
|
||||
|
||||
all_good &=
|
||||
DiscIO::CompressFileToBlob(iso->GetFileName(), OutputFileName,
|
||||
(iso->GetPlatform() == DiscIO::IVolume::WII_DISC) ? 1 : 0,
|
||||
(iso->GetPlatform() == DiscIO::Platform::WII_DISC) ? 1 : 0,
|
||||
16384, &MultiCompressCB, &progress);
|
||||
}
|
||||
else if (iso->IsCompressed() && !_compress)
|
||||
@ -1224,7 +1216,7 @@ void CGameListCtrl::CompressSelection(bool _compress)
|
||||
std::string FileName;
|
||||
SplitPath(iso->GetFileName(), nullptr, &FileName, nullptr);
|
||||
progress.current_filename = FileName;
|
||||
if (iso->GetPlatform() == DiscIO::IVolume::WII_DISC)
|
||||
if (iso->GetPlatform() == DiscIO::Platform::WII_DISC)
|
||||
FileName.append(".iso");
|
||||
else
|
||||
FileName.append(".gcm");
|
||||
@ -1275,7 +1267,7 @@ void CGameListCtrl::OnCompressISO(wxCommandEvent& WXUNUSED(event))
|
||||
if (is_compressed)
|
||||
{
|
||||
wxString FileType;
|
||||
if (iso->GetPlatform() == DiscIO::IVolume::WII_DISC)
|
||||
if (iso->GetPlatform() == DiscIO::Platform::WII_DISC)
|
||||
FileType = _("All Wii ISO files (iso)") + "|*.iso";
|
||||
else
|
||||
FileType = _("All GameCube GCM files (gcm)") + "|*.gcm";
|
||||
@ -1286,7 +1278,7 @@ void CGameListCtrl::OnCompressISO(wxCommandEvent& WXUNUSED(event))
|
||||
}
|
||||
else
|
||||
{
|
||||
if (iso->GetPlatform() == DiscIO::IVolume::WII_DISC && !WiiCompressWarning())
|
||||
if (iso->GetPlatform() == DiscIO::Platform::WII_DISC && !WiiCompressWarning())
|
||||
return;
|
||||
|
||||
path = wxFileSelector(_("Save compressed GCM/ISO"), StrToWxStr(FilePath),
|
||||
@ -1317,7 +1309,7 @@ void CGameListCtrl::OnCompressISO(wxCommandEvent& WXUNUSED(event))
|
||||
else
|
||||
all_good = DiscIO::CompressFileToBlob(
|
||||
iso->GetFileName(), WxStrToStr(path),
|
||||
(iso->GetPlatform() == DiscIO::IVolume::WII_DISC) ? 1 : 0, 16384, &CompressCB, &dialog);
|
||||
(iso->GetPlatform() == DiscIO::Platform::WII_DISC) ? 1 : 0, 16384, &CompressCB, &dialog);
|
||||
}
|
||||
|
||||
if (!all_good)
|
||||
|
@ -28,6 +28,8 @@
|
||||
#include "Core/Boot/Boot.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
|
||||
#include "DiscIO/Blob.h"
|
||||
#include "DiscIO/Enums.h"
|
||||
#include "DiscIO/Volume.h"
|
||||
#include "DiscIO/VolumeCreator.h"
|
||||
|
||||
@ -39,8 +41,8 @@ static const u32 CACHE_REVISION = 0x127; // Last changed in PR 3309
|
||||
#define DVD_BANNER_WIDTH 96
|
||||
#define DVD_BANNER_HEIGHT 32
|
||||
|
||||
static std::string GetLanguageString(DiscIO::IVolume::ELanguage language,
|
||||
std::map<DiscIO::IVolume::ELanguage, std::string> strings)
|
||||
static std::string GetLanguageString(DiscIO::Language language,
|
||||
std::map<DiscIO::Language, std::string> strings)
|
||||
{
|
||||
auto end = strings.end();
|
||||
auto it = strings.find(language);
|
||||
@ -48,9 +50,9 @@ static std::string GetLanguageString(DiscIO::IVolume::ELanguage language,
|
||||
return it->second;
|
||||
|
||||
// English tends to be a good fallback when the requested language isn't available
|
||||
if (language != DiscIO::IVolume::ELanguage::LANGUAGE_ENGLISH)
|
||||
if (language != DiscIO::Language::LANGUAGE_ENGLISH)
|
||||
{
|
||||
it = strings.find(DiscIO::IVolume::ELanguage::LANGUAGE_ENGLISH);
|
||||
it = strings.find(DiscIO::Language::LANGUAGE_ENGLISH);
|
||||
if (it != end)
|
||||
return it->second;
|
||||
}
|
||||
@ -65,7 +67,7 @@ static std::string GetLanguageString(DiscIO::IVolume::ELanguage language,
|
||||
GameListItem::GameListItem(const std::string& _rFileName,
|
||||
const std::unordered_map<std::string, std::string>& custom_titles)
|
||||
: m_FileName(_rFileName), m_title_id(0), m_emu_state(0), m_FileSize(0),
|
||||
m_Country(DiscIO::IVolume::COUNTRY_UNKNOWN), m_Revision(0), m_Valid(false), m_ImageWidth(0),
|
||||
m_Country(DiscIO::Country::COUNTRY_UNKNOWN), m_Revision(0), m_Valid(false), m_ImageWidth(0),
|
||||
m_ImageHeight(0), m_disc_number(0), m_has_custom_name(false)
|
||||
{
|
||||
if (LoadFromCache())
|
||||
@ -96,9 +98,9 @@ GameListItem::GameListItem(const std::string& _rFileName,
|
||||
m_names = volume->GetLongNames();
|
||||
if (m_names.empty())
|
||||
m_names = volume->GetShortNames();
|
||||
m_company = GetLanguageString(DiscIO::IVolume::LANGUAGE_ENGLISH, volume->GetLongMakers());
|
||||
m_company = GetLanguageString(DiscIO::Language::LANGUAGE_ENGLISH, volume->GetLongMakers());
|
||||
if (m_company.empty())
|
||||
m_company = GetLanguageString(DiscIO::IVolume::LANGUAGE_ENGLISH, volume->GetShortMakers());
|
||||
m_company = GetLanguageString(DiscIO::Language::LANGUAGE_ENGLISH, volume->GetShortMakers());
|
||||
|
||||
m_Country = volume->GetCountry();
|
||||
m_blob_type = volume->GetBlobType();
|
||||
@ -126,7 +128,7 @@ GameListItem::GameListItem(const std::string& _rFileName,
|
||||
std::string game_id = m_UniqueID;
|
||||
|
||||
// Ignore publisher ID for WAD files
|
||||
if (m_Platform == DiscIO::IVolume::WII_WAD && game_id.size() > 4)
|
||||
if (m_Platform == DiscIO::Platform::WII_WAD && game_id.size() > 4)
|
||||
game_id.erase(4);
|
||||
|
||||
auto it = custom_titles.find(game_id);
|
||||
@ -142,7 +144,7 @@ GameListItem::GameListItem(const std::string& _rFileName,
|
||||
{
|
||||
m_Valid = true;
|
||||
m_FileSize = File::GetSize(_rFileName);
|
||||
m_Platform = DiscIO::IVolume::ELF_DOL;
|
||||
m_Platform = DiscIO::Platform::ELF_DOL;
|
||||
m_blob_type = DiscIO::BlobType::DIRECTORY;
|
||||
}
|
||||
|
||||
@ -296,18 +298,18 @@ wxBitmap GameListItem::ScaleBanner(wxImage* image)
|
||||
#endif
|
||||
}
|
||||
|
||||
std::string GameListItem::GetDescription(DiscIO::IVolume::ELanguage language) const
|
||||
std::string GameListItem::GetDescription(DiscIO::Language language) const
|
||||
{
|
||||
return GetLanguageString(language, m_descriptions);
|
||||
}
|
||||
|
||||
std::string GameListItem::GetDescription() const
|
||||
{
|
||||
bool wii = m_Platform != DiscIO::IVolume::GAMECUBE_DISC;
|
||||
bool wii = m_Platform != DiscIO::Platform::GAMECUBE_DISC;
|
||||
return GetDescription(SConfig::GetInstance().GetCurrentLanguage(wii));
|
||||
}
|
||||
|
||||
std::string GameListItem::GetName(DiscIO::IVolume::ELanguage language) const
|
||||
std::string GameListItem::GetName(DiscIO::Language language) const
|
||||
{
|
||||
return GetLanguageString(language, m_names);
|
||||
}
|
||||
@ -317,7 +319,7 @@ std::string GameListItem::GetName() const
|
||||
if (m_has_custom_name)
|
||||
return m_custom_name;
|
||||
|
||||
bool wii = m_Platform != DiscIO::IVolume::GAMECUBE_DISC;
|
||||
bool wii = m_Platform != DiscIO::Platform::GAMECUBE_DISC;
|
||||
std::string name = GetName(SConfig::GetInstance().GetCurrentLanguage(wii));
|
||||
if (!name.empty())
|
||||
return name;
|
||||
@ -328,10 +330,10 @@ std::string GameListItem::GetName() const
|
||||
return name + ext;
|
||||
}
|
||||
|
||||
std::vector<DiscIO::IVolume::ELanguage> GameListItem::GetLanguages() const
|
||||
std::vector<DiscIO::Language> GameListItem::GetLanguages() const
|
||||
{
|
||||
std::vector<DiscIO::IVolume::ELanguage> languages;
|
||||
for (std::pair<DiscIO::IVolume::ELanguage, std::string> name : m_names)
|
||||
std::vector<DiscIO::Language> languages;
|
||||
for (std::pair<DiscIO::Language, std::string> name : m_names)
|
||||
languages.push_back(name.first);
|
||||
return languages;
|
||||
}
|
||||
@ -344,7 +346,7 @@ const std::string GameListItem::GetWiiFSPath() const
|
||||
if (iso == nullptr)
|
||||
return ret;
|
||||
|
||||
if (iso->GetVolumeType() != DiscIO::IVolume::GAMECUBE_DISC)
|
||||
if (iso->GetVolumeType() != DiscIO::Platform::GAMECUBE_DISC)
|
||||
{
|
||||
u64 title_id = 0;
|
||||
iso->GetTitleID(&title_id);
|
||||
@ -364,3 +366,9 @@ const std::string GameListItem::GetWiiFSPath() const
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool GameListItem::IsCompressed() const
|
||||
{
|
||||
return m_blob_type == DiscIO::BlobType::GCZ || m_blob_type == DiscIO::BlobType::CISO ||
|
||||
m_blob_type == DiscIO::BlobType::WBFS;
|
||||
}
|
||||
|
@ -10,15 +10,22 @@
|
||||
#include <vector>
|
||||
|
||||
#include "Common/Common.h"
|
||||
#include "DiscIO/Blob.h"
|
||||
#include "DiscIO/Volume.h"
|
||||
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
#include <wx/bitmap.h>
|
||||
#include <wx/image.h>
|
||||
#endif
|
||||
|
||||
namespace DiscIO
|
||||
{
|
||||
enum class BlobType;
|
||||
enum class Country;
|
||||
enum class Language;
|
||||
enum class Platform;
|
||||
}
|
||||
|
||||
class PointerWrap;
|
||||
|
||||
class GameListItem
|
||||
{
|
||||
public:
|
||||
@ -31,25 +38,21 @@ public:
|
||||
|
||||
bool IsValid() const { return m_Valid; }
|
||||
const std::string& GetFileName() const { return m_FileName; }
|
||||
std::string GetName(DiscIO::IVolume::ELanguage language) const;
|
||||
std::string GetName(DiscIO::Language language) const;
|
||||
std::string GetName() const;
|
||||
std::string GetDescription(DiscIO::IVolume::ELanguage language) const;
|
||||
std::string GetDescription(DiscIO::Language language) const;
|
||||
std::string GetDescription() const;
|
||||
std::vector<DiscIO::IVolume::ELanguage> GetLanguages() const;
|
||||
std::vector<DiscIO::Language> GetLanguages() const;
|
||||
std::string GetCompany() const { return m_company; }
|
||||
u16 GetRevision() const { return m_Revision; }
|
||||
const std::string& GetUniqueID() const { return m_UniqueID; }
|
||||
const std::string GetWiiFSPath() const;
|
||||
DiscIO::IVolume::ECountry GetCountry() const { return m_Country; }
|
||||
DiscIO::IVolume::EPlatform GetPlatform() const { return m_Platform; }
|
||||
DiscIO::Country GetCountry() const { return m_Country; }
|
||||
DiscIO::Platform GetPlatform() const { return m_Platform; }
|
||||
DiscIO::BlobType GetBlobType() const { return m_blob_type; }
|
||||
const std::string& GetIssues() const { return m_issues; }
|
||||
int GetEmuState() const { return m_emu_state; }
|
||||
bool IsCompressed() const
|
||||
{
|
||||
return m_blob_type == DiscIO::BlobType::GCZ || m_blob_type == DiscIO::BlobType::CISO ||
|
||||
m_blob_type == DiscIO::BlobType::WBFS;
|
||||
}
|
||||
bool IsCompressed() const;
|
||||
u64 GetFileSize() const { return m_FileSize; }
|
||||
u64 GetVolumeSize() const { return m_VolumeSize; }
|
||||
// 0 is the first disc, 1 is the second disc
|
||||
@ -63,8 +66,8 @@ public:
|
||||
private:
|
||||
std::string m_FileName;
|
||||
|
||||
std::map<DiscIO::IVolume::ELanguage, std::string> m_names;
|
||||
std::map<DiscIO::IVolume::ELanguage, std::string> m_descriptions;
|
||||
std::map<DiscIO::Language, std::string> m_names;
|
||||
std::map<DiscIO::Language, std::string> m_descriptions;
|
||||
std::string m_company;
|
||||
|
||||
std::string m_UniqueID;
|
||||
@ -76,8 +79,8 @@ private:
|
||||
u64 m_FileSize;
|
||||
u64 m_VolumeSize;
|
||||
|
||||
DiscIO::IVolume::ECountry m_Country;
|
||||
DiscIO::IVolume::EPlatform m_Platform;
|
||||
DiscIO::Country m_Country;
|
||||
DiscIO::Platform m_Platform;
|
||||
DiscIO::BlobType m_blob_type;
|
||||
u16 m_Revision;
|
||||
|
||||
|
@ -59,6 +59,7 @@
|
||||
#include "Core/GeckoCodeConfig.h"
|
||||
#include "Core/PatchEngine.h"
|
||||
#include "DiscIO/Blob.h"
|
||||
#include "DiscIO/Enums.h"
|
||||
#include "DiscIO/Filesystem.h"
|
||||
#include "DiscIO/Volume.h"
|
||||
#include "DiscIO/VolumeCreator.h"
|
||||
@ -123,46 +124,46 @@ CISOProperties::CISOProperties(const GameListItem& game_list_item, wxWindow* par
|
||||
m_GameID->SetValue(StrToWxStr(m_open_iso->GetUniqueID()));
|
||||
switch (m_open_iso->GetCountry())
|
||||
{
|
||||
case DiscIO::IVolume::COUNTRY_AUSTRALIA:
|
||||
case DiscIO::Country::COUNTRY_AUSTRALIA:
|
||||
m_Country->SetValue(_("Australia"));
|
||||
break;
|
||||
case DiscIO::IVolume::COUNTRY_EUROPE:
|
||||
case DiscIO::Country::COUNTRY_EUROPE:
|
||||
m_Country->SetValue(_("Europe"));
|
||||
break;
|
||||
case DiscIO::IVolume::COUNTRY_FRANCE:
|
||||
case DiscIO::Country::COUNTRY_FRANCE:
|
||||
m_Country->SetValue(_("France"));
|
||||
break;
|
||||
case DiscIO::IVolume::COUNTRY_ITALY:
|
||||
case DiscIO::Country::COUNTRY_ITALY:
|
||||
m_Country->SetValue(_("Italy"));
|
||||
break;
|
||||
case DiscIO::IVolume::COUNTRY_GERMANY:
|
||||
case DiscIO::Country::COUNTRY_GERMANY:
|
||||
m_Country->SetValue(_("Germany"));
|
||||
break;
|
||||
case DiscIO::IVolume::COUNTRY_NETHERLANDS:
|
||||
case DiscIO::Country::COUNTRY_NETHERLANDS:
|
||||
m_Country->SetValue(_("Netherlands"));
|
||||
break;
|
||||
case DiscIO::IVolume::COUNTRY_RUSSIA:
|
||||
case DiscIO::Country::COUNTRY_RUSSIA:
|
||||
m_Country->SetValue(_("Russia"));
|
||||
break;
|
||||
case DiscIO::IVolume::COUNTRY_SPAIN:
|
||||
case DiscIO::Country::COUNTRY_SPAIN:
|
||||
m_Country->SetValue(_("Spain"));
|
||||
break;
|
||||
case DiscIO::IVolume::COUNTRY_USA:
|
||||
case DiscIO::Country::COUNTRY_USA:
|
||||
m_Country->SetValue(_("USA"));
|
||||
break;
|
||||
case DiscIO::IVolume::COUNTRY_JAPAN:
|
||||
case DiscIO::Country::COUNTRY_JAPAN:
|
||||
m_Country->SetValue(_("Japan"));
|
||||
break;
|
||||
case DiscIO::IVolume::COUNTRY_KOREA:
|
||||
case DiscIO::Country::COUNTRY_KOREA:
|
||||
m_Country->SetValue(_("Korea"));
|
||||
break;
|
||||
case DiscIO::IVolume::COUNTRY_TAIWAN:
|
||||
case DiscIO::Country::COUNTRY_TAIWAN:
|
||||
m_Country->SetValue(_("Taiwan"));
|
||||
break;
|
||||
case DiscIO::IVolume::COUNTRY_WORLD:
|
||||
case DiscIO::Country::COUNTRY_WORLD:
|
||||
m_Country->SetValue(_("World"));
|
||||
break;
|
||||
case DiscIO::IVolume::COUNTRY_UNKNOWN:
|
||||
case DiscIO::Country::COUNTRY_UNKNOWN:
|
||||
default:
|
||||
m_Country->SetValue(_("Unknown"));
|
||||
break;
|
||||
@ -175,7 +176,7 @@ CISOProperties::CISOProperties(const GameListItem& game_list_item, wxWindow* par
|
||||
m_FST->SetValue(StrToWxStr(std::to_string(m_open_iso->GetFSTSize())));
|
||||
|
||||
// Here we set all the info to be shown + we set the window title
|
||||
bool wii = m_open_iso->GetVolumeType() != DiscIO::IVolume::GAMECUBE_DISC;
|
||||
bool wii = m_open_iso->GetVolumeType() != DiscIO::Platform::GAMECUBE_DISC;
|
||||
ChangeBannerDetails(SConfig::GetInstance().GetCurrentLanguage(wii));
|
||||
|
||||
m_Banner->SetBitmap(OpenGameListItem.GetBitmap());
|
||||
@ -183,9 +184,9 @@ CISOProperties::CISOProperties(const GameListItem& game_list_item, wxWindow* par
|
||||
|
||||
// Filesystem browser/dumper
|
||||
// TODO : Should we add a way to browse the wad file ?
|
||||
if (m_open_iso->GetVolumeType() != DiscIO::IVolume::WII_WAD)
|
||||
if (m_open_iso->GetVolumeType() != DiscIO::Platform::WII_WAD)
|
||||
{
|
||||
if (m_open_iso->GetVolumeType() == DiscIO::IVolume::WII_DISC)
|
||||
if (m_open_iso->GetVolumeType() == DiscIO::Platform::WII_DISC)
|
||||
{
|
||||
int partition_count = 0;
|
||||
for (int group = 0; group < 4; group++)
|
||||
@ -426,7 +427,7 @@ void CISOProperties::CreateGUIControls()
|
||||
|
||||
wxStaticBoxSizer* const sbWiiOverrides =
|
||||
new wxStaticBoxSizer(wxVERTICAL, m_GameConfig, _("Wii Console"));
|
||||
if (m_open_iso->GetVolumeType() == DiscIO::IVolume::GAMECUBE_DISC)
|
||||
if (m_open_iso->GetVolumeType() == DiscIO::Platform::GAMECUBE_DISC)
|
||||
{
|
||||
sbWiiOverrides->ShowItems(false);
|
||||
EnableWideScreen->Hide();
|
||||
@ -523,10 +524,10 @@ void CISOProperties::CreateGUIControls()
|
||||
|
||||
wxStaticText* const m_LangText = new wxStaticText(m_Information, wxID_ANY, _("Show Language:"));
|
||||
|
||||
bool wii = m_open_iso->GetVolumeType() != DiscIO::IVolume::GAMECUBE_DISC;
|
||||
DiscIO::IVolume::ELanguage preferred_language = SConfig::GetInstance().GetCurrentLanguage(wii);
|
||||
bool wii = m_open_iso->GetVolumeType() != DiscIO::Platform::GAMECUBE_DISC;
|
||||
DiscIO::Language preferred_language = SConfig::GetInstance().GetCurrentLanguage(wii);
|
||||
|
||||
std::vector<DiscIO::IVolume::ELanguage> languages = OpenGameListItem.GetLanguages();
|
||||
std::vector<DiscIO::Language> languages = OpenGameListItem.GetLanguages();
|
||||
int preferred_language_index = 0;
|
||||
for (size_t i = 0; i < languages.size(); ++i)
|
||||
{
|
||||
@ -535,37 +536,37 @@ void CISOProperties::CreateGUIControls()
|
||||
|
||||
switch (languages[i])
|
||||
{
|
||||
case DiscIO::IVolume::LANGUAGE_JAPANESE:
|
||||
case DiscIO::Language::LANGUAGE_JAPANESE:
|
||||
arrayStringFor_Lang.Add(_("Japanese"));
|
||||
break;
|
||||
case DiscIO::IVolume::LANGUAGE_ENGLISH:
|
||||
case DiscIO::Language::LANGUAGE_ENGLISH:
|
||||
arrayStringFor_Lang.Add(_("English"));
|
||||
break;
|
||||
case DiscIO::IVolume::LANGUAGE_GERMAN:
|
||||
case DiscIO::Language::LANGUAGE_GERMAN:
|
||||
arrayStringFor_Lang.Add(_("German"));
|
||||
break;
|
||||
case DiscIO::IVolume::LANGUAGE_FRENCH:
|
||||
case DiscIO::Language::LANGUAGE_FRENCH:
|
||||
arrayStringFor_Lang.Add(_("French"));
|
||||
break;
|
||||
case DiscIO::IVolume::LANGUAGE_SPANISH:
|
||||
case DiscIO::Language::LANGUAGE_SPANISH:
|
||||
arrayStringFor_Lang.Add(_("Spanish"));
|
||||
break;
|
||||
case DiscIO::IVolume::LANGUAGE_ITALIAN:
|
||||
case DiscIO::Language::LANGUAGE_ITALIAN:
|
||||
arrayStringFor_Lang.Add(_("Italian"));
|
||||
break;
|
||||
case DiscIO::IVolume::LANGUAGE_DUTCH:
|
||||
case DiscIO::Language::LANGUAGE_DUTCH:
|
||||
arrayStringFor_Lang.Add(_("Dutch"));
|
||||
break;
|
||||
case DiscIO::IVolume::LANGUAGE_SIMPLIFIED_CHINESE:
|
||||
case DiscIO::Language::LANGUAGE_SIMPLIFIED_CHINESE:
|
||||
arrayStringFor_Lang.Add(_("Simplified Chinese"));
|
||||
break;
|
||||
case DiscIO::IVolume::LANGUAGE_TRADITIONAL_CHINESE:
|
||||
case DiscIO::Language::LANGUAGE_TRADITIONAL_CHINESE:
|
||||
arrayStringFor_Lang.Add(_("Traditional Chinese"));
|
||||
break;
|
||||
case DiscIO::IVolume::LANGUAGE_KOREAN:
|
||||
case DiscIO::Language::LANGUAGE_KOREAN:
|
||||
arrayStringFor_Lang.Add(_("Korean"));
|
||||
break;
|
||||
case DiscIO::IVolume::LANGUAGE_UNKNOWN:
|
||||
case DiscIO::Language::LANGUAGE_UNKNOWN:
|
||||
default:
|
||||
arrayStringFor_Lang.Add(_("Unknown"));
|
||||
break;
|
||||
@ -650,7 +651,7 @@ void CISOProperties::CreateGUIControls()
|
||||
sInfoPage->Add(sbBannerDetails, 0, wxEXPAND | wxALL, 5);
|
||||
m_Information->SetSizer(sInfoPage);
|
||||
|
||||
if (m_open_iso->GetVolumeType() != DiscIO::IVolume::WII_WAD)
|
||||
if (m_open_iso->GetVolumeType() != DiscIO::Platform::WII_WAD)
|
||||
{
|
||||
wxPanel* const filesystem_panel = new wxPanel(m_Notebook, ID_FILESYSTEM);
|
||||
m_Notebook->AddPage(filesystem_panel, _("Filesystem"));
|
||||
@ -758,7 +759,7 @@ void CISOProperties::OnRightClickOnTree(wxTreeEvent& event)
|
||||
|
||||
popupMenu.Append(IDM_EXTRACTALL, _("Extract All Files..."));
|
||||
|
||||
if (m_open_iso->GetVolumeType() != DiscIO::IVolume::WII_DISC ||
|
||||
if (m_open_iso->GetVolumeType() != DiscIO::Platform::WII_DISC ||
|
||||
(m_Treectrl->GetItemImage(m_Treectrl->GetSelection()) == 0 &&
|
||||
m_Treectrl->GetFirstVisibleItem() != m_Treectrl->GetSelection()))
|
||||
{
|
||||
@ -797,7 +798,7 @@ void CISOProperties::OnExtractFile(wxCommandEvent& WXUNUSED(event))
|
||||
m_Treectrl->SelectItem(m_Treectrl->GetItemParent(m_Treectrl->GetSelection()));
|
||||
}
|
||||
|
||||
if (m_open_iso->GetVolumeType() == DiscIO::IVolume::WII_DISC)
|
||||
if (m_open_iso->GetVolumeType() == DiscIO::Platform::WII_DISC)
|
||||
{
|
||||
const wxTreeItemId tree_selection = m_Treectrl->GetSelection();
|
||||
WiiPartition* partition =
|
||||
@ -815,9 +816,8 @@ void CISOProperties::OnExtractFile(wxCommandEvent& WXUNUSED(event))
|
||||
void CISOProperties::ExportDir(const std::string& _rFullPath, const std::string& _rExportFolder,
|
||||
const WiiPartition* partition)
|
||||
{
|
||||
DiscIO::IFileSystem* const fs = m_open_iso->GetVolumeType() == DiscIO::IVolume::WII_DISC ?
|
||||
partition->FileSystem.get() :
|
||||
m_filesystem.get();
|
||||
bool is_wii = m_open_iso->GetVolumeType() == DiscIO::Platform::WII_DISC;
|
||||
DiscIO::IFileSystem* const fs = is_wii ? partition->FileSystem.get() : m_filesystem.get();
|
||||
|
||||
const std::vector<DiscIO::SFileInfo>& fst = fs->GetFileList();
|
||||
|
||||
@ -831,7 +831,7 @@ void CISOProperties::ExportDir(const std::string& _rFullPath, const std::string&
|
||||
size = (u32)fst.size();
|
||||
|
||||
fs->ExportApploader(_rExportFolder);
|
||||
if (m_open_iso->GetVolumeType() != DiscIO::IVolume::WII_DISC)
|
||||
if (m_open_iso->GetVolumeType() != DiscIO::Platform::WII_DISC)
|
||||
fs->ExportDOL(_rExportFolder);
|
||||
}
|
||||
else
|
||||
@ -913,7 +913,7 @@ void CISOProperties::OnExtractDir(wxCommandEvent& event)
|
||||
|
||||
if (event.GetId() == IDM_EXTRACTALL)
|
||||
{
|
||||
if (m_open_iso->GetVolumeType() == DiscIO::IVolume::WII_DISC)
|
||||
if (m_open_iso->GetVolumeType() == DiscIO::Platform::WII_DISC)
|
||||
{
|
||||
wxTreeItemIdValue cookie;
|
||||
wxTreeItemId root = m_Treectrl->GetRootItem();
|
||||
@ -943,7 +943,7 @@ void CISOProperties::OnExtractDir(wxCommandEvent& event)
|
||||
|
||||
Directory += DIR_SEP_CHR;
|
||||
|
||||
if (m_open_iso->GetVolumeType() == DiscIO::IVolume::WII_DISC)
|
||||
if (m_open_iso->GetVolumeType() == DiscIO::Platform::WII_DISC)
|
||||
{
|
||||
const wxTreeItemId tree_selection = m_Treectrl->GetSelection();
|
||||
WiiPartition* partition =
|
||||
@ -967,7 +967,7 @@ void CISOProperties::OnExtractDataFromHeader(wxCommandEvent& event)
|
||||
if (Path.empty())
|
||||
return;
|
||||
|
||||
if (m_open_iso->GetVolumeType() == DiscIO::IVolume::WII_DISC)
|
||||
if (m_open_iso->GetVolumeType() == DiscIO::Platform::WII_DISC)
|
||||
{
|
||||
WiiPartition* partition =
|
||||
reinterpret_cast<WiiPartition*>(m_Treectrl->GetItemData(m_Treectrl->GetSelection()));
|
||||
@ -1011,7 +1011,7 @@ void CISOProperties::CheckPartitionIntegrity(wxCommandEvent& event)
|
||||
{
|
||||
// Normally we can't enter this function if we aren't analyzing a Wii disc
|
||||
// anyway, but let's still check to be sure.
|
||||
if (m_open_iso->GetVolumeType() != DiscIO::IVolume::WII_DISC)
|
||||
if (m_open_iso->GetVolumeType() != DiscIO::Platform::WII_DISC)
|
||||
return;
|
||||
|
||||
wxProgressDialog dialog(_("Checking integrity..."), _("Working..."), 1000, this,
|
||||
@ -1546,7 +1546,7 @@ void CISOProperties::OnChangeBannerLang(wxCommandEvent& event)
|
||||
ChangeBannerDetails(OpenGameListItem.GetLanguages()[event.GetSelection()]);
|
||||
}
|
||||
|
||||
void CISOProperties::ChangeBannerDetails(DiscIO::IVolume::ELanguage language)
|
||||
void CISOProperties::ChangeBannerDetails(DiscIO::Language language)
|
||||
{
|
||||
wxString const name = StrToWxStr(OpenGameListItem.GetName(language));
|
||||
wxString const comment = StrToWxStr(OpenGameListItem.GetDescription(language));
|
||||
|
@ -17,7 +17,6 @@
|
||||
#include "Core/ActionReplay.h"
|
||||
#include "DiscIO/Filesystem.h"
|
||||
#include "DiscIO/Volume.h"
|
||||
#include "DiscIO/VolumeCreator.h"
|
||||
#include "DolphinWX/ARCodeAddEdit.h"
|
||||
#include "DolphinWX/ISOFile.h"
|
||||
#include "DolphinWX/PatchAddEdit.h"
|
||||
@ -35,7 +34,7 @@ class wxTreeCtrl;
|
||||
|
||||
namespace DiscIO
|
||||
{
|
||||
struct SFileInfo;
|
||||
enum class Language;
|
||||
}
|
||||
namespace Gecko
|
||||
{
|
||||
@ -242,7 +241,7 @@ private:
|
||||
void PatchList_Save();
|
||||
void ActionReplayList_Load();
|
||||
void ActionReplayList_Save();
|
||||
void ChangeBannerDetails(DiscIO::IVolume::ELanguage language);
|
||||
void ChangeBannerDetails(DiscIO::Language language);
|
||||
|
||||
long GetElementStyle(const char* section, const char* key);
|
||||
void SetCheckboxValueFromGameini(const char* section, const char* key, wxCheckBox* checkbox);
|
||||
|
@ -34,6 +34,8 @@
|
||||
#include "Core/NetPlayProto.h"
|
||||
#include "Core/NetPlayServer.h"
|
||||
|
||||
#include "DiscIO/Enums.h"
|
||||
|
||||
#include "DolphinWX/Frame.h"
|
||||
#include "DolphinWX/GameListCtrl.h"
|
||||
#include "DolphinWX/ISOFile.h"
|
||||
@ -69,7 +71,7 @@ static wxString FailureReasonStringForHostLabel(int reason)
|
||||
static std::string BuildGameName(const GameListItem& game)
|
||||
{
|
||||
// Lang needs to be consistent
|
||||
DiscIO::IVolume::ELanguage const lang = DiscIO::IVolume::LANGUAGE_ENGLISH;
|
||||
const DiscIO::Language lang = DiscIO::Language::LANGUAGE_ENGLISH;
|
||||
std::vector<std::string> info;
|
||||
if (!game.GetUniqueID().empty())
|
||||
info.push_back(game.GetUniqueID());
|
||||
|
Reference in New Issue
Block a user