mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 17:19:44 -06:00
Core: Remove some header inclusions in header files
Replaces them with forward declarations of used types, or removes them entirely if they aren't used at all. This also replaces certain Common headers with less inclusive ones (in terms of definitions they pull in).
This commit is contained in:
@ -22,6 +22,7 @@
|
||||
#include <wx/textctrl.h>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Common/IniFile.h"
|
||||
#include "Common/StringUtil.h"
|
||||
#include "Core/ActionReplay.h"
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/stattext.h>
|
||||
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
#include "DiscIO/NANDContentLoader.h"
|
||||
|
@ -126,7 +126,7 @@ void WiiConfigPane::OnConnectKeyboardCheckBoxChanged(wxCommandEvent& event)
|
||||
|
||||
void WiiConfigPane::OnSystemLanguageChoiceChanged(wxCommandEvent& event)
|
||||
{
|
||||
IVolume::ELanguage wii_system_lang = (IVolume::ELanguage)m_system_language_choice->GetSelection();
|
||||
DiscIO::IVolume::ELanguage wii_system_lang = (DiscIO::IVolume::ELanguage)m_system_language_choice->GetSelection();
|
||||
SConfig::GetInstance().m_SYSCONF->SetData("IPL.LNG", wii_system_lang);
|
||||
u8 country_code = GetSADRCountryCode(wii_system_lang);
|
||||
|
||||
@ -141,28 +141,28 @@ void WiiConfigPane::OnAspectRatioChoiceChanged(wxCommandEvent& event)
|
||||
|
||||
// Change from IPL.LNG value to IPL.SADR country code.
|
||||
// http://wiibrew.org/wiki/Country_Codes
|
||||
u8 WiiConfigPane::GetSADRCountryCode(IVolume::ELanguage language)
|
||||
u8 WiiConfigPane::GetSADRCountryCode(DiscIO::IVolume::ELanguage language)
|
||||
{
|
||||
switch (language)
|
||||
{
|
||||
case IVolume::LANGUAGE_JAPANESE:
|
||||
case DiscIO::IVolume::LANGUAGE_JAPANESE:
|
||||
return 1; // Japan
|
||||
case IVolume::LANGUAGE_ENGLISH:
|
||||
case DiscIO::IVolume::LANGUAGE_ENGLISH:
|
||||
return 49; // USA
|
||||
case IVolume::LANGUAGE_GERMAN:
|
||||
case DiscIO::IVolume::LANGUAGE_GERMAN:
|
||||
return 78; // Germany
|
||||
case IVolume::LANGUAGE_FRENCH:
|
||||
case DiscIO::IVolume::LANGUAGE_FRENCH:
|
||||
return 77; // France
|
||||
case IVolume::LANGUAGE_SPANISH:
|
||||
case DiscIO::IVolume::LANGUAGE_SPANISH:
|
||||
return 105; // Spain
|
||||
case IVolume::LANGUAGE_ITALIAN:
|
||||
case DiscIO::IVolume::LANGUAGE_ITALIAN:
|
||||
return 83; // Italy
|
||||
case IVolume::LANGUAGE_DUTCH:
|
||||
case DiscIO::IVolume::LANGUAGE_DUTCH:
|
||||
return 94; // Netherlands
|
||||
case IVolume::LANGUAGE_SIMPLIFIED_CHINESE:
|
||||
case IVolume::LANGUAGE_TRADITIONAL_CHINESE:
|
||||
case DiscIO::IVolume::LANGUAGE_SIMPLIFIED_CHINESE:
|
||||
case DiscIO::IVolume::LANGUAGE_TRADITIONAL_CHINESE:
|
||||
return 157; // China
|
||||
case IVolume::LANGUAGE_KOREAN:
|
||||
case DiscIO::IVolume::LANGUAGE_KOREAN:
|
||||
return 136; // Korea
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ private:
|
||||
void OnSystemLanguageChoiceChanged(wxCommandEvent&);
|
||||
void OnAspectRatioChoiceChanged(wxCommandEvent&);
|
||||
|
||||
static u8 GetSADRCountryCode(IVolume::ELanguage language);
|
||||
static u8 GetSADRCountryCode(DiscIO::IVolume::ELanguage language);
|
||||
|
||||
wxArrayString m_system_language_strings;
|
||||
wxArrayString m_aspect_ratio_strings;
|
||||
|
@ -85,8 +85,8 @@ static int CompareGameListItems(const GameListItem* iso1, const GameListItem* is
|
||||
sortData = -sortData;
|
||||
}
|
||||
|
||||
IVolume::ELanguage languageOne = SConfig::GetInstance().m_LocalCoreStartupParameter.GetCurrentLanguage(iso1->GetPlatform() != GameListItem::GAMECUBE_DISC);
|
||||
IVolume::ELanguage languageOther = SConfig::GetInstance().m_LocalCoreStartupParameter.GetCurrentLanguage(iso2->GetPlatform() != GameListItem::GAMECUBE_DISC);
|
||||
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);
|
||||
|
||||
switch (sortData)
|
||||
{
|
||||
|
@ -40,7 +40,7 @@ static const u32 CACHE_REVISION = 0x123;
|
||||
#define DVD_BANNER_WIDTH 96
|
||||
#define DVD_BANNER_HEIGHT 32
|
||||
|
||||
static std::string GetLanguageString(IVolume::ELanguage language, std::map<IVolume::ELanguage, std::string> strings)
|
||||
static std::string GetLanguageString(DiscIO::IVolume::ELanguage language, std::map<DiscIO::IVolume::ELanguage, std::string> strings)
|
||||
{
|
||||
auto end = strings.end();
|
||||
auto it = strings.find(language);
|
||||
@ -48,9 +48,9 @@ static std::string GetLanguageString(IVolume::ELanguage language, std::map<IVolu
|
||||
return it->second;
|
||||
|
||||
// English tends to be a good fallback when the requested language isn't available
|
||||
if (language != IVolume::ELanguage::LANGUAGE_ENGLISH)
|
||||
if (language != DiscIO::IVolume::ELanguage::LANGUAGE_ENGLISH)
|
||||
{
|
||||
it = strings.find(IVolume::ELanguage::LANGUAGE_ENGLISH);
|
||||
it = strings.find(DiscIO::IVolume::ELanguage::LANGUAGE_ENGLISH);
|
||||
if (it != end)
|
||||
return it->second;
|
||||
}
|
||||
@ -207,7 +207,7 @@ std::string GameListItem::GetCompany() const
|
||||
return m_company;
|
||||
}
|
||||
|
||||
std::string GameListItem::GetDescription(IVolume::ELanguage language) const
|
||||
std::string GameListItem::GetDescription(DiscIO::IVolume::ELanguage language) const
|
||||
{
|
||||
return GetLanguageString(language, m_descriptions);
|
||||
}
|
||||
@ -217,7 +217,7 @@ std::string GameListItem::GetDescription() const
|
||||
return GetDescription(SConfig::GetInstance().m_LocalCoreStartupParameter.GetCurrentLanguage(m_Platform != GAMECUBE_DISC));
|
||||
}
|
||||
|
||||
std::string GameListItem::GetName(IVolume::ELanguage language) const
|
||||
std::string GameListItem::GetName(DiscIO::IVolume::ELanguage language) const
|
||||
{
|
||||
return GetLanguageString(language, m_names);
|
||||
}
|
||||
@ -233,10 +233,10 @@ std::string GameListItem::GetName() const
|
||||
return name;
|
||||
}
|
||||
|
||||
std::vector<IVolume::ELanguage> GameListItem::GetLanguages() const
|
||||
std::vector<DiscIO::IVolume::ELanguage> GameListItem::GetLanguages() const
|
||||
{
|
||||
std::vector<IVolume::ELanguage> languages;
|
||||
for (std::pair<IVolume::ELanguage, std::string> name : m_names)
|
||||
std::vector<DiscIO::IVolume::ELanguage> languages;
|
||||
for (std::pair<DiscIO::IVolume::ELanguage, std::string> name : m_names)
|
||||
languages.push_back(name.first);
|
||||
return languages;
|
||||
}
|
||||
|
@ -25,11 +25,11 @@ public:
|
||||
|
||||
bool IsValid() const {return m_Valid;}
|
||||
const std::string& GetFileName() const {return m_FileName;}
|
||||
std::string GetName(IVolume::ELanguage language) const;
|
||||
std::string GetName(DiscIO::IVolume::ELanguage language) const;
|
||||
std::string GetName() const;
|
||||
std::string GetDescription(IVolume::ELanguage language) const;
|
||||
std::string GetDescription(DiscIO::IVolume::ELanguage language) const;
|
||||
std::string GetDescription() const;
|
||||
std::vector<IVolume::ELanguage> GetLanguages() const;
|
||||
std::vector<DiscIO::IVolume::ELanguage> GetLanguages() const;
|
||||
std::string GetCompany() const;
|
||||
int GetRevision() const { return m_Revision; }
|
||||
const std::string& GetUniqueID() const {return m_UniqueID;}
|
||||
@ -59,8 +59,8 @@ public:
|
||||
private:
|
||||
std::string m_FileName;
|
||||
|
||||
std::map<IVolume::ELanguage, std::string> m_names;
|
||||
std::map<IVolume::ELanguage, std::string> m_descriptions;
|
||||
std::map<DiscIO::IVolume::ELanguage, std::string> m_names;
|
||||
std::map<DiscIO::IVolume::ELanguage, std::string> m_descriptions;
|
||||
std::string m_company;
|
||||
|
||||
std::string m_UniqueID;
|
||||
|
@ -494,9 +494,9 @@ void CISOProperties::CreateGUIControls()
|
||||
|
||||
wxStaticText* const m_LangText = new wxStaticText(m_Information, wxID_ANY, _("Show Language:"));
|
||||
|
||||
IVolume::ELanguage preferred_language = SConfig::GetInstance().m_LocalCoreStartupParameter.GetCurrentLanguage(OpenISO->IsWadFile() || OpenISO->IsWiiDisc());
|
||||
DiscIO::IVolume::ELanguage preferred_language = SConfig::GetInstance().m_LocalCoreStartupParameter.GetCurrentLanguage(OpenISO->IsWadFile() || OpenISO->IsWiiDisc());
|
||||
|
||||
std::vector<IVolume::ELanguage> languages = OpenGameListItem->GetLanguages();
|
||||
std::vector<DiscIO::IVolume::ELanguage> languages = OpenGameListItem->GetLanguages();
|
||||
int preferred_language_index = 0;
|
||||
for (size_t i = 0; i < languages.size(); ++i)
|
||||
{
|
||||
@ -505,37 +505,37 @@ void CISOProperties::CreateGUIControls()
|
||||
|
||||
switch (languages[i])
|
||||
{
|
||||
case IVolume::LANGUAGE_JAPANESE:
|
||||
case DiscIO::IVolume::LANGUAGE_JAPANESE:
|
||||
arrayStringFor_Lang.Add(_("Japanese"));
|
||||
break;
|
||||
case IVolume::LANGUAGE_ENGLISH:
|
||||
case DiscIO::IVolume::LANGUAGE_ENGLISH:
|
||||
arrayStringFor_Lang.Add(_("English"));
|
||||
break;
|
||||
case IVolume::LANGUAGE_GERMAN:
|
||||
case DiscIO::IVolume::LANGUAGE_GERMAN:
|
||||
arrayStringFor_Lang.Add(_("German"));
|
||||
break;
|
||||
case IVolume::LANGUAGE_FRENCH:
|
||||
case DiscIO::IVolume::LANGUAGE_FRENCH:
|
||||
arrayStringFor_Lang.Add(_("French"));
|
||||
break;
|
||||
case IVolume::LANGUAGE_SPANISH:
|
||||
case DiscIO::IVolume::LANGUAGE_SPANISH:
|
||||
arrayStringFor_Lang.Add(_("Spanish"));
|
||||
break;
|
||||
case IVolume::LANGUAGE_ITALIAN:
|
||||
case DiscIO::IVolume::LANGUAGE_ITALIAN:
|
||||
arrayStringFor_Lang.Add(_("Italian"));
|
||||
break;
|
||||
case IVolume::LANGUAGE_DUTCH:
|
||||
case DiscIO::IVolume::LANGUAGE_DUTCH:
|
||||
arrayStringFor_Lang.Add(_("Dutch"));
|
||||
break;
|
||||
case IVolume::LANGUAGE_SIMPLIFIED_CHINESE:
|
||||
case DiscIO::IVolume::LANGUAGE_SIMPLIFIED_CHINESE:
|
||||
arrayStringFor_Lang.Add(_("Simplified Chinese"));
|
||||
break;
|
||||
case IVolume::LANGUAGE_TRADITIONAL_CHINESE:
|
||||
case DiscIO::IVolume::LANGUAGE_TRADITIONAL_CHINESE:
|
||||
arrayStringFor_Lang.Add(_("Traditional Chinese"));
|
||||
break;
|
||||
case IVolume::LANGUAGE_KOREAN:
|
||||
case DiscIO::IVolume::LANGUAGE_KOREAN:
|
||||
arrayStringFor_Lang.Add(_("Korean"));
|
||||
break;
|
||||
case IVolume::LANGUAGE_UNKNOWN:
|
||||
case DiscIO::IVolume::LANGUAGE_UNKNOWN:
|
||||
default:
|
||||
arrayStringFor_Lang.Add(_("Unknown"));
|
||||
break;
|
||||
@ -1486,7 +1486,7 @@ void CISOProperties::OnChangeBannerLang(wxCommandEvent& event)
|
||||
ChangeBannerDetails(OpenGameListItem->GetLanguages()[event.GetSelection()]);
|
||||
}
|
||||
|
||||
void CISOProperties::ChangeBannerDetails(IVolume::ELanguage language)
|
||||
void CISOProperties::ChangeBannerDetails(DiscIO::IVolume::ELanguage language)
|
||||
{
|
||||
wxString const shortName = StrToWxStr(OpenGameListItem->GetName(language));
|
||||
wxString const comment = StrToWxStr(OpenGameListItem->GetDescription(language));
|
||||
|
@ -235,7 +235,7 @@ private:
|
||||
void PatchList_Load();
|
||||
void PatchList_Save();
|
||||
void ActionReplayList_Save();
|
||||
void ChangeBannerDetails(IVolume::ELanguage language);
|
||||
void ChangeBannerDetails(DiscIO::IVolume::ELanguage language);
|
||||
|
||||
long GetElementStyle(const char* section, const char* key);
|
||||
void SetCheckboxValueFromGameini(const char* section, const char* key, wxCheckBox* checkbox);
|
||||
|
@ -202,8 +202,8 @@ static std::string GetTitle(std::string filename)
|
||||
auto end = titles.end();
|
||||
|
||||
// English tends to be a good fallback when the requested language isn't available
|
||||
//if (language != IVolume::ELanguage::LANGUAGE_ENGLISH) {
|
||||
auto it = titles.find(IVolume::ELanguage::LANGUAGE_ENGLISH);
|
||||
//if (language != DiscIO::IVolume::ELanguage::LANGUAGE_ENGLISH) {
|
||||
auto it = titles.find(DiscIO::IVolume::ELanguage::LANGUAGE_ENGLISH);
|
||||
if (it != end)
|
||||
return it->second;
|
||||
//}
|
||||
@ -245,8 +245,8 @@ static std::string GetDescription(std::string filename)
|
||||
auto end = descriptions.end();
|
||||
|
||||
// English tends to be a good fallback when the requested language isn't available
|
||||
//if (language != IVolume::ELanguage::LANGUAGE_ENGLISH) {
|
||||
auto it = descriptions.find(IVolume::ELanguage::LANGUAGE_ENGLISH);
|
||||
//if (language != DiscIO::IVolume::ELanguage::LANGUAGE_ENGLISH) {
|
||||
auto it = descriptions.find(DiscIO::IVolume::ELanguage::LANGUAGE_ENGLISH);
|
||||
if (it != end)
|
||||
return it->second;
|
||||
//}
|
||||
|
@ -69,7 +69,7 @@ static wxString FailureReasonStringForHostLabel(int reason)
|
||||
static std::string BuildGameName(const GameListItem& game)
|
||||
{
|
||||
// Lang needs to be consistent
|
||||
IVolume::ELanguage const lang = IVolume::LANGUAGE_ENGLISH;
|
||||
DiscIO::IVolume::ELanguage const lang = DiscIO::IVolume::LANGUAGE_ENGLISH;
|
||||
|
||||
std::string name(game.GetName(lang));
|
||||
|
||||
|
Reference in New Issue
Block a user