diff --git a/Source/Core/Core/Boot/Boot_BS2Emu.cpp b/Source/Core/Core/Boot/Boot_BS2Emu.cpp index 8b7f52e5ef..56f07e720b 100644 --- a/Source/Core/Core/Boot/Boot_BS2Emu.cpp +++ b/Source/Core/Core/Boot/Boot_BS2Emu.cpp @@ -307,10 +307,10 @@ bool CBoot::EmulatedBS2_Wii() INFO_LOG(BOOT, "Faking Wii BS2..."); // setup Wii memory - DiscIO::IVolume::ECountry CountryCode = DiscIO::IVolume::COUNTRY_UNKNOWN; + DiscIO::IVolume::ECountry country_code = DiscIO::IVolume::COUNTRY_UNKNOWN; if (VolumeHandler::IsValid()) - CountryCode = VolumeHandler::GetVolume()->GetCountry(); - if (SetupWiiMemory(CountryCode) == false) + country_code = VolumeHandler::GetVolume()->GetCountry(); + if (SetupWiiMemory(country_code) == false) return false; // This is some kind of consistency check that is compared to the 0x00 diff --git a/Source/Core/Core/HW/EXI_DeviceMemoryCard.cpp b/Source/Core/Core/HW/EXI_DeviceMemoryCard.cpp index 967b546cb2..b9022556c3 100644 --- a/Source/Core/Core/HW/EXI_DeviceMemoryCard.cpp +++ b/Source/Core/Core/HW/EXI_DeviceMemoryCard.cpp @@ -136,7 +136,7 @@ CEXIMemoryCard::CEXIMemoryCard(const int index, bool gciFolder) void CEXIMemoryCard::SetupGciFolder(u16 sizeMb) { - DiscIO::IVolume::ECountry CountryCode = DiscIO::IVolume::COUNTRY_UNKNOWN; + DiscIO::IVolume::ECountry country_code = DiscIO::IVolume::COUNTRY_UNKNOWN; auto strUniqueID = SConfig::GetInstance().m_LocalCoreStartupParameter.m_strUniqueID; u32 CurrentGameId = 0; @@ -145,17 +145,17 @@ void CEXIMemoryCard::SetupGciFolder(u16 sizeMb) const DiscIO::INANDContentLoader & SysMenu_Loader = DiscIO::CNANDContentManager::Access().GetNANDLoader(TITLEID_SYSMENU, false); if (SysMenu_Loader.IsValid()) { - CountryCode = DiscIO::CountrySwitch(SysMenu_Loader.GetCountryChar()); + country_code = DiscIO::CountrySwitch(SysMenu_Loader.GetCountryChar()); } } else if (strUniqueID.length() >= 4) { - CountryCode = DiscIO::CountrySwitch(strUniqueID.at(3)); + country_code = DiscIO::CountrySwitch(strUniqueID.at(3)); CurrentGameId = BE32((u8*)strUniqueID.c_str()); } bool ascii = true; std::string strDirectoryName = File::GetUserPath(D_GCUSER_IDX); - switch (CountryCode) + switch (country_code) { case DiscIO::IVolume::COUNTRY_JAPAN: ascii = false; @@ -182,20 +182,20 @@ void CEXIMemoryCard::SetupGciFolder(u16 sizeMb) std::string region = memcardFilename.substr(memcardFilename.size() - 7, 3); if (region == JAP_DIR) { - CountryCode = DiscIO::IVolume::COUNTRY_JAPAN; + country_code = DiscIO::IVolume::COUNTRY_JAPAN; ascii = false; strDirectoryName += JAP_DIR DIR_SEP; break; } else if (region == USA_DIR) { - CountryCode = DiscIO::IVolume::COUNTRY_USA; + country_code = DiscIO::IVolume::COUNTRY_USA; strDirectoryName += USA_DIR DIR_SEP; break; } } default: - CountryCode = DiscIO::IVolume::COUNTRY_EUROPE; + country_code = DiscIO::IVolume::COUNTRY_EUROPE; strDirectoryName += EUR_DIR DIR_SEP; } strDirectoryName += StringFromFormat("Card %c", 'A' + card_index); @@ -222,7 +222,7 @@ void CEXIMemoryCard::SetupGciFolder(u16 sizeMb) } memorycard = std::make_unique(strDirectoryName + DIR_SEP, card_index, sizeMb, ascii, - CountryCode, CurrentGameId); + country_code, CurrentGameId); } void CEXIMemoryCard::SetupRawMemcard(u16 sizeMb) diff --git a/Source/Core/DiscIO/Volume.h b/Source/Core/DiscIO/Volume.h index e518edd269..760e37325f 100644 --- a/Source/Core/DiscIO/Volume.h +++ b/Source/Core/DiscIO/Volume.h @@ -71,7 +71,7 @@ public: }; // Generic Switch function for all volumes -IVolume::ECountry CountrySwitch(u8 CountryCode); +IVolume::ECountry CountrySwitch(u8 country_code); u8 GetSysMenuRegion(u16 _TitleVersion); } // namespace diff --git a/Source/Core/DiscIO/VolumeCommon.cpp b/Source/Core/DiscIO/VolumeCommon.cpp index ee2df9c078..87f0c722a7 100644 --- a/Source/Core/DiscIO/VolumeCommon.cpp +++ b/Source/Core/DiscIO/VolumeCommon.cpp @@ -12,9 +12,9 @@ // Increment CACHE_REVISION if the code below is modified (ISOFile.cpp & GameFile.cpp) namespace DiscIO { -IVolume::ECountry CountrySwitch(u8 CountryCode) +IVolume::ECountry CountrySwitch(u8 country_code) { - switch (CountryCode) + switch (country_code) { // Region free - Uses European flag as placeholder case 'A': @@ -68,8 +68,8 @@ IVolume::ECountry CountrySwitch(u8 CountryCode) return IVolume::COUNTRY_TAIWAN; default: - if (CountryCode > 'A') // Silently ignore IOS wads - WARN_LOG(DISCIO, "Unknown Country Code! %c", CountryCode); + if (country_code > 'A') // Silently ignore IOS wads + WARN_LOG(DISCIO, "Unknown Country Code! %c", country_code); return IVolume::COUNTRY_UNKNOWN; } } diff --git a/Source/Core/DiscIO/VolumeDirectory.cpp b/Source/Core/DiscIO/VolumeDirectory.cpp index 6157507816..fa6b210db6 100644 --- a/Source/Core/DiscIO/VolumeDirectory.cpp +++ b/Source/Core/DiscIO/VolumeDirectory.cpp @@ -174,9 +174,9 @@ void CVolumeDirectory::SetUniqueID(const std::string& id) IVolume::ECountry CVolumeDirectory::GetCountry() const { - u8 CountryCode = m_diskHeader[3]; + u8 country_code = m_diskHeader[3]; - return CountrySwitch(CountryCode); + return CountrySwitch(country_code); } std::string CVolumeDirectory::GetMakerID() const diff --git a/Source/Core/DiscIO/VolumeDirectory.h b/Source/Core/DiscIO/VolumeDirectory.h index 16b77c5acc..c3e9c881c2 100644 --- a/Source/Core/DiscIO/VolumeDirectory.h +++ b/Source/Core/DiscIO/VolumeDirectory.h @@ -108,7 +108,7 @@ private: u32 debug_flag; u32 track_location; u32 track_size; - u32 countrycode; + u32 country_code; u32 unknown; u32 unknown2; @@ -121,7 +121,7 @@ private: debug_flag = 0; track_location = 0; track_size = 0; - countrycode = 0; + country_code = 0; unknown = 0; unknown2 = 0; } diff --git a/Source/Core/DiscIO/VolumeGC.cpp b/Source/Core/DiscIO/VolumeGC.cpp index 7d09fc234e..5f6e91b847 100644 --- a/Source/Core/DiscIO/VolumeGC.cpp +++ b/Source/Core/DiscIO/VolumeGC.cpp @@ -61,10 +61,10 @@ IVolume::ECountry CVolumeGC::GetCountry() const if (!m_pReader) return COUNTRY_UNKNOWN; - u8 CountryCode; - m_pReader->Read(3, 1, &CountryCode); + u8 country_code; + m_pReader->Read(3, 1, &country_code); - return CountrySwitch(CountryCode); + return CountrySwitch(country_code); } std::string CVolumeGC::GetMakerID() const diff --git a/Source/Core/DiscIO/VolumeWad.cpp b/Source/Core/DiscIO/VolumeWad.cpp index 2cbfbc92fd..07c8255980 100644 --- a/Source/Core/DiscIO/VolumeWad.cpp +++ b/Source/Core/DiscIO/VolumeWad.cpp @@ -54,17 +54,17 @@ IVolume::ECountry CVolumeWAD::GetCountry() const return COUNTRY_UNKNOWN; // read the last digit of the titleID in the ticket - u8 CountryCode; - Read(m_tmd_offset + 0x0193, 1, &CountryCode); + u8 country_code; + Read(m_tmd_offset + 0x0193, 1, &country_code); - if (CountryCode == 2) // SYSMENU + if (country_code == 2) // SYSMENU { u16 titlever = 0; Read(m_tmd_offset + 0x01dc, 2, (u8*)&titlever); - CountryCode = GetSysMenuRegion(Common::swap16(titlever)); + country_code = GetSysMenuRegion(Common::swap16(titlever)); } - return CountrySwitch(CountryCode); + return CountrySwitch(country_code); } std::string CVolumeWAD::GetUniqueID() const diff --git a/Source/Core/DiscIO/VolumeWiiCrypted.cpp b/Source/Core/DiscIO/VolumeWiiCrypted.cpp index dad2977ba0..d73db3274c 100644 --- a/Source/Core/DiscIO/VolumeWiiCrypted.cpp +++ b/Source/Core/DiscIO/VolumeWiiCrypted.cpp @@ -158,10 +158,10 @@ IVolume::ECountry CVolumeWiiCrypted::GetCountry() const if (!m_pReader) return COUNTRY_UNKNOWN; - u8 CountryCode; - m_pReader->Read(3, 1, &CountryCode); + u8 country_code; + m_pReader->Read(3, 1, &country_code); - return CountrySwitch(CountryCode); + return CountrySwitch(country_code); } std::string CVolumeWiiCrypted::GetMakerID() const diff --git a/Source/Core/DolphinWX/ConfigMain.cpp b/Source/Core/DolphinWX/ConfigMain.cpp index 6f26a692a6..a01b04ae89 100644 --- a/Source/Core/DolphinWX/ConfigMain.cpp +++ b/Source/Core/DolphinWX/ConfigMain.cpp @@ -1333,37 +1333,37 @@ void CConfigMain::OnConfig(wxCommandEvent&) inline u8 CConfigMain::GetSADRCountryCode(int language) { //http://wiibrew.org/wiki/Country_Codes - u8 countrycode = language; - switch (countrycode) + u8 country_code = language; + switch (country_code) { case 0: //Japanese - countrycode = 1; //Japan + country_code = 1; //Japan break; case 1: //English - countrycode = 49; //USA + country_code = 49; //USA break; case 2: //German - countrycode = 78; //Germany + country_code = 78; //Germany break; case 3: //French - countrycode = 77; //France + country_code = 77; //France break; case 4: //Spanish - countrycode = 105; //Spain + country_code = 105; //Spain break; case 5: //Italian - countrycode = 83; //Italy + country_code = 83; //Italy break; case 6: //Dutch - countrycode = 94; //Netherlands + country_code = 94; //Netherlands break; case 7: //Simplified Chinese case 8: //Traditional Chinese - countrycode = 157; //China + country_code = 157; //China break; case 9: //Korean - countrycode = 136; //Korea + country_code = 136; //Korea break; } - return countrycode; + return country_code; }