1) Added a "General" tab to config window 2) Moved Interface settings to General tab 3) some code organization

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1652 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
omegadox 2008-12-25 07:28:41 +00:00
parent 34b92fe7c5
commit bce493cf3d
2 changed files with 238 additions and 219 deletions

View File

@ -100,241 +100,256 @@ CConfigMain::~CConfigMain()
void CConfigMain::CreateGUIControls()
{
Notebook = new wxNotebook(this, ID_NOTEBOOK, wxDefaultPosition, wxDefaultSize);
GeneralPage = new wxPanel(Notebook, ID_GENERALPAGE, wxDefaultPosition, wxDefaultSize);
Notebook->AddPage(GeneralPage, wxT("Core"));
CorePage = new wxPanel(Notebook, ID_COREPAGE, wxDefaultPosition, wxDefaultSize);
GamecubePage = new wxPanel(Notebook, ID_GAMECUBEPAGE, wxDefaultPosition, wxDefaultSize);
Notebook->AddPage(GamecubePage, wxT("Gamecube"));
WiiPage = new wxPanel(Notebook, ID_WIIPAGE, wxDefaultPosition, wxDefaultSize);
Notebook->AddPage(WiiPage, wxT("Wii"));
PathsPage = new wxPanel(Notebook, ID_PATHSPAGE, wxDefaultPosition, wxDefaultSize);
Notebook->AddPage(PathsPage, wxT("Paths"));
PluginPage = new wxPanel(Notebook, ID_PLUGINPAGE, wxDefaultPosition, wxDefaultSize);
Notebook->AddPage(GeneralPage, wxT("General"));
Notebook->AddPage(CorePage, wxT("Core"));
Notebook->AddPage(GamecubePage, wxT("Gamecube"));
Notebook->AddPage(WiiPage, wxT("Wii"));
Notebook->AddPage(PathsPage, wxT("Paths"));
Notebook->AddPage(PluginPage, wxT("Plugins"));
//////////////////////////////////
// General page
// --------
// Interface Settings
ConfirmStop = new wxCheckBox(GeneralPage, ID_INTERFACE_CONFIRMSTOP, wxT("Confirm On Stop"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
ConfirmStop->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bConfirmStop);
sbInterface = new wxStaticBoxSizer(wxVERTICAL, GeneralPage, wxT("Interface Settings"));
sbInterface->Add(ConfirmStop, 0, wxALL, 5);
sGeneralPage = new wxBoxSizer(wxVERTICAL);
sGeneralPage->Add(sbInterface, 0, wxALL|wxEXPAND, 5);
GeneralPage->SetSizer(sGeneralPage);
sGeneralPage->Layout();
//////////////////////////////////
// Core page
// --------
sCore = new wxBoxSizer(wxVERTICAL);
// Basic Settings
sbBasic = new wxStaticBoxSizer(wxVERTICAL, CorePage, wxT("Basic Settings"));
UseDualCore = new wxCheckBox(CorePage, ID_USEDUALCORE, wxT("Enable Dual Core"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
UseDualCore->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bUseDualCore);
SkipIdle = new wxCheckBox(CorePage, ID_IDLESKIP, wxT("Enable Idle Skipping"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
SkipIdle->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bSkipIdle);
EnableCheats = new wxCheckBox(CorePage, ID_ENABLECHEATS, wxT("Enable Cheats"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
EnableCheats->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableCheats);
sbBasic->Add(UseDualCore, 0, wxALL, 5);
sbBasic->Add(SkipIdle, 0, wxALL, 5);
sbBasic->Add(EnableCheats, 0, wxALL, 5);
// Advanced Settings
sbAdvanced = new wxStaticBoxSizer(wxVERTICAL, CorePage, wxT("Advanced Settings"));
AllwaysHLEBIOS = new wxCheckBox(CorePage, ID_ALLWAYS_HLEBIOS, wxT("HLE the BIOS all the time"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
AllwaysHLEBIOS->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bHLEBios);
UseDynaRec = new wxCheckBox(CorePage, ID_USEDYNAREC, wxT("Enable Dynamic Recompilation"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
UseDynaRec->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bUseJIT);
LockThreads = new wxCheckBox(CorePage, ID_LOCKTHREADS, wxT("Lock threads to cores"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
LockThreads->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bLockThreads);
OptimizeQuantizers = new wxCheckBox(CorePage, ID_OPTIMIZEQUANTIZERS, wxT("Optimize Quantizers"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
OptimizeQuantizers->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bOptimizeQuantizers);
sbAdvanced->Add(AllwaysHLEBIOS, 0, wxALL, 5);
sbAdvanced->Add(UseDynaRec, 0, wxALL, 5);
sbAdvanced->Add(LockThreads, 0, wxALL, 5);
sbAdvanced->Add(OptimizeQuantizers, 0, wxALL, 5);
// Populate sCore
sCore->Add(sbBasic, 0, wxEXPAND|wxALL, 5);
//sCore->AddStretchSpacer();
sCore->Add(sbAdvanced, 0, wxEXPAND|wxALL, 5);
CorePage->SetSizer(sCore);
sCore->Layout();
//////////////////////////////////
// Gamecube page
// --------
sbGamecubeIPLSettings = new wxStaticBoxSizer(wxVERTICAL, GamecubePage, wxT("IPL Settings"));
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"));
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->SetSelection(SConfig::GetInstance().m_LocalCoreStartupParameter.SelectedLanguage);
sGamecube = new wxBoxSizer(wxVERTICAL);
sGamecubeIPLSettings = new wxGridBagSizer(0, 0);
sGamecubeIPLSettings->Add(GCSystemLangText, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
sGamecubeIPLSettings->Add(GCSystemLang, wxGBPosition(0, 1), wxGBSpan(1, 1), wxALL, 5);
sbGamecubeIPLSettings->Add(sGamecubeIPLSettings);
sGamecube->Add(sbGamecubeIPLSettings, 0, wxEXPAND|wxALL, 5);
GamecubePage->SetSizer(sGamecube);
sGamecube->Layout();
//////////////////////////////////
// Wii page
// --------
sbWiimoteSettings = new wxStaticBoxSizer(wxVERTICAL, WiiPage, wxT("Wiimote Settings"));
arrayStringFor_WiiSensBarPos.Add(wxT("Bottom")); arrayStringFor_WiiSensBarPos.Add(wxT("Top"));
WiiSensBarPosText = new wxStaticText(WiiPage, ID_WII_BT_BAR_TEXT, wxT("Sensor Bar Position:"), wxDefaultPosition, wxDefaultSize);
WiiSensBarPos = new wxChoice(WiiPage, ID_WII_BT_BAR, wxDefaultPosition, wxDefaultSize, arrayStringFor_WiiSensBarPos, 0, wxDefaultValidator);
WiiSensBarPos->SetSelection(m_SYSCONF[BT_BAR]);
WiiLeds = new wxCheckBox(WiiPage, ID_WII_BT_LEDS, wxT("Show Wiimote Leds in status bar"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
WiiLeds->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bWiiLeds);
WiiSpeakers = new wxCheckBox(WiiPage, ID_WII_BT_SPEAKERS, wxT("Show Wiimote Speaker status in status bar"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
WiiSpeakers->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bWiiSpeakers);
sbWiiIPLSettings = new wxStaticBoxSizer(wxVERTICAL, WiiPage, wxT("IPL Settings"));
WiiScreenSaver = new wxCheckBox(WiiPage, ID_WII_IPL_SSV, wxT("Enable Screen Saver (burn-in reduction)"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
WiiScreenSaver->SetValue(m_SYSCONF[IPL_SSV]!=0);
WiiProgressiveScan = new wxCheckBox(WiiPage, ID_WII_IPL_PGS, wxT("Enable Progressive Scan"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
WiiProgressiveScan->SetValue(m_SYSCONF[IPL_PGS]!=0);
WiiEuRGB60 = new wxCheckBox(WiiPage, ID_WII_IPL_E60, wxT("Use EuRGB60 Mode (PAL6)"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
WiiEuRGB60->SetValue(m_SYSCONF[IPL_E60]!=0);
arrayStringFor_WiiAspectRatio.Add(wxT("4:3")); arrayStringFor_WiiAspectRatio.Add(wxT("16:9"));
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->SetSelection(m_SYSCONF[IPL_AR]);
arrayStringFor_WiiSystemLang = arrayStringFor_GCSystemLang;
arrayStringFor_WiiSystemLang.Insert(wxT("Japanese"), 0);
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->SetSelection(m_SYSCONF[IPL_LNG]);
// Populate sbWiimoteSettings
sWii = new wxBoxSizer(wxVERTICAL);
sWiimoteSettings = new wxGridBagSizer(0, 0);
sWiimoteSettings->Add(WiiSensBarPosText, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
sWiimoteSettings->Add(WiiSensBarPos, wxGBPosition(0, 1), wxGBSpan(1, 1), wxALL, 5);
sWiimoteSettings->Add(WiiLeds, wxGBPosition(1, 0), wxGBSpan(1, 2), wxALL, 5);
sWiimoteSettings->Add(WiiSpeakers, wxGBPosition(2, 0), wxGBSpan(1, 2), wxALL, 5);
sbWiimoteSettings->Add(sWiimoteSettings);
sWii->Add(sbWiimoteSettings, 0, wxEXPAND|wxALL, 5);
sWiiIPLSettings = new wxGridBagSizer(0, 0);
sWiiIPLSettings->Add(WiiScreenSaver, wxGBPosition(0, 0), wxGBSpan(1, 2), wxALL, 5);
sWiiIPLSettings->Add(WiiProgressiveScan, wxGBPosition(1, 0), wxGBSpan(1, 2), wxALL, 5);
sWiiIPLSettings->Add(WiiEuRGB60, wxGBPosition(2, 0), wxGBSpan(1, 2), wxALL, 5);
sWiiIPLSettings->Add(WiiAspectRatioText, wxGBPosition(3, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
sWiiIPLSettings->Add(WiiAspectRatio, wxGBPosition(3, 1), wxGBSpan(1, 1), wxALL, 5);
sWiiIPLSettings->Add(WiiSystemLangText, wxGBPosition(4, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
sWiiIPLSettings->Add(WiiSystemLang, wxGBPosition(4, 1), wxGBSpan(1, 1), wxALL, 5);
sbWiiIPLSettings->Add(sWiiIPLSettings);
sWii->Add(sbWiiIPLSettings, 0, wxEXPAND|wxALL, 5);
WiiPage->SetSizer(sWii);
sWii->Layout();
//////////////////////////////////
// Paths page
// --------
sbISOPaths = new wxStaticBoxSizer(wxVERTICAL, PathsPage, wxT("ISO Directories"));
ISOPaths = new wxListBox(PathsPage, ID_ISOPATHS, wxDefaultPosition, wxDefaultSize, arrayStringFor_ISOPaths, wxLB_SINGLE, wxDefaultValidator);
AddISOPath = new wxButton(PathsPage, ID_ADDISOPATH, wxT("Add..."), wxDefaultPosition, wxDefaultSize, 0);
RemoveISOPath = new wxButton(PathsPage, ID_REMOVEISOPATH, wxT("Remove"), wxDefaultPosition, wxDefaultSize, 0);
RemoveISOPath->Enable(false);
DefaultISOText = new wxStaticText(PathsPage, ID_DEFAULTISO_TEXT, wxT("Default ISO:"), wxDefaultPosition, wxDefaultSize);
DefaultISO = new wxFilePickerCtrl(PathsPage, ID_DEFAULTISO, wxEmptyString, wxT("Choose a default ISO:"),
wxString::Format(wxT("All GC/Wii images (gcm, iso, gcz)|*.gcm;*.iso;*.gcz|All files (%s)|%s"), wxFileSelectorDefaultWildcardStr, wxFileSelectorDefaultWildcardStr),
wxDefaultPosition, wxDefaultSize, wxFLP_USE_TEXTCTRL|wxFLP_FILE_MUST_EXIST|wxFLP_OPEN);
DefaultISO->SetPath(wxString::FromAscii(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDefaultGCM.c_str()));
DVDRootText = new wxStaticText(PathsPage, ID_DVDROOT_TEXT, wxT("DVD Root:"), wxDefaultPosition, wxDefaultSize);
DVDRoot = new wxDirPickerCtrl(PathsPage, ID_DVDROOT, wxEmptyString, wxT("Choose a DVD root directory:"), wxDefaultPosition, wxDefaultSize, wxDIRP_USE_TEXTCTRL);
DVDRoot->SetPath(wxString::FromAscii(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDVDRoot.c_str()));
sPaths = new wxBoxSizer(wxVERTICAL);
sbISOPaths->Add(ISOPaths, 1, wxEXPAND|wxALL, 0);
sISOButtons = new wxBoxSizer(wxHORIZONTAL);
sISOButtons->AddStretchSpacer(1);
sISOButtons->Add(AddISOPath, 0, wxALL, 0);
sISOButtons->Add(RemoveISOPath, 0, wxALL, 0);
sbISOPaths->Add(sISOButtons, 0, wxEXPAND|wxALL, 5);
sPaths->Add(sbISOPaths, 1, wxEXPAND|wxALL, 5);
sOtherPaths = new wxGridBagSizer(0, 0);
sOtherPaths->AddGrowableCol(1);
sOtherPaths->Add(DefaultISOText, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
sOtherPaths->Add(DefaultISO, wxGBPosition(0, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5);
sOtherPaths->Add(DVDRootText, wxGBPosition(1, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
sOtherPaths->Add(DVDRoot, wxGBPosition(1, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5);
sPaths->Add(sOtherPaths, 0, wxEXPAND|wxALL, 5);
PathsPage->SetSizer(sPaths);
sPaths->Layout();
//////////////////////////////////
// Plugins page
// --------
sbGraphicsPlugin = new wxStaticBoxSizer(wxHORIZONTAL, PluginPage, wxT("Graphics"));
GraphicSelection = new wxChoice(PluginPage, ID_GRAPHIC_CB, wxDefaultPosition, wxDefaultSize, NULL, 0, wxDefaultValidator);
GraphicConfig = new wxButton(PluginPage, ID_GRAPHIC_CONFIG, wxT("Config..."), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
sbDSPPlugin = new wxStaticBoxSizer(wxHORIZONTAL, PluginPage, wxT("DSP"));
DSPSelection = new wxChoice(PluginPage, ID_DSP_CB, wxDefaultPosition, wxDefaultSize, NULL, 0, wxDefaultValidator);
DSPConfig = new wxButton(PluginPage, ID_DSP_CONFIG, wxT("Config..."), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
sbPadPlugin = new wxStaticBoxSizer(wxHORIZONTAL, PluginPage, wxT("Pad"));
PADSelection = new wxChoice(PluginPage, ID_PAD_CB, wxDefaultPosition, wxDefaultSize, NULL, 0, wxDefaultValidator);
PADConfig = new wxButton(PluginPage, ID_PAD_CONFIG, wxT("Config..."), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
sbWiimotePlugin = new wxStaticBoxSizer(wxHORIZONTAL, PluginPage, wxT("Wiimote"));
WiimoteSelection = new wxChoice(PluginPage, ID_WIIMOTE_CB, wxDefaultPosition, wxDefaultSize, NULL, 0, wxDefaultValidator);
WiimoteConfig = new wxButton(PluginPage, ID_WIIMOTE_CONFIG, wxT("Config..."), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
FillChoiceBox(GraphicSelection, PLUGIN_TYPE_VIDEO, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoPlugin);
FillChoiceBox(DSPSelection, PLUGIN_TYPE_DSP, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDSPPlugin);
FillChoiceBox(PADSelection, PLUGIN_TYPE_PAD, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strPadPlugin);
FillChoiceBox(WiimoteSelection, PLUGIN_TYPE_WIIMOTE, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strWiimotePlugin);
sPlugins = new wxBoxSizer(wxVERTICAL);
sbGraphicsPlugin->Add(GraphicSelection, 1, wxEXPAND|wxALL, 5);
sbGraphicsPlugin->Add(GraphicConfig, 0, wxALL, 5);
sPlugins->Add(sbGraphicsPlugin, 0, wxEXPAND|wxALL, 5);
sbDSPPlugin->Add(DSPSelection, 1, wxEXPAND|wxALL, 5);
sbDSPPlugin->Add(DSPConfig, 0, wxALL, 5);
sPlugins->Add(sbDSPPlugin, 0, wxEXPAND|wxALL, 5);
sbPadPlugin->Add(PADSelection, 1, wxEXPAND|wxALL, 5);
sbPadPlugin->Add(PADConfig, 0, wxALL, 5);
sPlugins->Add(sbPadPlugin, 0, wxEXPAND|wxALL, 5);
sbWiimotePlugin->Add(WiimoteSelection, 1, wxEXPAND|wxALL, 5);
sbWiimotePlugin->Add(WiimoteConfig, 0, wxALL, 5);
sPlugins->Add(sbWiimotePlugin, 0, wxEXPAND|wxALL, 5);
PluginPage->SetSizer(sPlugins);
sPlugins->Layout();
m_Close = new wxButton(this, ID_CLOSE, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
wxBoxSizer* sButtons;
sButtons = new wxBoxSizer(wxHORIZONTAL);
wxBoxSizer* sButtons = new wxBoxSizer(wxHORIZONTAL);
sButtons->Add(0, 0, 1, wxEXPAND, 5);
sButtons->Add(m_Close, 0, wxALL, 5);
wxBoxSizer* sMain;
sMain = new wxBoxSizer(wxVERTICAL);
wxBoxSizer* sMain = new wxBoxSizer(wxVERTICAL);
sMain->Add(Notebook, 1, wxEXPAND|wxALL, 5);
sMain->Add(sButtons, 0, wxEXPAND, 5);
this->SetSizer(sMain);
this->Layout();
//////////////////////////////////
// Core page (sGeneral)
// -----------
sGeneral = new wxBoxSizer(wxVERTICAL);
// Basic Settings
sbBasic = new wxStaticBoxSizer(wxVERTICAL, GeneralPage, wxT("Basic Settings"));
UseDualCore = new wxCheckBox(GeneralPage, ID_USEDUALCORE, wxT("Enable Dual Core"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
UseDualCore->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bUseDualCore);
SkipIdle = new wxCheckBox(GeneralPage, ID_IDLESKIP, wxT("Enable Idle Skipping"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
SkipIdle->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bSkipIdle);
EnableCheats = new wxCheckBox(GeneralPage, ID_ENABLECHEATS, wxT("Enable Cheats"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
EnableCheats->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableCheats);
sbBasic->Add(UseDualCore, 0, wxALL, 5);
sbBasic->Add(SkipIdle, 0, wxALL, 5);
sbBasic->Add(EnableCheats, 0, wxALL, 5);
// Advanced Settings
sbAdvanced = new wxStaticBoxSizer(wxVERTICAL, GeneralPage, wxT("Advanced Settings"));
AllwaysHLEBIOS = new wxCheckBox(GeneralPage, ID_ALLWAYS_HLEBIOS, wxT("HLE the BIOS all the time"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
AllwaysHLEBIOS->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bHLEBios);
UseDynaRec = new wxCheckBox(GeneralPage, ID_USEDYNAREC, wxT("Enable Dynamic Recompilation"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
UseDynaRec->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bUseJIT);
LockThreads = new wxCheckBox(GeneralPage, ID_LOCKTHREADS, wxT("Lock threads to cores"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
LockThreads->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bLockThreads);
OptimizeQuantizers = new wxCheckBox(GeneralPage, ID_OPTIMIZEQUANTIZERS, wxT("Optimize Quantizers"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
OptimizeQuantizers->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bOptimizeQuantizers);
sbAdvanced->Add(AllwaysHLEBIOS, 0, wxALL, 5);
sbAdvanced->Add(UseDynaRec, 0, wxALL, 5);
sbAdvanced->Add(LockThreads, 0, wxALL, 5);
sbAdvanced->Add(OptimizeQuantizers, 0, wxALL, 5);
// Interface Settings
sbInterface = new wxStaticBoxSizer(wxVERTICAL, GeneralPage, wxT("Interface Settings"));
ConfirmStop = new wxCheckBox(GeneralPage, ID_INTERFACE_CONFIRMSTOP, wxT("Show confirmation box before Stopping"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
ConfirmStop->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bConfirmStop);
sbInterface->Add(ConfirmStop, 0, wxALL, 5);
// Populate sGeneral
sGeneral->Add(sbBasic, 0, wxEXPAND|wxALL, 5);
//sGeneral->AddStretchSpacer();
sGeneral->Add(sbAdvanced, 0, wxEXPAND|wxALL, 5);
sGeneral->Add(sbInterface, 0, wxEXPAND|wxALL, 5);
GeneralPage->SetSizer(sGeneral);
sGeneral->Layout();
//////////////////////////////////
// Gamecube page
// --------
sbGamecubeIPLSettings = new wxStaticBoxSizer(wxVERTICAL, GamecubePage, wxT("IPL Settings"));
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"));
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->SetSelection(SConfig::GetInstance().m_LocalCoreStartupParameter.SelectedLanguage);
sGamecube = new wxBoxSizer(wxVERTICAL);
sGamecubeIPLSettings = new wxGridBagSizer(0, 0);
sGamecubeIPLSettings->Add(GCSystemLangText, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
sGamecubeIPLSettings->Add(GCSystemLang, wxGBPosition(0, 1), wxGBSpan(1, 1), wxALL, 5);
sbGamecubeIPLSettings->Add(sGamecubeIPLSettings);
sGamecube->Add(sbGamecubeIPLSettings, 0, wxEXPAND|wxALL, 5);
GamecubePage->SetSizer(sGamecube);
sGamecube->Layout();
//////////////////////////////////
// Wii page
// --------
sbWiimoteSettings = new wxStaticBoxSizer(wxVERTICAL, WiiPage, wxT("Wiimote Settings"));
arrayStringFor_WiiSensBarPos.Add(wxT("Bottom")); arrayStringFor_WiiSensBarPos.Add(wxT("Top"));
WiiSensBarPosText = new wxStaticText(WiiPage, ID_WII_BT_BAR_TEXT, wxT("Sensor Bar Position:"), wxDefaultPosition, wxDefaultSize);
WiiSensBarPos = new wxChoice(WiiPage, ID_WII_BT_BAR, wxDefaultPosition, wxDefaultSize, arrayStringFor_WiiSensBarPos, 0, wxDefaultValidator);
WiiSensBarPos->SetSelection(m_SYSCONF[BT_BAR]);
WiiLeds = new wxCheckBox(WiiPage, ID_WII_BT_LEDS, wxT("Show Wiimote Leds in status bar"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
WiiLeds->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bWiiLeds);
WiiSpeakers = new wxCheckBox(WiiPage, ID_WII_BT_SPEAKERS, wxT("Show Wiimote Speaker status in status bar"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
WiiSpeakers->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bWiiSpeakers);
sbWiiIPLSettings = new wxStaticBoxSizer(wxVERTICAL, WiiPage, wxT("IPL Settings"));
WiiScreenSaver = new wxCheckBox(WiiPage, ID_WII_IPL_SSV, wxT("Enable Screen Saver (burn-in reduction)"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
WiiScreenSaver->SetValue(m_SYSCONF[IPL_SSV]!=0);
WiiProgressiveScan = new wxCheckBox(WiiPage, ID_WII_IPL_PGS, wxT("Enable Progressive Scan"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
WiiProgressiveScan->SetValue(m_SYSCONF[IPL_PGS]!=0);
WiiEuRGB60 = new wxCheckBox(WiiPage, ID_WII_IPL_E60, wxT("Use EuRGB60 Mode (PAL6)"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
WiiEuRGB60->SetValue(m_SYSCONF[IPL_E60]!=0);
arrayStringFor_WiiAspectRatio.Add(wxT("4:3")); arrayStringFor_WiiAspectRatio.Add(wxT("16:9"));
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->SetSelection(m_SYSCONF[IPL_AR]);
arrayStringFor_WiiSystemLang = arrayStringFor_GCSystemLang;
arrayStringFor_WiiSystemLang.Insert(wxT("Japanese"), 0);
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->SetSelection(m_SYSCONF[IPL_LNG]);
// Populate sbWiimoteSettings
sWii = new wxBoxSizer(wxVERTICAL);
sWiimoteSettings = new wxGridBagSizer(0, 0);
sWiimoteSettings->Add(WiiSensBarPosText, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
sWiimoteSettings->Add(WiiSensBarPos, wxGBPosition(0, 1), wxGBSpan(1, 1), wxALL, 5);
sWiimoteSettings->Add(WiiLeds, wxGBPosition(1, 0), wxGBSpan(1, 2), wxALL, 5);
sWiimoteSettings->Add(WiiSpeakers, wxGBPosition(2, 0), wxGBSpan(1, 2), wxALL, 5);
sbWiimoteSettings->Add(sWiimoteSettings);
sWii->Add(sbWiimoteSettings, 0, wxEXPAND|wxALL, 5);
sWiiIPLSettings = new wxGridBagSizer(0, 0);
sWiiIPLSettings->Add(WiiScreenSaver, wxGBPosition(0, 0), wxGBSpan(1, 2), wxALL, 5);
sWiiIPLSettings->Add(WiiProgressiveScan, wxGBPosition(1, 0), wxGBSpan(1, 2), wxALL, 5);
sWiiIPLSettings->Add(WiiEuRGB60, wxGBPosition(2, 0), wxGBSpan(1, 2), wxALL, 5);
sWiiIPLSettings->Add(WiiAspectRatioText, wxGBPosition(3, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
sWiiIPLSettings->Add(WiiAspectRatio, wxGBPosition(3, 1), wxGBSpan(1, 1), wxALL, 5);
sWiiIPLSettings->Add(WiiSystemLangText, wxGBPosition(4, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
sWiiIPLSettings->Add(WiiSystemLang, wxGBPosition(4, 1), wxGBSpan(1, 1), wxALL, 5);
sbWiiIPLSettings->Add(sWiiIPLSettings);
sWii->Add(sbWiiIPLSettings, 0, wxEXPAND|wxALL, 5);
WiiPage->SetSizer(sWii);
sWii->Layout();
// Paths page
sbISOPaths = new wxStaticBoxSizer(wxVERTICAL, PathsPage, wxT("ISO Directories"));
ISOPaths = new wxListBox(PathsPage, ID_ISOPATHS, wxDefaultPosition, wxDefaultSize, arrayStringFor_ISOPaths, wxLB_SINGLE, wxDefaultValidator);
AddISOPath = new wxButton(PathsPage, ID_ADDISOPATH, wxT("Add..."), wxDefaultPosition, wxDefaultSize, 0);
RemoveISOPath = new wxButton(PathsPage, ID_REMOVEISOPATH, wxT("Remove"), wxDefaultPosition, wxDefaultSize, 0);
RemoveISOPath->Enable(false);
DefaultISOText = new wxStaticText(PathsPage, ID_DEFAULTISO_TEXT, wxT("Default ISO:"), wxDefaultPosition, wxDefaultSize);
DefaultISO = new wxFilePickerCtrl(PathsPage, ID_DEFAULTISO, wxEmptyString, wxT("Choose a default ISO:"),
wxString::Format(wxT("All GC/Wii images (gcm, iso, gcz)|*.gcm;*.iso;*.gcz|All files (%s)|%s"), wxFileSelectorDefaultWildcardStr, wxFileSelectorDefaultWildcardStr),
wxDefaultPosition, wxDefaultSize, wxFLP_USE_TEXTCTRL|wxFLP_FILE_MUST_EXIST|wxFLP_OPEN);
DefaultISO->SetPath(wxString::FromAscii(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDefaultGCM.c_str()));
DVDRootText = new wxStaticText(PathsPage, ID_DVDROOT_TEXT, wxT("DVD Root:"), wxDefaultPosition, wxDefaultSize);
DVDRoot = new wxDirPickerCtrl(PathsPage, ID_DVDROOT, wxEmptyString, wxT("Choose a DVD root directory:"), wxDefaultPosition, wxDefaultSize, wxDIRP_USE_TEXTCTRL);
DVDRoot->SetPath(wxString::FromAscii(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDVDRoot.c_str()));
sPaths = new wxBoxSizer(wxVERTICAL);
sbISOPaths->Add(ISOPaths, 1, wxEXPAND|wxALL, 0);
sISOButtons = new wxBoxSizer(wxHORIZONTAL);
sISOButtons->AddStretchSpacer(1);
sISOButtons->Add(AddISOPath, 0, wxALL, 0);
sISOButtons->Add(RemoveISOPath, 0, wxALL, 0);
sbISOPaths->Add(sISOButtons, 0, wxEXPAND|wxALL, 5);
sPaths->Add(sbISOPaths, 1, wxEXPAND|wxALL, 5);
sOtherPaths = new wxGridBagSizer(0, 0);
sOtherPaths->AddGrowableCol(1);
sOtherPaths->Add(DefaultISOText, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
sOtherPaths->Add(DefaultISO, wxGBPosition(0, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5);
sOtherPaths->Add(DVDRootText, wxGBPosition(1, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
sOtherPaths->Add(DVDRoot, wxGBPosition(1, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5);
sPaths->Add(sOtherPaths, 0, wxEXPAND|wxALL, 5);
PathsPage->SetSizer(sPaths);
sPaths->Layout();
// Plugin page
sbGraphicsPlugin = new wxStaticBoxSizer(wxHORIZONTAL, PluginPage, wxT("Graphics"));
GraphicSelection = new wxChoice(PluginPage, ID_GRAPHIC_CB, wxDefaultPosition, wxDefaultSize, NULL, 0, wxDefaultValidator);
GraphicConfig = new wxButton(PluginPage, ID_GRAPHIC_CONFIG, wxT("Config..."), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
sbDSPPlugin = new wxStaticBoxSizer(wxHORIZONTAL, PluginPage, wxT("DSP"));
DSPSelection = new wxChoice(PluginPage, ID_DSP_CB, wxDefaultPosition, wxDefaultSize, NULL, 0, wxDefaultValidator);
DSPConfig = new wxButton(PluginPage, ID_DSP_CONFIG, wxT("Config..."), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
sbPadPlugin = new wxStaticBoxSizer(wxHORIZONTAL, PluginPage, wxT("Pad"));
PADSelection = new wxChoice(PluginPage, ID_PAD_CB, wxDefaultPosition, wxDefaultSize, NULL, 0, wxDefaultValidator);
PADConfig = new wxButton(PluginPage, ID_PAD_CONFIG, wxT("Config..."), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
sbWiimotePlugin = new wxStaticBoxSizer(wxHORIZONTAL, PluginPage, wxT("Wiimote"));
WiimoteSelection = new wxChoice(PluginPage, ID_WIIMOTE_CB, wxDefaultPosition, wxDefaultSize, NULL, 0, wxDefaultValidator);
WiimoteConfig = new wxButton(PluginPage, ID_WIIMOTE_CONFIG, wxT("Config..."), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
FillChoiceBox(GraphicSelection, PLUGIN_TYPE_VIDEO, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoPlugin);
FillChoiceBox(DSPSelection, PLUGIN_TYPE_DSP, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDSPPlugin);
FillChoiceBox(PADSelection, PLUGIN_TYPE_PAD, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strPadPlugin);
FillChoiceBox(WiimoteSelection, PLUGIN_TYPE_WIIMOTE, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strWiimotePlugin);
sPlugins = new wxBoxSizer(wxVERTICAL);
sbGraphicsPlugin->Add(GraphicSelection, 1, wxEXPAND|wxALL, 5);
sbGraphicsPlugin->Add(GraphicConfig, 0, wxALL, 5);
sPlugins->Add(sbGraphicsPlugin, 0, wxEXPAND|wxALL, 5);
sbDSPPlugin->Add(DSPSelection, 1, wxEXPAND|wxALL, 5);
sbDSPPlugin->Add(DSPConfig, 0, wxALL, 5);
sPlugins->Add(sbDSPPlugin, 0, wxEXPAND|wxALL, 5);
sbPadPlugin->Add(PADSelection, 1, wxEXPAND|wxALL, 5);
sbPadPlugin->Add(PADConfig, 0, wxALL, 5);
sPlugins->Add(sbPadPlugin, 0, wxEXPAND|wxALL, 5);
sbWiimotePlugin->Add(WiimoteSelection, 1, wxEXPAND|wxALL, 5);
sbWiimotePlugin->Add(WiimoteConfig, 0, wxALL, 5);
sPlugins->Add(sbWiimotePlugin, 0, wxEXPAND|wxALL, 5);
PluginPage->SetSizer(sPlugins);
sPlugins->Layout();
Fit();
Center();
}

View File

@ -45,8 +45,11 @@ class CConfigMain
private:
DECLARE_EVENT_TABLE();
wxBoxSizer* sGeneralPage; // General Settings
wxCheckBox* ConfirmStop;
wxBoxSizer* sGeneral; // Core settings
wxBoxSizer* sCore; // Core settings
wxStaticBoxSizer* sbBasic, *sbAdvanced, *sbInterface;
wxCheckBox* AllwaysHLEBIOS;
wxCheckBox* UseDynaRec;
@ -55,7 +58,6 @@ class CConfigMain
wxCheckBox* OptimizeQuantizers;
wxCheckBox* SkipIdle;
wxCheckBox* EnableCheats;
wxCheckBox* ConfirmStop;
wxBoxSizer* sGamecube; // GC settings
wxStaticBoxSizer* sbGamecubeIPLSettings;
@ -81,6 +83,7 @@ class CConfigMain
wxNotebook *Notebook;
wxPanel *GeneralPage;
wxPanel *CorePage;
wxPanel *GamecubePage;
wxPanel *WiiPage;
wxPanel *PathsPage;
@ -192,6 +195,7 @@ class CConfigMain
{
ID_NOTEBOOK = 1000,
ID_GENERALPAGE,
ID_COREPAGE,
ID_GAMECUBEPAGE,
ID_WIIPAGE,
ID_PATHSPAGE,