mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 00:59:44 -06:00
Merge pull request #6567 from JosJuice/discio-enums-case
DiscIO: Don't use all uppercase for enum values
This commit is contained in:
@ -245,12 +245,12 @@ bool CBoot::Load_BS2(const std::string& boot_rom_filename)
|
||||
break;
|
||||
default:
|
||||
PanicAlertT("IPL with unknown hash %x", ipl_hash);
|
||||
ipl_region = DiscIO::Region::UNKNOWN_REGION;
|
||||
ipl_region = DiscIO::Region::Unknown;
|
||||
break;
|
||||
}
|
||||
|
||||
const DiscIO::Region boot_region = SConfig::GetInstance().m_region;
|
||||
if (ipl_region != DiscIO::Region::UNKNOWN_REGION && boot_region != ipl_region)
|
||||
if (ipl_region != DiscIO::Region::Unknown && boot_region != ipl_region)
|
||||
PanicAlertT("%s IPL found in %s directory. The disc might not be recognized",
|
||||
SConfig::GetDirectoryForRegion(ipl_region),
|
||||
SConfig::GetDirectoryForRegion(boot_region));
|
||||
|
@ -341,7 +341,7 @@ static void WriteEmptyPlayRecord()
|
||||
bool CBoot::EmulatedBS2_Wii(const DiscIO::Volume& volume)
|
||||
{
|
||||
INFO_LOG(BOOT, "Faking Wii BS2...");
|
||||
if (volume.GetVolumeType() != DiscIO::Platform::WII_DISC)
|
||||
if (volume.GetVolumeType() != DiscIO::Platform::WiiDisc)
|
||||
return false;
|
||||
|
||||
const DiscIO::Partition partition = volume.GetGamePartition();
|
||||
|
@ -888,7 +888,7 @@ struct SetGameMetadata
|
||||
bool operator()(const BootParameters::Disc& disc) const
|
||||
{
|
||||
config->SetRunningGameMetadata(*disc.volume, disc.volume->GetGamePartition());
|
||||
config->bWii = disc.volume->GetVolumeType() == DiscIO::Platform::WII_DISC;
|
||||
config->bWii = disc.volume->GetVolumeType() == DiscIO::Platform::WiiDisc;
|
||||
config->m_disc_booted_from_game_list = true;
|
||||
*region = disc.volume->GetRegion();
|
||||
return true;
|
||||
@ -901,7 +901,7 @@ struct SetGameMetadata
|
||||
|
||||
config->bWii = executable.reader->IsWii();
|
||||
|
||||
*region = DiscIO::Region::UNKNOWN_REGION;
|
||||
*region = DiscIO::Region::Unknown;
|
||||
|
||||
// Strip the .elf/.dol file extension and directories before the name
|
||||
SplitPath(executable.path, nullptr, &config->m_debugger_game_id, nullptr);
|
||||
@ -974,7 +974,7 @@ bool SConfig::SetPathsAndGameMetadata(const BootParameters& boot)
|
||||
return false;
|
||||
|
||||
// Fall back to the system menu region, if possible.
|
||||
if (m_region == DiscIO::Region::UNKNOWN_REGION)
|
||||
if (m_region == DiscIO::Region::Unknown)
|
||||
{
|
||||
IOS::HLE::Kernel ios;
|
||||
const IOS::ES::TMDReader system_menu_tmd = ios.GetES()->FindInstalledTMD(Titles::SYSTEM_MENU);
|
||||
@ -983,7 +983,7 @@ bool SConfig::SetPathsAndGameMetadata(const BootParameters& boot)
|
||||
}
|
||||
|
||||
// Fall back to PAL.
|
||||
if (m_region == DiscIO::Region::UNKNOWN_REGION)
|
||||
if (m_region == DiscIO::Region::Unknown)
|
||||
m_region = DiscIO::Region::PAL;
|
||||
|
||||
// Set up paths
|
||||
@ -1054,9 +1054,8 @@ DiscIO::Language SConfig::GetCurrentLanguage(bool wii) const
|
||||
DiscIO::Language language = static_cast<DiscIO::Language>(language_value);
|
||||
|
||||
// Get rid of invalid values (probably doesn't matter, but might as well do it)
|
||||
if (language > DiscIO::Language::LANGUAGE_UNKNOWN ||
|
||||
language < DiscIO::Language::LANGUAGE_JAPANESE)
|
||||
language = DiscIO::Language::LANGUAGE_UNKNOWN;
|
||||
if (language > DiscIO::Language::Unknown || language < DiscIO::Language::Japanese)
|
||||
language = DiscIO::Language::Unknown;
|
||||
return language;
|
||||
}
|
||||
|
||||
|
@ -1127,7 +1127,7 @@ void ScheduleReads(u64 offset, u32 length, const DiscIO::Partition& partition, u
|
||||
|
||||
const u64 current_time = CoreTiming::GetTicks();
|
||||
const u32 ticks_per_second = SystemTimers::GetTicksPerSecond();
|
||||
const bool wii_disc = DVDThread::GetDiscType() == DiscIO::Platform::WII_DISC;
|
||||
const bool wii_disc = DVDThread::GetDiscType() == DiscIO::Platform::WiiDisc;
|
||||
|
||||
// Where the DVD read head is (usually parked at the end of the buffer,
|
||||
// unless we've interrupted it mid-buffer-read).
|
||||
|
@ -194,7 +194,7 @@ public:
|
||||
u16 GetTitleVersion() const;
|
||||
u16 GetGroupId() const;
|
||||
|
||||
// Provides a best guess for the region. Might be inaccurate or UNKNOWN_REGION.
|
||||
// Provides a best guess for the region. Might be inaccurate or Region::Unknown.
|
||||
DiscIO::Region GetRegion() const;
|
||||
|
||||
// Constructs a 6-character game ID in the format typically used by Dolphin.
|
||||
|
@ -23,25 +23,25 @@ static std::string GetLanguageCode(DiscIO::Language language)
|
||||
{
|
||||
switch (language)
|
||||
{
|
||||
case DiscIO::Language::LANGUAGE_JAPANESE:
|
||||
case DiscIO::Language::Japanese:
|
||||
return "ja";
|
||||
case DiscIO::Language::LANGUAGE_ENGLISH:
|
||||
case DiscIO::Language::English:
|
||||
return "en";
|
||||
case DiscIO::Language::LANGUAGE_GERMAN:
|
||||
case DiscIO::Language::German:
|
||||
return "de";
|
||||
case DiscIO::Language::LANGUAGE_FRENCH:
|
||||
case DiscIO::Language::French:
|
||||
return "fr";
|
||||
case DiscIO::Language::LANGUAGE_SPANISH:
|
||||
case DiscIO::Language::Spanish:
|
||||
return "es";
|
||||
case DiscIO::Language::LANGUAGE_ITALIAN:
|
||||
case DiscIO::Language::Italian:
|
||||
return "it";
|
||||
case DiscIO::Language::LANGUAGE_DUTCH:
|
||||
case DiscIO::Language::Dutch:
|
||||
return "nl";
|
||||
case DiscIO::Language::LANGUAGE_SIMPLIFIED_CHINESE:
|
||||
case DiscIO::Language::SimplifiedChinese:
|
||||
return "zh_CN";
|
||||
case DiscIO::Language::LANGUAGE_TRADITIONAL_CHINESE:
|
||||
case DiscIO::Language::TraditionalChinese:
|
||||
return "zh_TW";
|
||||
case DiscIO::Language::LANGUAGE_KOREAN:
|
||||
case DiscIO::Language::Korean:
|
||||
return "ko";
|
||||
default:
|
||||
return "en";
|
||||
@ -95,12 +95,12 @@ static bool IsWiiTitle(const std::string& game_id)
|
||||
|
||||
static bool IsJapaneseGCTitle(const std::string& game_id)
|
||||
{
|
||||
return IsGCTitle(game_id) && DiscIO::CountrySwitch(game_id[3]) == DiscIO::Country::COUNTRY_JAPAN;
|
||||
return IsGCTitle(game_id) && DiscIO::CountrySwitch(game_id[3]) == DiscIO::Country::Japan;
|
||||
}
|
||||
|
||||
static bool IsNonJapaneseGCTitle(const std::string& game_id)
|
||||
{
|
||||
return IsGCTitle(game_id) && DiscIO::CountrySwitch(game_id[3]) != DiscIO::Country::COUNTRY_JAPAN;
|
||||
return IsGCTitle(game_id) && DiscIO::CountrySwitch(game_id[3]) != DiscIO::Country::Japan;
|
||||
}
|
||||
|
||||
// Note that this function will not overwrite entries that already are in the maps
|
||||
|
@ -208,12 +208,11 @@ std::string SystemUpdater::GetDeviceRegion()
|
||||
if (tmd.IsValid())
|
||||
{
|
||||
const DiscIO::Region region = tmd.GetRegion();
|
||||
static const std::map<DiscIO::Region, std::string> regions = {
|
||||
{DiscIO::Region::NTSC_J, "JPN"},
|
||||
{DiscIO::Region::NTSC_U, "USA"},
|
||||
{DiscIO::Region::PAL, "EUR"},
|
||||
{DiscIO::Region::NTSC_K, "KOR"},
|
||||
{DiscIO::Region::UNKNOWN_REGION, "EUR"}};
|
||||
static const std::map<DiscIO::Region, std::string> regions = {{DiscIO::Region::NTSC_J, "JPN"},
|
||||
{DiscIO::Region::NTSC_U, "USA"},
|
||||
{DiscIO::Region::PAL, "EUR"},
|
||||
{DiscIO::Region::NTSC_K, "KOR"},
|
||||
{DiscIO::Region::Unknown, "EUR"}};
|
||||
return regions.at(region);
|
||||
}
|
||||
return "";
|
||||
|
Reference in New Issue
Block a user