continue working on display gamecube game name and description.
now we can select Config -> General -> Game List Language to choose the language of PAL games for displaying git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1979 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
bb06dfb823
commit
189285f071
|
@ -72,6 +72,8 @@ void SConfig::SaveSettings()
|
||||||
ini.Set("Interface", "Theme", m_LocalCoreStartupParameter.iTheme);
|
ini.Set("Interface", "Theme", m_LocalCoreStartupParameter.iTheme);
|
||||||
ini.Set("Interface", "ShowWiimoteLeds", m_LocalCoreStartupParameter.bWiiLeds);
|
ini.Set("Interface", "ShowWiimoteLeds", m_LocalCoreStartupParameter.bWiiLeds);
|
||||||
ini.Set("Interface", "ShowWiimoteSpeakers", m_LocalCoreStartupParameter.bWiiSpeakers);
|
ini.Set("Interface", "ShowWiimoteSpeakers", m_LocalCoreStartupParameter.bWiiSpeakers);
|
||||||
|
// interface(UI) language
|
||||||
|
ini.Set("Interface", "Language", m_InterfaceLanguage);
|
||||||
|
|
||||||
// Core
|
// Core
|
||||||
ini.Set("Core", "HLEBios", m_LocalCoreStartupParameter.bHLEBios);
|
ini.Set("Core", "HLEBios", m_LocalCoreStartupParameter.bHLEBios);
|
||||||
|
@ -172,6 +174,8 @@ void SConfig::LoadSettings()
|
||||||
ini.Get("Interface", "Theme", &m_LocalCoreStartupParameter.iTheme, 0);
|
ini.Get("Interface", "Theme", &m_LocalCoreStartupParameter.iTheme, 0);
|
||||||
ini.Get("Interface", "ShowWiimoteLeds", &m_LocalCoreStartupParameter.bWiiLeds, false);
|
ini.Get("Interface", "ShowWiimoteLeds", &m_LocalCoreStartupParameter.bWiiLeds, false);
|
||||||
ini.Get("Interface", "ShowWiimoteSpeakers", &m_LocalCoreStartupParameter.bWiiSpeakers, false);
|
ini.Get("Interface", "ShowWiimoteSpeakers", &m_LocalCoreStartupParameter.bWiiSpeakers, false);
|
||||||
|
// interface(UI) language
|
||||||
|
ini.Get("Interface", "Language", (int*)&m_InterfaceLanguage, 0);
|
||||||
|
|
||||||
// Core
|
// Core
|
||||||
ini.Get("Core", "HLEBios", &m_LocalCoreStartupParameter.bHLEBios, true);
|
ini.Get("Core", "HLEBios", &m_LocalCoreStartupParameter.bHLEBios, true);
|
||||||
|
|
|
@ -23,6 +23,19 @@
|
||||||
|
|
||||||
#include "Boot/Boot.h"
|
#include "Boot/Boot.h"
|
||||||
|
|
||||||
|
// HyperIris: not sure but a temporary implement
|
||||||
|
enum INTERFACE_LANGUAGE
|
||||||
|
{
|
||||||
|
INTERFACE_ENGLISH = 0,
|
||||||
|
INTERFACE_GERMAN,
|
||||||
|
INTERFACE_FRENCH,
|
||||||
|
INTERFACE_SPANISH,
|
||||||
|
INTERFACE_ITALIAN,
|
||||||
|
INTERFACE_DUTCH,
|
||||||
|
|
||||||
|
INTERFACE_OTHER,
|
||||||
|
};
|
||||||
|
|
||||||
struct SConfig
|
struct SConfig
|
||||||
{
|
{
|
||||||
// hard coded default plugins ...
|
// hard coded default plugins ...
|
||||||
|
@ -39,6 +52,8 @@ struct SConfig
|
||||||
|
|
||||||
SCoreStartupParameter m_LocalCoreStartupParameter;
|
SCoreStartupParameter m_LocalCoreStartupParameter;
|
||||||
|
|
||||||
|
// interface language
|
||||||
|
INTERFACE_LANGUAGE m_InterfaceLanguage;
|
||||||
// save settings
|
// save settings
|
||||||
void SaveSettings();
|
void SaveSettings();
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,9 @@
|
||||||
|
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
|
|
||||||
|
// HyperIris: need clean code
|
||||||
|
#include "../../Core/Src/ConfigManager.h"
|
||||||
|
|
||||||
#include "BannerLoaderGC.h"
|
#include "BannerLoaderGC.h"
|
||||||
|
|
||||||
namespace DiscIO
|
namespace DiscIO
|
||||||
|
@ -101,25 +104,41 @@ CBannerLoaderGC::GetName(std::string& _rName, DiscIO::IVolume::ECountry language
|
||||||
}
|
}
|
||||||
|
|
||||||
// find Banner type
|
// find Banner type
|
||||||
if (DiscIO::IVolume::COUNTRY_JAP == language)
|
switch (getBannerType())
|
||||||
{
|
{
|
||||||
DVDBanner* pBanner = (DVDBanner*)m_pBannerFile;
|
case CBannerLoaderGC::BANNER_BNR1:
|
||||||
|
|
||||||
// dunno, if dolphin using unicode, it will be better = =;
|
|
||||||
if (CopySJISToString(_rName, pBanner->comment.shortTitle))
|
|
||||||
{
|
{
|
||||||
returnCode = true;
|
DVDBanner* pBanner = (DVDBanner*)m_pBannerFile;
|
||||||
|
if (DiscIO::IVolume::COUNTRY_JAP == language)
|
||||||
|
{
|
||||||
|
// dunno, if dolphin using unicode, it will be better = =;
|
||||||
|
if (CopySJISToString(_rName, pBanner->comment.shortTitle))
|
||||||
|
{
|
||||||
|
returnCode = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (CopyToStringAndCheck(_rName, pBanner->comment.shortTitle))//language != 0 ? pBanner->comment[0].shortTitle : pBanner->comment[0].longTitle))
|
||||||
|
{
|
||||||
|
returnCode = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
break;
|
||||||
else
|
case CBannerLoaderGC::BANNER_BNR2:
|
||||||
{
|
|
||||||
DVDBanner2* pBanner = (DVDBanner2*)m_pBannerFile;
|
|
||||||
|
|
||||||
if (CopyToStringAndCheck(_rName, pBanner->comment[0].shortTitle))//language != 0 ? pBanner->comment[0].shortTitle : pBanner->comment[0].longTitle))
|
|
||||||
{
|
{
|
||||||
returnCode = true;
|
DVDBanner2* pBanner = (DVDBanner2*)m_pBannerFile;
|
||||||
|
|
||||||
|
u32 languageID = SConfig::GetInstance().m_InterfaceLanguage;
|
||||||
|
if (CopyToStringAndCheck(_rName, pBanner->comment[languageID].shortTitle))//language != 0 ? pBanner->comment[0].shortTitle : pBanner->comment[0].longTitle))
|
||||||
|
{
|
||||||
|
returnCode = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return returnCode;
|
return returnCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -158,24 +177,39 @@ CBannerLoaderGC::GetDescription(std::string& _rDescription, DiscIO::IVolume::ECo
|
||||||
}
|
}
|
||||||
|
|
||||||
// find Banner type
|
// find Banner type
|
||||||
if (DiscIO::IVolume::COUNTRY_JAP == language)
|
switch (getBannerType())
|
||||||
{
|
{
|
||||||
DVDBanner* pBanner = (DVDBanner*)m_pBannerFile;
|
case CBannerLoaderGC::BANNER_BNR1:
|
||||||
|
|
||||||
// dunno, if dolphin using unicode, it will be better = =;
|
|
||||||
if (CopySJISToString(_rDescription, pBanner->comment.comment))
|
|
||||||
{
|
{
|
||||||
returnCode = true;
|
DVDBanner* pBanner = (DVDBanner*)m_pBannerFile;
|
||||||
|
if (DiscIO::IVolume::COUNTRY_JAP == language)
|
||||||
|
{
|
||||||
|
// dunno, if dolphin using unicode, it will be better = =;
|
||||||
|
if (CopySJISToString(_rDescription, pBanner->comment.comment))
|
||||||
|
{
|
||||||
|
returnCode = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (CopyToStringAndCheck(_rDescription, pBanner->comment.comment))//language != 0 ? pBanner->comment[0].shortTitle : pBanner->comment[0].longTitle))
|
||||||
|
{
|
||||||
|
returnCode = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
break;
|
||||||
else
|
case CBannerLoaderGC::BANNER_BNR2:
|
||||||
{
|
|
||||||
DVDBanner2* pBanner = (DVDBanner2*)m_pBannerFile;
|
|
||||||
|
|
||||||
if (CopyToStringAndCheck(_rDescription, pBanner->comment[0].comment))
|
|
||||||
{
|
{
|
||||||
returnCode = true;
|
DVDBanner2* pBanner = (DVDBanner2*)m_pBannerFile;
|
||||||
|
|
||||||
|
u32 languageID = SConfig::GetInstance().m_InterfaceLanguage;
|
||||||
|
if (CopyToStringAndCheck(_rDescription, pBanner->comment[languageID].comment))//language != 0 ? pBanner->comment[0].shortTitle : pBanner->comment[0].longTitle))
|
||||||
|
{
|
||||||
|
returnCode = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return returnCode;
|
return returnCode;
|
||||||
}
|
}
|
||||||
|
@ -226,4 +260,20 @@ CBannerLoaderGC::decode5A3image(u32* dst, u16* src, int width, int height)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CBannerLoaderGC::BANNER_TYPE CBannerLoaderGC::getBannerType()
|
||||||
|
{
|
||||||
|
u32 bannerSignature = *(u32*)m_pBannerFile;
|
||||||
|
CBannerLoaderGC::BANNER_TYPE type = CBannerLoaderGC::BANNER_UNKNOWN;
|
||||||
|
switch (bannerSignature)
|
||||||
|
{
|
||||||
|
case 0x31524e42:
|
||||||
|
type = CBannerLoaderGC::BANNER_BNR1;
|
||||||
|
break;
|
||||||
|
case 0x32524e42:
|
||||||
|
type = CBannerLoaderGC::BANNER_BNR2;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return type;
|
||||||
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
|
@ -50,6 +50,13 @@ class CBannerLoaderGC
|
||||||
DVD_BANNER_HEIGHT = 32
|
DVD_BANNER_HEIGHT = 32
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum BANNER_TYPE
|
||||||
|
{
|
||||||
|
BANNER_UNKNOWN,
|
||||||
|
BANNER_BNR1,
|
||||||
|
BANNER_BNR2,
|
||||||
|
};
|
||||||
|
|
||||||
// Banner Comment
|
// Banner Comment
|
||||||
struct DVDBannerComment
|
struct DVDBannerComment
|
||||||
{
|
{
|
||||||
|
@ -90,6 +97,7 @@ class CBannerLoaderGC
|
||||||
|
|
||||||
u32 decode5A3(u16 val);
|
u32 decode5A3(u16 val);
|
||||||
void decode5A3image(u32* dst, u16* src, int width, int height);
|
void decode5A3image(u32* dst, u16* src, int width, int height);
|
||||||
|
BANNER_TYPE getBannerType();
|
||||||
};
|
};
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
|
|
@ -53,6 +53,8 @@ EVT_RADIOBOX(ID_INTERFACE_THEME, CConfigMain::CoreSettingsChanged)
|
||||||
EVT_CHECKBOX(ID_INTERFACE_WIIMOTE_LEDS, CConfigMain::CoreSettingsChanged)
|
EVT_CHECKBOX(ID_INTERFACE_WIIMOTE_LEDS, CConfigMain::CoreSettingsChanged)
|
||||||
EVT_CHECKBOX(ID_INTERFACE_WIIMOTE_SPEAKERS, CConfigMain::CoreSettingsChanged)
|
EVT_CHECKBOX(ID_INTERFACE_WIIMOTE_SPEAKERS, CConfigMain::CoreSettingsChanged)
|
||||||
|
|
||||||
|
EVT_CHOICE(ID_INTERFACE_LANG, CConfigMain::InterfaceLanguageChanged)
|
||||||
|
|
||||||
EVT_CHECKBOX(ID_ALLWAYS_HLEBIOS, CConfigMain::CoreSettingsChanged)
|
EVT_CHECKBOX(ID_ALLWAYS_HLEBIOS, CConfigMain::CoreSettingsChanged)
|
||||||
EVT_CHECKBOX(ID_USEDYNAREC, CConfigMain::CoreSettingsChanged)
|
EVT_CHECKBOX(ID_USEDYNAREC, CConfigMain::CoreSettingsChanged)
|
||||||
EVT_CHECKBOX(ID_USEDUALCORE, CConfigMain::CoreSettingsChanged)
|
EVT_CHECKBOX(ID_USEDUALCORE, CConfigMain::CoreSettingsChanged)
|
||||||
|
@ -97,7 +99,7 @@ CConfigMain::CConfigMain(wxWindow* parent, wxWindowID id, const wxString& title,
|
||||||
{
|
{
|
||||||
// Control refreshing of the ISOs list
|
// Control refreshing of the ISOs list
|
||||||
bRefreshList = false;
|
bRefreshList = false;
|
||||||
|
bRefreshCache = false;
|
||||||
// Load Wii SYSCONF
|
// Load Wii SYSCONF
|
||||||
FullSYSCONFPath = FULL_WII_USER_DIR "shared2/sys/SYSCONF";
|
FullSYSCONFPath = FULL_WII_USER_DIR "shared2/sys/SYSCONF";
|
||||||
pStream = NULL;
|
pStream = NULL;
|
||||||
|
@ -155,6 +157,21 @@ void CConfigMain::UpdateGUI()
|
||||||
|
|
||||||
void CConfigMain::CreateGUIControls()
|
void CConfigMain::CreateGUIControls()
|
||||||
{
|
{
|
||||||
|
// Deal with all the language arrayStrings here
|
||||||
|
// GC
|
||||||
|
arrayStringFor_GCSystemLang.Add(wxT("English"));
|
||||||
|
arrayStringFor_GCSystemLang.Add(wxT("German"));
|
||||||
|
arrayStringFor_GCSystemLang.Add(wxT("French"));
|
||||||
|
arrayStringFor_GCSystemLang.Add(wxT("Spanish"));
|
||||||
|
arrayStringFor_GCSystemLang.Add(wxT("Italian"));
|
||||||
|
arrayStringFor_GCSystemLang.Add(wxT("Dutch"));
|
||||||
|
// Wii
|
||||||
|
arrayStringFor_WiiSystemLang = arrayStringFor_GCSystemLang;
|
||||||
|
arrayStringFor_WiiSystemLang.Insert(wxT("Japanese"), 0);
|
||||||
|
// GUI
|
||||||
|
arrayStringFor_InterfaceLang = arrayStringFor_GCSystemLang;
|
||||||
|
|
||||||
|
// Create the notebook and pages
|
||||||
Notebook = new wxNotebook(this, ID_NOTEBOOK, wxDefaultPosition, wxDefaultSize);
|
Notebook = new wxNotebook(this, ID_NOTEBOOK, wxDefaultPosition, wxDefaultSize);
|
||||||
GeneralPage = new wxPanel(Notebook, ID_GENERALPAGE, wxDefaultPosition, wxDefaultSize);
|
GeneralPage = new wxPanel(Notebook, ID_GENERALPAGE, wxDefaultPosition, wxDefaultSize);
|
||||||
GamecubePage = new wxPanel(Notebook, ID_GAMECUBEPAGE, wxDefaultPosition, wxDefaultSize);
|
GamecubePage = new wxPanel(Notebook, ID_GAMECUBEPAGE, wxDefaultPosition, wxDefaultSize);
|
||||||
|
@ -211,6 +228,15 @@ void CConfigMain::CreateGUIControls()
|
||||||
WiimoteStatusLEDs->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bWiiLeds);
|
WiimoteStatusLEDs->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bWiiLeds);
|
||||||
WiimoteStatusSpeakers = new wxCheckBox(GeneralPage, ID_INTERFACE_WIIMOTE_SPEAKERS, wxT("Speakers"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
WiimoteStatusSpeakers = new wxCheckBox(GeneralPage, ID_INTERFACE_WIIMOTE_SPEAKERS, wxT("Speakers"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||||
WiimoteStatusSpeakers->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bWiiSpeakers);
|
WiimoteStatusSpeakers->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bWiiSpeakers);
|
||||||
|
|
||||||
|
// Interface Language
|
||||||
|
// At the moment this only changes the language displayed in m_gamelistctrl
|
||||||
|
// If someone wants to control the whole GUI's language, it should be set here too
|
||||||
|
wxStaticText *InterfaceLangText = new wxStaticText(GeneralPage, ID_INTERFACE_LANG_TEXT, wxT("Game List Language:"), wxDefaultPosition, wxDefaultSize);
|
||||||
|
InterfaceLang = new wxChoice(GeneralPage, ID_INTERFACE_LANG, wxDefaultPosition, wxDefaultSize, arrayStringFor_InterfaceLang, 0, wxDefaultValidator);
|
||||||
|
// need redesign
|
||||||
|
InterfaceLang->SetSelection(SConfig::GetInstance().m_InterfaceLanguage);
|
||||||
|
|
||||||
// Themes
|
// Themes
|
||||||
wxArrayString ThemeChoices;
|
wxArrayString ThemeChoices;
|
||||||
ThemeChoices.Add(wxT("Boomy"));
|
ThemeChoices.Add(wxT("Boomy"));
|
||||||
|
@ -231,6 +257,8 @@ void CConfigMain::CreateGUIControls()
|
||||||
WiimoteStatusLEDs->SetToolTip(wxT("Show which wiimotes are connected in the statusbar."));
|
WiimoteStatusLEDs->SetToolTip(wxT("Show which wiimotes are connected in the statusbar."));
|
||||||
WiimoteStatusSpeakers->SetToolTip(wxT("Show wiimote speaker status in the statusbar."));
|
WiimoteStatusSpeakers->SetToolTip(wxT("Show wiimote speaker status in the statusbar."));
|
||||||
|
|
||||||
|
InterfaceLang->SetToolTip(wxT("For the time being this will only change the text shown in"
|
||||||
|
"\nthe game list of PAL GC games."));
|
||||||
// Copyright notice
|
// Copyright notice
|
||||||
Theme->SetItemToolTip(0, wxT("Created by Milosz Wlazlo [miloszwl@miloszwl.com, miloszwl.deviantart.com]"));
|
Theme->SetItemToolTip(0, wxT("Created by Milosz Wlazlo [miloszwl@miloszwl.com, miloszwl.deviantart.com]"));
|
||||||
Theme->SetItemToolTip(1, wxT("Created by VistaIcons.com"));
|
Theme->SetItemToolTip(1, wxT("Created by VistaIcons.com"));
|
||||||
|
@ -265,6 +293,10 @@ void CConfigMain::CreateGUIControls()
|
||||||
sWiimoteStatus->Add(WiimoteStatusSpeakers, 0, wxLEFT, 5);
|
sWiimoteStatus->Add(WiimoteStatusSpeakers, 0, wxLEFT, 5);
|
||||||
sbInterface->Add(sWiimoteStatus, 0, wxALL, 5);
|
sbInterface->Add(sWiimoteStatus, 0, wxALL, 5);
|
||||||
sbInterface->Add(Theme, 0, wxEXPAND | wxALL, 5);
|
sbInterface->Add(Theme, 0, wxEXPAND | wxALL, 5);
|
||||||
|
wxBoxSizer *sInterfaceLanguage = new wxBoxSizer(wxHORIZONTAL);
|
||||||
|
sInterfaceLanguage->Add(InterfaceLangText, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
||||||
|
sInterfaceLanguage->Add(InterfaceLang, 0, wxEXPAND | wxALL, 5);
|
||||||
|
sbInterface->Add(sInterfaceLanguage, 0, wxEXPAND | wxALL, 5);
|
||||||
|
|
||||||
// Populate the entire page
|
// Populate the entire page
|
||||||
sGeneralPage = new wxBoxSizer(wxVERTICAL);
|
sGeneralPage = new wxBoxSizer(wxVERTICAL);
|
||||||
|
@ -279,12 +311,14 @@ void CConfigMain::CreateGUIControls()
|
||||||
// Gamecube page
|
// Gamecube page
|
||||||
// --------
|
// --------
|
||||||
sbGamecubeIPLSettings = new wxStaticBoxSizer(wxVERTICAL, GamecubePage, wxT("IPL Settings"));
|
sbGamecubeIPLSettings = new wxStaticBoxSizer(wxVERTICAL, GamecubePage, wxT("IPL Settings"));
|
||||||
|
/*
|
||||||
arrayStringFor_GCSystemLang.Add(wxT("English"));
|
arrayStringFor_GCSystemLang.Add(wxT("English"));
|
||||||
arrayStringFor_GCSystemLang.Add(wxT("German"));
|
arrayStringFor_GCSystemLang.Add(wxT("German"));
|
||||||
arrayStringFor_GCSystemLang.Add(wxT("French"));
|
arrayStringFor_GCSystemLang.Add(wxT("French"));
|
||||||
arrayStringFor_GCSystemLang.Add(wxT("Spanish"));
|
arrayStringFor_GCSystemLang.Add(wxT("Spanish"));
|
||||||
arrayStringFor_GCSystemLang.Add(wxT("Italian"));
|
arrayStringFor_GCSystemLang.Add(wxT("Italian"));
|
||||||
arrayStringFor_GCSystemLang.Add(wxT("Dutch"));
|
arrayStringFor_GCSystemLang.Add(wxT("Dutch"));
|
||||||
|
*/
|
||||||
GCSystemLangText = new wxStaticText(GamecubePage, ID_GC_SRAM_LNG_TEXT, wxT("System Language:"), wxDefaultPosition, wxDefaultSize);
|
GCSystemLangText = new wxStaticText(GamecubePage, ID_GC_SRAM_LNG_TEXT, wxT("System Language:"), wxDefaultPosition, wxDefaultSize);
|
||||||
GCSystemLang = new wxChoice(GamecubePage, ID_GC_SRAM_LNG, wxDefaultPosition, wxDefaultSize, arrayStringFor_GCSystemLang, 0, wxDefaultValidator);
|
GCSystemLang = new wxChoice(GamecubePage, ID_GC_SRAM_LNG, wxDefaultPosition, wxDefaultSize, arrayStringFor_GCSystemLang, 0, wxDefaultValidator);
|
||||||
GCSystemLang->SetSelection(SConfig::GetInstance().m_LocalCoreStartupParameter.SelectedLanguage);
|
GCSystemLang->SetSelection(SConfig::GetInstance().m_LocalCoreStartupParameter.SelectedLanguage);
|
||||||
|
@ -319,8 +353,10 @@ void CConfigMain::CreateGUIControls()
|
||||||
WiiAspectRatioText = new wxStaticText(WiiPage, ID_WII_IPL_AR_TEXT, wxT("Aspect Ratio:"), wxDefaultPosition, wxDefaultSize);
|
WiiAspectRatioText = new wxStaticText(WiiPage, ID_WII_IPL_AR_TEXT, wxT("Aspect Ratio:"), wxDefaultPosition, wxDefaultSize);
|
||||||
WiiAspectRatio = new wxChoice(WiiPage, ID_WII_IPL_AR, wxDefaultPosition, wxDefaultSize, arrayStringFor_WiiAspectRatio, 0, wxDefaultValidator);
|
WiiAspectRatio = new wxChoice(WiiPage, ID_WII_IPL_AR, wxDefaultPosition, wxDefaultSize, arrayStringFor_WiiAspectRatio, 0, wxDefaultValidator);
|
||||||
WiiAspectRatio->SetSelection(m_SYSCONF[IPL_AR]);
|
WiiAspectRatio->SetSelection(m_SYSCONF[IPL_AR]);
|
||||||
|
/*
|
||||||
arrayStringFor_WiiSystemLang = arrayStringFor_GCSystemLang;
|
arrayStringFor_WiiSystemLang = arrayStringFor_GCSystemLang;
|
||||||
arrayStringFor_WiiSystemLang.Insert(wxT("Japanese"), 0);
|
arrayStringFor_WiiSystemLang.Insert(wxT("Japanese"), 0);
|
||||||
|
*/
|
||||||
WiiSystemLangText = new wxStaticText(WiiPage, ID_WII_IPL_LNG_TEXT, wxT("System Language:"), wxDefaultPosition, wxDefaultSize);
|
WiiSystemLangText = new wxStaticText(WiiPage, ID_WII_IPL_LNG_TEXT, wxT("System Language:"), wxDefaultPosition, wxDefaultSize);
|
||||||
WiiSystemLang = new wxChoice(WiiPage, ID_WII_IPL_LNG, wxDefaultPosition, wxDefaultSize, arrayStringFor_WiiSystemLang, 0, wxDefaultValidator);
|
WiiSystemLang = new wxChoice(WiiPage, ID_WII_IPL_LNG, wxDefaultPosition, wxDefaultSize, arrayStringFor_WiiSystemLang, 0, wxDefaultValidator);
|
||||||
WiiSystemLang->SetSelection(m_SYSCONF[IPL_LNG]);
|
WiiSystemLang->SetSelection(m_SYSCONF[IPL_LNG]);
|
||||||
|
@ -744,4 +780,16 @@ bool CConfigMain::GetFilename(wxChoice* _pChoice, std::string& _rFilename)
|
||||||
|
|
||||||
return(false);
|
return(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CConfigMain::InterfaceLanguageChanged( wxCommandEvent& event )
|
||||||
|
{
|
||||||
|
switch (event.GetId())
|
||||||
|
{
|
||||||
|
case ID_INTERFACE_LANG:
|
||||||
|
SConfig::GetInstance().m_InterfaceLanguage = (INTERFACE_LANGUAGE)InterfaceLang->GetSelection();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
bRefreshList = true;
|
||||||
|
bRefreshCache = true;
|
||||||
|
}
|
||||||
// ==========================
|
// ==========================
|
||||||
|
|
|
@ -42,6 +42,7 @@ class CConfigMain
|
||||||
void OnConfig(wxCommandEvent& event);
|
void OnConfig(wxCommandEvent& event);
|
||||||
|
|
||||||
bool bRefreshList;
|
bool bRefreshList;
|
||||||
|
bool bRefreshCache;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -50,6 +51,10 @@ class CConfigMain
|
||||||
wxBoxSizer* sGeneralPage; // General Settings
|
wxBoxSizer* sGeneralPage; // General Settings
|
||||||
wxCheckBox* ConfirmStop, * AutoHideCursor, *HideCursor;
|
wxCheckBox* ConfirmStop, * AutoHideCursor, *HideCursor;
|
||||||
wxCheckBox* WiimoteStatusLEDs, * WiimoteStatusSpeakers;
|
wxCheckBox* WiimoteStatusLEDs, * WiimoteStatusSpeakers;
|
||||||
|
|
||||||
|
wxArrayString arrayStringFor_InterfaceLang;
|
||||||
|
wxChoice* InterfaceLang;
|
||||||
|
|
||||||
wxRadioBox* Theme;
|
wxRadioBox* Theme;
|
||||||
|
|
||||||
wxBoxSizer* sCore;
|
wxBoxSizer* sCore;
|
||||||
|
@ -215,6 +220,7 @@ class CConfigMain
|
||||||
ID_INTERFACE_CONFIRMSTOP, // Interface settings
|
ID_INTERFACE_CONFIRMSTOP, // Interface settings
|
||||||
ID_INTERFACE_HIDECURSOR_TEXT, ID_INTERFACE_HIDECURSOR, ID_INTERFACE_AUTOHIDECURSOR,
|
ID_INTERFACE_HIDECURSOR_TEXT, ID_INTERFACE_HIDECURSOR, ID_INTERFACE_AUTOHIDECURSOR,
|
||||||
ID_INTERFACE_WIIMOTE_TEXT, ID_INTERFACE_WIIMOTE_LEDS, ID_INTERFACE_WIIMOTE_SPEAKERS,
|
ID_INTERFACE_WIIMOTE_TEXT, ID_INTERFACE_WIIMOTE_LEDS, ID_INTERFACE_WIIMOTE_SPEAKERS,
|
||||||
|
ID_INTERFACE_LANG_TEXT, ID_INTERFACE_LANG,
|
||||||
ID_INTERFACE_THEME,
|
ID_INTERFACE_THEME,
|
||||||
|
|
||||||
ID_WII_BT_BAR_TEXT,
|
ID_WII_BT_BAR_TEXT,
|
||||||
|
@ -255,6 +261,7 @@ class CConfigMain
|
||||||
void CreateGUIControls(); void UpdateGUI();
|
void CreateGUIControls(); void UpdateGUI();
|
||||||
void OnClose(wxCloseEvent& event);
|
void OnClose(wxCloseEvent& event);
|
||||||
void CoreSettingsChanged(wxCommandEvent& event);
|
void CoreSettingsChanged(wxCommandEvent& event);
|
||||||
|
void InterfaceLanguageChanged(wxCommandEvent& event);
|
||||||
void GCSettingsChanged(wxCommandEvent& event);
|
void GCSettingsChanged(wxCommandEvent& event);
|
||||||
void WiiSettingsChanged(wxCommandEvent& event);
|
void WiiSettingsChanged(wxCommandEvent& event);
|
||||||
void ISOPathsSelectionChanged(wxCommandEvent& event);
|
void ISOPathsSelectionChanged(wxCommandEvent& event);
|
||||||
|
|
|
@ -181,8 +181,8 @@ void CFrame::PopulateToolbar(wxToolBar* toolBar)
|
||||||
toolBar->AddTool(wxID_OPEN, _T("Open"), m_Bitmaps[Toolbar_FileOpen], _T("Open file..."));
|
toolBar->AddTool(wxID_OPEN, _T("Open"), m_Bitmaps[Toolbar_FileOpen], _T("Open file..."));
|
||||||
toolBar->AddTool(wxID_REFRESH, _T("Refresh"), m_Bitmaps[Toolbar_Refresh], _T("Refresh"));
|
toolBar->AddTool(wxID_REFRESH, _T("Refresh"), m_Bitmaps[Toolbar_Refresh], _T("Refresh"));
|
||||||
toolBar->AddTool(IDM_BROWSE, _T("Browse"), m_Bitmaps[Toolbar_Browse], _T("Browse for an ISO directory..."));
|
toolBar->AddTool(IDM_BROWSE, _T("Browse"), m_Bitmaps[Toolbar_Browse], _T("Browse for an ISO directory..."));
|
||||||
toolBar->AddSeparator();
|
toolBar->AddSeparator();
|
||||||
|
|
||||||
m_pToolPlay = toolBar->AddTool(IDM_PLAY, _T("Play"), m_Bitmaps[Toolbar_Play], _T("Play"));
|
m_pToolPlay = toolBar->AddTool(IDM_PLAY, _T("Play"), m_Bitmaps[Toolbar_Play], _T("Play"));
|
||||||
|
|
||||||
|
|
||||||
|
@ -219,8 +219,8 @@ void CFrame::PopulateToolbar(wxToolBar* toolBar)
|
||||||
// Delete and recreate the toolbar
|
// Delete and recreate the toolbar
|
||||||
// ¯¯¯¯¯¯¯¯¯¯
|
// ¯¯¯¯¯¯¯¯¯¯
|
||||||
void CFrame::RecreateToolbar()
|
void CFrame::RecreateToolbar()
|
||||||
{
|
{
|
||||||
|
|
||||||
wxToolBarBase* toolBar = GetToolBar();
|
wxToolBarBase* toolBar = GetToolBar();
|
||||||
long style = toolBar ? toolBar->GetWindowStyle() : TOOLBAR_STYLE;
|
long style = toolBar ? toolBar->GetWindowStyle() : TOOLBAR_STYLE;
|
||||||
|
|
||||||
|
@ -531,7 +531,7 @@ void CFrame::OnConfigMain(wxCommandEvent& WXUNUSED (event))
|
||||||
CConfigMain ConfigMain(this);
|
CConfigMain ConfigMain(this);
|
||||||
ConfigMain.ShowModal();
|
ConfigMain.ShowModal();
|
||||||
if (ConfigMain.bRefreshList)
|
if (ConfigMain.bRefreshList)
|
||||||
m_GameListCtrl->Update();
|
m_GameListCtrl->Update(ConfigMain.bRefreshCache);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -655,8 +655,8 @@ void CFrame::OnSaveState(wxCommandEvent& event)
|
||||||
// -------------
|
// -------------
|
||||||
void CFrame::OnToggleToolbar(wxCommandEvent& event)
|
void CFrame::OnToggleToolbar(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
wxToolBarBase* toolBar = GetToolBar();
|
wxToolBarBase* toolBar = GetToolBar();
|
||||||
|
|
||||||
if (event.IsChecked())
|
if (event.IsChecked())
|
||||||
{
|
{
|
||||||
CFrame::RecreateToolbar();
|
CFrame::RecreateToolbar();
|
||||||
|
|
|
@ -125,7 +125,7 @@ void CGameListCtrl::BrowseForDirectory()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGameListCtrl::Update()
|
void CGameListCtrl::Update(bool bUpdateCache)
|
||||||
{
|
{
|
||||||
if (m_imageListSmall)
|
if (m_imageListSmall)
|
||||||
{
|
{
|
||||||
|
@ -135,7 +135,7 @@ void CGameListCtrl::Update()
|
||||||
|
|
||||||
Hide();
|
Hide();
|
||||||
|
|
||||||
ScanForISOs();
|
ScanForISOs(bUpdateCache);
|
||||||
|
|
||||||
ClearAll();
|
ClearAll();
|
||||||
|
|
||||||
|
@ -363,7 +363,7 @@ void CGameListCtrl::SetBackgroundColor()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGameListCtrl::ScanForISOs()
|
void CGameListCtrl::ScanForISOs(bool bUpdateCache)
|
||||||
{
|
{
|
||||||
m_ISOFiles.clear();
|
m_ISOFiles.clear();
|
||||||
CFileSearch::XStringVector Directories(SConfig::GetInstance().m_ISOFolder);
|
CFileSearch::XStringVector Directories(SConfig::GetInstance().m_ISOFolder);
|
||||||
|
@ -407,7 +407,7 @@ void CGameListCtrl::ScanForISOs()
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
GameListItem ISOFile(rFilenames[i]);
|
GameListItem ISOFile(rFilenames[i], bUpdateCache);
|
||||||
if (ISOFile.IsValid())
|
if (ISOFile.IsValid())
|
||||||
{
|
{
|
||||||
m_ISOFiles.push_back(ISOFile);
|
m_ISOFiles.push_back(ISOFile);
|
||||||
|
|
|
@ -31,7 +31,7 @@ public:
|
||||||
CGameListCtrl(wxWindow* parent, const wxWindowID id, const wxPoint& pos, const wxSize& size, long style);
|
CGameListCtrl(wxWindow* parent, const wxWindowID id, const wxPoint& pos, const wxSize& size, long style);
|
||||||
~CGameListCtrl();
|
~CGameListCtrl();
|
||||||
|
|
||||||
void Update();
|
void Update(bool bUpdateCache = false);
|
||||||
void BrowseForDirectory();
|
void BrowseForDirectory();
|
||||||
const GameListItem *GetSelectedISO();
|
const GameListItem *GetSelectedISO();
|
||||||
const GameListItem *GetISO(int index) const;
|
const GameListItem *GetISO(int index) const;
|
||||||
|
@ -60,7 +60,7 @@ private:
|
||||||
void InitBitmaps();
|
void InitBitmaps();
|
||||||
void InsertItemInReportView(long _Index);
|
void InsertItemInReportView(long _Index);
|
||||||
void SetBackgroundColor();
|
void SetBackgroundColor();
|
||||||
void ScanForISOs();
|
void ScanForISOs(bool bUpdateCache);
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
static u32 g_ImageTemp[DVD_BANNER_WIDTH * DVD_BANNER_HEIGHT];
|
static u32 g_ImageTemp[DVD_BANNER_WIDTH * DVD_BANNER_HEIGHT];
|
||||||
|
|
||||||
GameListItem::GameListItem(const std::string& _rFileName)
|
GameListItem::GameListItem(const std::string& _rFileName, bool bUpdateCache)
|
||||||
: m_FileName(_rFileName)
|
: m_FileName(_rFileName)
|
||||||
, m_FileSize(0)
|
, m_FileSize(0)
|
||||||
, m_Valid(false)
|
, m_Valid(false)
|
||||||
|
@ -48,7 +48,7 @@ GameListItem::GameListItem(const std::string& _rFileName)
|
||||||
, m_ImageSize(0)
|
, m_ImageSize(0)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (LoadFromCache())
|
if ((bUpdateCache == false) && LoadFromCache())
|
||||||
{
|
{
|
||||||
m_Valid = true;
|
m_Valid = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ class PointerWrap;
|
||||||
class GameListItem
|
class GameListItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
GameListItem(const std::string& _rFileName);
|
GameListItem(const std::string& _rFileName, bool bUpdateCache = false);
|
||||||
~GameListItem();
|
~GameListItem();
|
||||||
|
|
||||||
bool IsValid() const {return m_Valid;}
|
bool IsValid() const {return m_Valid;}
|
||||||
|
|
Loading…
Reference in New Issue