Some internal code shuffling for Config dialogs. OSX seems to be picky about when StaticSizerBoxes are created, as described in Issue 2229.

Bit of cleanup/grouping, control creation is now a bit more separate from value setting and tooltip assignment which IMO cluttered the code as it was.
Removed something from main.cpp that looked like a hack to me.
Fixes Issue 2229

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5021 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
j4ck.fr0st
2010-02-06 16:20:54 +00:00
parent 811cfb059e
commit f3868dd491
9 changed files with 441 additions and 341 deletions

View File

@ -163,7 +163,7 @@ void CConfigMain::UpdateGUI()
}
}
void CConfigMain::CreateGUIControls()
void CConfigMain::InitializeGUILists()
{
// Deal with all the language arrayStrings here
// GC
@ -181,11 +181,130 @@ void CConfigMain::CreateGUIControls()
arrayStringFor_WiiSystemLang.Add(wxT("Korean"));
// GUI
arrayStringFor_InterfaceLang = arrayStringFor_GCSystemLang;
// Framelimit
arrayStringFor_Framelimit.Add(wxT("Off"));
arrayStringFor_Framelimit.Add(wxT("Auto"));
for (int i = 20; i <= 120; i += 10) // from 20 to 120
arrayStringFor_Framelimit.Add(wxString::Format(wxT("%i"), i));
// Themes
arrayStringFor_Themes.Add(wxT("Boomy"));
arrayStringFor_Themes.Add(wxT("Vista"));
arrayStringFor_Themes.Add(wxT("X-Plastik"));
arrayStringFor_Themes.Add(wxT("KDE"));
// Wii
// Sensorbar Position
arrayStringFor_WiiSensBarPos.Add(wxT("Bottom"));
arrayStringFor_WiiSensBarPos.Add(wxT("Top"));
// Aspect ratio
arrayStringFor_WiiAspectRatio.Add(wxT("4:3"));
arrayStringFor_WiiAspectRatio.Add(wxT("16:9"));
}
void CConfigMain::InitializeGUIValues()
{
// General - Basic
CPUThread->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread);
SkipIdle->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bSkipIdle);
EnableCheats->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableCheats);
Framelimit->SetSelection(SConfig::GetInstance().m_Framelimit);
// General - Advanced
AlwaysHLE_BS2->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bHLE_BS2);
switch (SConfig::GetInstance().m_LocalCoreStartupParameter.iCPUCore)
{
case 0: m_RadioInt->SetValue(true); break;
case 1: m_RadioJIT->SetValue(true); break;
case 2: m_RadioJITIL->SetValue(true); break;
}
LockThreads->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bLockThreads);
DSPThread->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bDSPThread);
// General - Interface
ConfirmStop->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bConfirmStop);
UsePanicHandlers->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bUsePanicHandlers);
#if wxUSE_TIMER && defined _WIN32
AutoHideCursor->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bAutoHideCursor);
HideCursor->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor);
#endif
WiimoteStatusLEDs->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bWiiLeds);
WiimoteStatusSpeakers->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bWiiSpeakers);
Theme->SetSelection(SConfig::GetInstance().m_LocalCoreStartupParameter.iTheme);
// need redesign
InterfaceLang->SetSelection(SConfig::GetInstance().m_InterfaceLanguage);
// Gamecube - IPL
GCSystemLang->SetSelection(SConfig::GetInstance().m_LocalCoreStartupParameter.SelectedLanguage);
// Gamecube - Devices
// Not here. They use some locals over in CreateGUIControls for initialization,
// which is why they are still there.
// Wii
WiiSensBarPos->SetSelection(SConfig::GetInstance().m_SYSCONF->GetData<u8>("BT.BAR"));
WiiScreenSaver->SetValue(!!SConfig::GetInstance().m_SYSCONF->GetData<u8>("IPL.SSV"));
WiiProgressiveScan->SetValue(!!SConfig::GetInstance().m_SYSCONF->GetData<u8>("IPL.PGS"));
WiiEuRGB60->SetValue(!!SConfig::GetInstance().m_SYSCONF->GetData<u8>("IPL.E60"));
WiiAspectRatio->SetSelection(SConfig::GetInstance().m_SYSCONF->GetData<u8>("IPL.AR"));
WiiSystemLang->SetSelection(SConfig::GetInstance().m_SYSCONF->GetData<u8>("IPL.LNG"));
WiiSDCard->SetValue(SConfig::GetInstance().m_WiiSDCard);
WiiKeyboard->SetValue(SConfig::GetInstance().m_WiiKeyboard);
// Paths
RecersiveISOPath->SetValue(SConfig::GetInstance().m_RecursiveISOFolder);
DefaultISO->SetPath(wxString(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDefaultGCM.c_str(), *wxConvCurrent));
DVDRoot->SetPath(wxString(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDVDRoot.c_str(), *wxConvCurrent));
ApploaderPath->SetPath(wxString(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strApploader.c_str(), *wxConvCurrent));
// Plugins
FillChoiceBox(GraphicSelection, PLUGIN_TYPE_VIDEO, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoPlugin);
FillChoiceBox(DSPSelection, PLUGIN_TYPE_DSP, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDSPPlugin);
for (int i = 0; i < MAXPADS; i++)
FillChoiceBox(PADSelection, PLUGIN_TYPE_PAD, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strPadPlugin[i]);
for (int i=0; i < MAXWIIMOTES; i++)
FillChoiceBox(WiimoteSelection, PLUGIN_TYPE_WIIMOTE, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strWiimotePlugin[i]);
}
void CConfigMain::InitializeGUITooltips()
{
// General - Basic
CPUThread->SetToolTip(wxT("This splits the Video and CPU threads, so they can be run on separate cores.")
wxT("\nCauses major speed improvements on PCs with more than one core,")
wxT("\nbut can also cause occasional crashes/glitches."));
Framelimit->SetToolTip(wxT("If you set Framelimit higher than game full speed (NTSC:60, PAL:50),\nyou also have to disable Audio Throttle in DSP to make it effective."));
// General - Advanced
DSPThread->SetToolTip(wxT("Run DSPLLE on a dedicated thread (not recommended)."));
// General - Interface
ConfirmStop->SetToolTip(wxT("Show a confirmation box before stopping a game."));
UsePanicHandlers->SetToolTip(wxT("Show a message box when a potentially serious error has occured.")
wxT(" Disabling this may avoid annoying and non-fatal messages, but it may also mean that Dolphin")
wxT(" suddenly crashes without any explanation at all."));
#if wxUSE_TIMER && defined _WIN32
AutoHideCursor->SetToolTip(wxT("This will auto hide the cursor in fullscreen mode."));
HideCursor->SetToolTip(wxT("This will always hide the cursor when it's over the rendering window.")
wxT("\nIt can be convenient in a Wii game that already has a cursor."));
#endif
WiimoteStatusLEDs->SetToolTip(wxT("Show which wiimotes are connected 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")
wxT("\nthe game list of PAL GC games."));
// Themes: Copyright notice
Theme->SetItemToolTip(0, wxT("Created by Milosz Wlazlo [miloszwl@miloszwl.com, miloszwl.deviantart.com]"));
Theme->SetItemToolTip(1, wxT("Created by VistaIcons.com"));
Theme->SetItemToolTip(2, wxT("Created by black_rider and published on ForumW.org > Web Developments"));
Theme->SetItemToolTip(3, wxT("Created by KDE-Look.org"));
// Wii
WiiKeyboard->SetToolTip(wxT("This could cause slow down in Wii Menu and some games."));
}
void CConfigMain::CreateGUIControls()
{
InitializeGUILists();
// Create the notebook and pages
Notebook = new wxNotebook(this, ID_NOTEBOOK, wxDefaultPosition, wxDefaultSize);
@ -202,110 +321,53 @@ void CConfigMain::CreateGUIControls()
Notebook->AddPage(PluginPage, wxT("Plugins"));
// General page
sbBasic = new wxStaticBoxSizer(wxVERTICAL, GeneralPage, wxT("Basic Settings"));
sbAdvanced = new wxStaticBoxSizer(wxVERTICAL, GeneralPage, wxT("Advanced Settings"));
sbInterface = new wxStaticBoxSizer(wxVERTICAL, GeneralPage, wxT("Interface Settings"));
// Core Settings - Basic
CPUThread = new wxCheckBox(GeneralPage, ID_CPUTHREAD, wxT("Enable Dual Core (speedup)"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
CPUThread->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread);
SkipIdle = new wxCheckBox(GeneralPage, ID_IDLESKIP, wxT("Enable Idle Skipping (speedup)"), 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);
// Framelimit
wxStaticText *FramelimitText = new wxStaticText(GeneralPage, ID_FRAMELIMIT_TEXT, wxT("Framelimit :"), wxDefaultPosition, wxDefaultSize);
Framelimit = new wxChoice(GeneralPage, ID_FRAMELIMIT, wxDefaultPosition, wxDefaultSize, arrayStringFor_Framelimit, 0, wxDefaultValidator);
Framelimit->SetToolTip(wxT("If you set Framelimit higher than game full speed (NTSC:60, PAL:50),\nyou also have to disable Audio Throttle in DSP to make it effective."));
Framelimit->SetSelection(SConfig::GetInstance().m_Framelimit);
// Core Settings - Advanced
//
wxStaticBoxSizer* sizerCoreType = new wxStaticBoxSizer(wxVERTICAL, GeneralPage, wxT("CPU Emulator Engine"));
AlwaysHLE_BS2 = new wxCheckBox(GeneralPage, ID_ALWAYS_HLE_BS2, wxT("HLE the IPL (recommended)"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
AlwaysHLE_BS2->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bHLE_BS2);
m_RadioJIT = new wxRadioButton(GeneralPage, ID_RADIOJIT, wxT("JIT recompiler (recommended)"));
m_RadioJITIL = new wxRadioButton(GeneralPage, ID_RADIOJITIL, wxT("JitIL experimental recompiler"));
m_RadioInt = new wxRadioButton(GeneralPage, ID_RADIOINT, wxT("Interpreter (VERY slow)"));
switch (SConfig::GetInstance().m_LocalCoreStartupParameter.iCPUCore) {
case 0: m_RadioInt->SetValue(true); break;
case 1: m_RadioJIT->SetValue(true); break;
case 2: m_RadioJITIL->SetValue(true); break;
}
LockThreads = new wxCheckBox(GeneralPage, ID_LOCKTHREADS, wxT("Lock threads to cores"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
LockThreads->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bLockThreads);
DSPThread = new wxCheckBox(GeneralPage, ID_DSPTHREAD, wxT("DSPLLE on thread"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
DSPThread->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bDSPThread);
// Interface settings
// Confirm on stop
ConfirmStop = new wxCheckBox(GeneralPage, ID_INTERFACE_CONFIRMSTOP, wxT("Confirm On Stop"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
ConfirmStop->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bConfirmStop);
// Use Panic Handlers
UsePanicHandlers = new wxCheckBox(GeneralPage, ID_INTERFACE_USEPANICHANDLERS, wxT("Use Panic Handlers"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
UsePanicHandlers->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bUsePanicHandlers);
#if wxUSE_TIMER && defined _WIN32
// Hide Cursor
wxStaticText *HideCursorText = new wxStaticText(GeneralPage, ID_INTERFACE_HIDECURSOR_TEXT, wxT("Hide Cursor:"), wxDefaultPosition, wxDefaultSize);
AutoHideCursor = new wxCheckBox(GeneralPage, ID_INTERFACE_AUTOHIDECURSOR, wxT("Auto"));
AutoHideCursor->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bAutoHideCursor);
HideCursor = new wxCheckBox(GeneralPage, ID_INTERFACE_HIDECURSOR, wxT("Always"));
HideCursor->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor);
#endif
// Wiimote status in statusbar
wxStaticText *WiimoteStatusText = new wxStaticText(GeneralPage, ID_INTERFACE_WIIMOTE_TEXT, wxT("Show wiimote status:"), wxDefaultPosition, wxDefaultSize);
WiimoteStatusLEDs = new wxCheckBox(GeneralPage, ID_INTERFACE_WIIMOTE_LEDS, wxT("LEDs"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
WiimoteStatusLEDs->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bWiiLeds);
WiimoteStatusSpeakers = new wxCheckBox(GeneralPage, ID_INTERFACE_WIIMOTE_SPEAKERS, wxT("Speakers"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
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 - this should really be a wxChoice...
wxArrayString ThemeChoices;
ThemeChoices.Add(wxT("Boomy"));
ThemeChoices.Add(wxT("Vista"));
ThemeChoices.Add(wxT("X-Plastik"));
ThemeChoices.Add(wxT("KDE"));
Theme = new wxRadioBox(GeneralPage, ID_INTERFACE_THEME, wxT("Theme"),wxDefaultPosition, wxDefaultSize, ThemeChoices, 1, wxRA_SPECIFY_ROWS);
// Set selected
Theme->SetSelection(SConfig::GetInstance().m_LocalCoreStartupParameter.iTheme);
// ToolTips
ConfirmStop->SetToolTip(wxT("Show a confirmation box before stopping a game."));
UsePanicHandlers->SetToolTip(wxT("Show a message box when a potentially serious error has occured.")
wxT(" Disabling this may avoid annoying and non-fatal messages, but it may also mean that Dolphin")
wxT(" suddenly crashes without any explanation at all."));
#if wxUSE_TIMER && defined _WIN32
AutoHideCursor->SetToolTip(wxT("This will auto hide the cursor in fullscreen mode."));
HideCursor->SetToolTip(wxT("This will always hide the cursor when it's over the rendering window.")
wxT("\nIt can be convenient in a Wii game that already has a cursor."));
#endif
WiimoteStatusLEDs->SetToolTip(wxT("Show which wiimotes are connected in the statusbar."));
WiimoteStatusSpeakers->SetToolTip(wxT("Show wiimote speaker status in the statusbar."));
DSPThread->SetToolTip(wxT("Run DSPLLE on a dedicated thread (not recommended)."));
CPUThread->SetToolTip(wxT("This splits the Video and CPU threads, so they can be run on separate cores.")
wxT("\nCauses major speed improvements on PCs with more than one core,")
wxT("\nbut can also cause occasional crashes/glitches."));
InterfaceLang->SetToolTip(wxT("For the time being this will only change the text shown in")
wxT("\nthe game list of PAL GC games."));
// Copyright notice
Theme->SetItemToolTip(0, wxT("Created by Milosz Wlazlo [miloszwl@miloszwl.com, miloszwl.deviantart.com]"));
Theme->SetItemToolTip(1, wxT("Created by VistaIcons.com"));
Theme->SetItemToolTip(2, wxT("Created by black_rider and published on ForumW.org > Web Developments"));
Theme->SetItemToolTip(3, wxT("Created by KDE-Look.org"));
Theme = new wxRadioBox(GeneralPage, ID_INTERFACE_THEME, wxT("Theme"),wxDefaultPosition, wxDefaultSize, arrayStringFor_Themes, 1, wxRA_SPECIFY_ROWS);
// Populate the settings
sCore = new wxBoxSizer(wxHORIZONTAL);
sbBasic = new wxStaticBoxSizer(wxVERTICAL, GeneralPage, wxT("Basic Settings"));
sbBasic->Add(CPUThread, 0, wxALL, 5);
sbBasic->Add(SkipIdle, 0, wxALL, 5);
sbBasic->Add(EnableCheats, 0, wxALL, 5);
@ -314,9 +376,7 @@ void CConfigMain::CreateGUIControls()
sFramelimit->Add(Framelimit, 0, wxALL | wxEXPAND, 5);
sbBasic->Add(sFramelimit, 0, wxALL | wxEXPAND, 5);
sbAdvanced = new wxStaticBoxSizer(wxVERTICAL, GeneralPage, wxT("Advanced Settings"));
sbAdvanced->Add(AlwaysHLE_BS2, 0, wxALL, 5);
wxStaticBoxSizer* sizerCoreType = new wxStaticBoxSizer(wxVERTICAL, GeneralPage, wxT("CPU Emulator Engine"));
sizerCoreType->Add(m_RadioJIT, 0, wxALL | wxEXPAND, 5);
sizerCoreType->Add(m_RadioJITIL, 0, wxALL | wxEXPAND, 5);
sizerCoreType->Add(m_RadioInt, 0, wxALL | wxEXPAND, 5);
@ -327,7 +387,6 @@ void CConfigMain::CreateGUIControls()
sCore->AddStretchSpacer();
sCore->Add(sbAdvanced, 0, wxEXPAND);
sbInterface = new wxStaticBoxSizer(wxVERTICAL, GeneralPage, wxT("Interface Settings"));
sbInterface->Add(ConfirmStop, 0, wxALL, 5);
sbInterface->Add(UsePanicHandlers, 0, wxALL, 5);
#if wxUSE_TIMER && defined _WIN32
@ -359,11 +418,10 @@ void CConfigMain::CreateGUIControls()
// Gamecube page
// IPL settings
sbGamecubeIPLSettings = new wxStaticBoxSizer(wxVERTICAL, GamecubePage, wxT("IPL Settings"));
// IPL settings
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);
// Devices
wxStaticBoxSizer *sbGamecubeDeviceSettings = new wxStaticBoxSizer(wxVERTICAL, GamecubePage, wxT("Device Settings"));
// EXI Devices
@ -381,6 +439,7 @@ void CConfigMain::CreateGUIControls()
GCEXIDevice[2] = new wxChoice(GamecubePage, ID_GC_EXIDEVICE_SP1, wxDefaultPosition, wxDefaultSize, numSP1Devices, SP1Devices, 0, wxDefaultValidator);
GCMemcardPath[0] = new wxButton(GamecubePage, ID_GC_EXIDEVICE_SLOTA_PATH, wxT("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, wxDefaultValidator);
GCMemcardPath[1] = new wxButton(GamecubePage, ID_GC_EXIDEVICE_SLOTB_PATH, wxT("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, wxDefaultValidator);
// Can't move this one without making the 4 const's etc. above class members/fields,
for (int i = 0; i < 3; ++i)
{
bool isMemcard = false;
@ -422,6 +481,7 @@ void CConfigMain::CreateGUIControls()
GCSIDevice[1] = new wxChoice(GamecubePage, ID_GC_SIDEVICE1, wxDefaultPosition, wxDefaultSize, numSIDevices, SIDevices, 0, wxDefaultValidator);
GCSIDevice[2] = new wxChoice(GamecubePage, ID_GC_SIDEVICE2, wxDefaultPosition, wxDefaultSize, numSIDevices, SIDevices, 0, wxDefaultValidator);
GCSIDevice[3] = new wxChoice(GamecubePage, ID_GC_SIDEVICE3, wxDefaultPosition, wxDefaultSize, numSIDevices, SIDevices, 0, wxDefaultValidator);
// Can't move this one without making the 2 const's etc. above class members/fields.
for (int i = 0; i < 4; ++i)
{
switch (SConfig::GetInstance().m_SIDevice[i])
@ -440,7 +500,6 @@ void CConfigMain::CreateGUIControls()
break;
}
}
sGamecube = new wxBoxSizer(wxVERTICAL);
sGamecubeIPLSettings = new wxGridBagSizer(0, 0);
sGamecubeIPLSettings->Add(GCSystemLangText, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
@ -471,34 +530,23 @@ void CConfigMain::CreateGUIControls()
// 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(SConfig::GetInstance().m_SYSCONF->GetData<u8>("BT.BAR"));
sbWiiIPLSettings = new wxStaticBoxSizer(wxVERTICAL, WiiPage, wxT("Misc Settings"));
WiiScreenSaver = new wxCheckBox(WiiPage, ID_WII_IPL_SSV, wxT("Enable Screen Saver (burn-in reduction)"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
WiiScreenSaver->SetValue(!!SConfig::GetInstance().m_SYSCONF->GetData<u8>("IPL.SSV"));
WiiProgressiveScan = new wxCheckBox(WiiPage, ID_WII_IPL_PGS, wxT("Enable Progressive Scan"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
WiiProgressiveScan->SetValue(!!SConfig::GetInstance().m_SYSCONF->GetData<u8>("IPL.PGS"));
WiiEuRGB60 = new wxCheckBox(WiiPage, ID_WII_IPL_E60, wxT("Use EuRGB60 Mode (PAL60)"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
WiiEuRGB60->SetValue(!!SConfig::GetInstance().m_SYSCONF->GetData<u8>("IPL.E60"));
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(SConfig::GetInstance().m_SYSCONF->GetData<u8>("IPL.AR"));
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(SConfig::GetInstance().m_SYSCONF->GetData<u8>("IPL.LNG"));
// Devices
sbWiiDeviceSettings = new wxStaticBoxSizer(wxVERTICAL, WiiPage, wxT("Device Settings"));
WiiSDCard = new wxCheckBox(WiiPage, ID_WII_SD_CARD, wxT("Insert SD Card"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
WiiSDCard->SetValue(SConfig::GetInstance().m_WiiSDCard);
WiiKeyboard = new wxCheckBox(WiiPage, ID_WII_KEYBOARD, wxT("Connect USB Keyboard"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
WiiKeyboard->SetToolTip(wxT("This could cause slow down in Wii Menu and some games."));
WiiKeyboard->SetValue(SConfig::GetInstance().m_WiiKeyboard);
// Populate sbWiimoteSettings
sWii = new wxBoxSizer(wxVERTICAL);
@ -534,21 +582,17 @@ void CConfigMain::CreateGUIControls()
RemoveISOPath = new wxButton(PathsPage, ID_REMOVEISOPATH, wxT("Remove"), wxDefaultPosition, wxDefaultSize, 0);
RemoveISOPath->Enable(false);
RecersiveISOPath = new wxCheckBox(PathsPage, ID_RECERSIVEISOPATH, wxT("Search Subfolders"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
RecersiveISOPath->SetValue(SConfig::GetInstance().m_RecursiveISOFolder);
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_OPEN);
DefaultISO->SetPath(wxString(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDefaultGCM.c_str(), *wxConvCurrent));
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(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDVDRoot.c_str(), *wxConvCurrent));
ApploaderPathText = new wxStaticText(PathsPage, ID_APPLOADERPATH_TEXT, wxT("Apploader:"), wxDefaultPosition, wxDefaultSize);
ApploaderPath = new wxFilePickerCtrl(PathsPage, ID_APPLOADERPATH, wxEmptyString, wxT("Choose file to use as apploader: (applies to discs constructed from directories only)"),
wxString::Format(wxT("apploader (.img)|*.img|All files (%s)|%s"), wxFileSelectorDefaultWildcardStr, wxFileSelectorDefaultWildcardStr),
wxDefaultPosition, wxDefaultSize, wxFLP_USE_TEXTCTRL|wxFLP_OPEN);
ApploaderPath->SetPath(wxString(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strApploader.c_str(), *wxConvCurrent));
sPaths = new wxBoxSizer(wxVERTICAL);
@ -592,13 +636,6 @@ void CConfigMain::CreateGUIControls()
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);
for (int i = 0; i < MAXPADS; i++)
FillChoiceBox(PADSelection, PLUGIN_TYPE_PAD, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strPadPlugin[i]);
for (int i=0; i < MAXWIIMOTES; i++)
FillChoiceBox(WiimoteSelection, PLUGIN_TYPE_WIIMOTE, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strWiimotePlugin[i]);
sPlugins = new wxBoxSizer(wxVERTICAL);
sbGraphicsPlugin->Add(GraphicSelection, 1, wxEXPAND|wxALL, 5);
@ -631,6 +668,9 @@ void CConfigMain::CreateGUIControls()
sMain->Add(Notebook, 1, wxEXPAND|wxALL, 5);
sMain->Add(sButtons, 0, wxEXPAND, 5);
InitializeGUIValues();
InitializeGUITooltips();
UpdateGUI();
this->SetSizer(sMain);