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
+131 -91
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);
+13 -10
View File
@@ -53,13 +53,8 @@ private:
wxCheckBox* HideCursor, *AutoHideCursor;
#endif
wxCheckBox* WiimoteStatusLEDs, * WiimoteStatusSpeakers;
wxArrayString arrayStringFor_InterfaceLang;
wxChoice* InterfaceLang;
wxArrayString arrayStringFor_Framelimit;
wxChoice* Framelimit;
wxRadioBox* Theme;
wxBoxSizer* sCore;
@@ -77,7 +72,6 @@ private:
wxBoxSizer* sGamecube; // GC settings
wxStaticBoxSizer* sbGamecubeIPLSettings;
wxGridBagSizer* sGamecubeIPLSettings;
wxArrayString arrayStringFor_GCSystemLang;
wxStaticText* GCSystemLangText;
wxChoice* GCSystemLang;
wxChoice *GCEXIDevice[3];
@@ -111,23 +105,19 @@ private:
FILE* pStream;
wxArrayString arrayStringFor_WiiSensBarPos; // Wiimote Settings
wxStaticText* WiiSensBarPosText;
wxChoice* WiiSensBarPos;
wxCheckBox* WiiScreenSaver; // IPL settings
wxCheckBox* WiiProgressiveScan;
wxCheckBox* WiiEuRGB60;
wxArrayString arrayStringFor_WiiAspectRatio;
wxStaticText* WiiAspectRatioText;
wxChoice* WiiAspectRatio;
wxArrayString arrayStringFor_WiiSystemLang;
wxStaticText* WiiSystemLangText;
wxChoice* WiiSystemLang;
wxCheckBox* WiiSDCard;
wxCheckBox* WiiKeyboard;
wxArrayString arrayStringFor_ISOPaths;
wxListBox* ISOPaths;
wxButton* AddISOPath;
wxButton* RemoveISOPath;
@@ -152,6 +142,15 @@ private:
wxStaticText* WiimoteText;
wxChoice* WiimoteSelection;
wxArrayString arrayStringFor_InterfaceLang;
wxArrayString arrayStringFor_Framelimit;
wxArrayString arrayStringFor_GCSystemLang;
wxArrayString arrayStringFor_WiiSensBarPos;
wxArrayString arrayStringFor_WiiAspectRatio;
wxArrayString arrayStringFor_WiiSystemLang;
wxArrayString arrayStringFor_ISOPaths;
wxArrayString arrayStringFor_Themes;
enum
{
ID_NOTEBOOK = 1000,
@@ -238,6 +237,10 @@ private:
ID_GRAPHIC_CB
};
void InitializeGUILists();
void InitializeGUIValues();
void InitializeGUITooltips();
void CreateGUIControls();
void UpdateGUI();
void OnClose(wxCloseEvent& event);
+25 -17
View File
@@ -20,12 +20,14 @@
#include "ConfigDlg.h"
BEGIN_EVENT_TABLE(DSPConfigDialogHLE, wxDialog)
EVT_BUTTON(wxID_OK, DSPConfigDialogHLE::SettingsChanged)
EVT_CHECKBOX(ID_ENABLE_HLE_AUDIO, DSPConfigDialogHLE::SettingsChanged)
EVT_CHECKBOX(ID_ENABLE_DTK_MUSIC, DSPConfigDialogHLE::SettingsChanged)
EVT_CHECKBOX(ID_ENABLE_THROTTLE, DSPConfigDialogHLE::SettingsChanged)
EVT_CHECKBOX(ID_ENABLE_RE0_FIX, DSPConfigDialogHLE::SettingsChanged)
EVT_COMMAND_SCROLL(ID_VOLUME, DSPConfigDialogHLE::VolumeChanged)
EVT_BUTTON(wxID_OK, DSPConfigDialogHLE::SettingsChanged)
EVT_CHECKBOX(ID_ENABLE_HLE_AUDIO, DSPConfigDialogHLE::SettingsChanged)
EVT_CHECKBOX(ID_ENABLE_DTK_MUSIC, DSPConfigDialogHLE::SettingsChanged)
EVT_CHECKBOX(ID_ENABLE_THROTTLE, DSPConfigDialogHLE::SettingsChanged)
EVT_CHECKBOX(ID_ENABLE_RE0_FIX, DSPConfigDialogHLE::SettingsChanged)
#ifdef _WIN32
EVT_COMMAND_SCROLL(ID_VOLUME, DSPConfigDialogHLE::VolumeChanged)
#endif
END_EVENT_TABLE()
DSPConfigDialogHLE::DSPConfigDialogHLE(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& size, long style)
@@ -35,6 +37,15 @@ DSPConfigDialogHLE::DSPConfigDialogHLE(wxWindow *parent, wxWindowID id, const wx
CenterOnParent();
m_OK = new wxButton(this, wxID_OK, wxT("OK"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
wxStaticBoxSizer *sbSettings = new wxStaticBoxSizer(wxVERTICAL, this, wxT("Sound Settings"));
// Unfortunately, DSound is the only API having a volume setting...
// Its better to remove the Volume setting on non-WIN32, since the user might
// be confused about why he cannot change the volume
// (or the dev fixing it might be confused about why it still doesn't work :P)
#ifdef _WIN32
wxStaticBoxSizer *sbSettingsV = new wxStaticBoxSizer(wxVERTICAL, this, wxT("Volume"));
#endif
// Create items
m_buttonEnableHLEAudio = new wxCheckBox(this, ID_ENABLE_HLE_AUDIO, wxT("Enable HLE Audio"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
@@ -44,8 +55,10 @@ DSPConfigDialogHLE::DSPConfigDialogHLE(wxWindow *parent, wxWindowID id, const wx
wxStaticText *BackendText = new wxStaticText(this, wxID_ANY, wxT("Audio Backend"), wxDefaultPosition, wxDefaultSize, 0);
m_BackendSelection = new wxComboBox(this, ID_BACKEND, wxEmptyString, wxDefaultPosition, wxSize(90, 20), wxArrayBackends, wxCB_READONLY, wxDefaultValidator);
m_volumeSlider = new wxSlider(this, ID_VOLUME, ac_Config.m_Volume, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL|wxSL_INVERSE);
#ifdef _WIN32
m_volumeText = new wxStaticText(this, wxID_ANY, wxString::Format(wxT("%d %%"), ac_Config.m_Volume), wxDefaultPosition, wxDefaultSize, 0);
m_volumeSlider = new wxSlider(this, ID_VOLUME, ac_Config.m_Volume, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL|wxSL_INVERSE);
#endif
// Update values
m_buttonEnableHLEAudio->SetValue(g_Config.m_EnableHLEAudio ? true : false);
@@ -69,7 +82,6 @@ DSPConfigDialogHLE::DSPConfigDialogHLE(wxWindow *parent, wxWindowID id, const wx
wxBoxSizer *sBackend = new wxBoxSizer(wxHORIZONTAL);
wxBoxSizer *sButtons = new wxBoxSizer(wxHORIZONTAL);
wxStaticBoxSizer *sbSettings = new wxStaticBoxSizer(wxVERTICAL, this, wxT("Sound Settings"));
sbSettings->Add(m_buttonEnableHLEAudio, 0, wxALL, 5);
sbSettings->Add(m_buttonEnableDTKMusic, 0, wxALL, 5);
sbSettings->Add(m_buttonEnableThrottle, 0, wxALL, 5);
@@ -78,12 +90,12 @@ DSPConfigDialogHLE::DSPConfigDialogHLE(wxWindow *parent, wxWindowID id, const wx
sBackend->Add(m_BackendSelection, 0, wxALL, 1);
sbSettings->Add(sBackend, 0, wxALL, 2);
wxStaticBoxSizer *sbSettingsV = new wxStaticBoxSizer(wxVERTICAL, this, wxT("Volume"));
sSettings->Add(sbSettings, 0, wxALL|wxEXPAND, 4);
#ifdef _WIN32
sbSettingsV->Add(m_volumeSlider, 0, wxLEFT|wxRIGHT|wxALIGN_CENTER, 6);
sbSettingsV->Add(m_volumeText, 0, wxALL|wxALIGN_LEFT, 4);
sSettings->Add(sbSettings, 0, wxALL|wxEXPAND, 4);
sSettings->Add(sbSettingsV, 0, wxALL|wxEXPAND, 4);
#endif
sMain->Add(sSettings, 0, wxALL|wxEXPAND, 4);
sButtons->AddStretchSpacer();
@@ -102,12 +114,6 @@ void DSPConfigDialogHLE::AddBackend(const char* backend)
#else
m_BackendSelection->SetValue(wxString::FromAscii(ac_Config.sBackend.c_str()));
#endif
// Unfortunately, DSound is the only API having a volume setting...
#ifndef _WIN32
m_volumeSlider->Disable();
m_volumeText->Disable();
#endif
}
void DSPConfigDialogHLE::ClearBackends()
@@ -119,6 +125,7 @@ DSPConfigDialogHLE::~DSPConfigDialogHLE()
{
}
#ifdef _WIN32
void DSPConfigDialogHLE::VolumeChanged(wxScrollEvent& WXUNUSED(event))
{
ac_Config.m_Volume = m_volumeSlider->GetValue();
@@ -126,6 +133,7 @@ void DSPConfigDialogHLE::VolumeChanged(wxScrollEvent& WXUNUSED(event))
m_volumeText->SetLabel(wxString::Format(wxT("%d %%"), m_volumeSlider->GetValue()));
}
#endif
void DSPConfigDialogHLE::SettingsChanged(wxCommandEvent& event)
{
@@ -40,8 +40,10 @@ public:
private:
DECLARE_EVENT_TABLE();
#ifdef _WIN32
wxSlider *m_volumeSlider;
wxStaticText *m_volumeText;
#endif
wxButton *m_OK;
wxCheckBox *m_buttonEnableHLEAudio;
wxCheckBox *m_buttonEnableDTKMusic;
@@ -63,7 +65,9 @@ private:
void OnOK(wxCommandEvent& event);
void SettingsChanged(wxCommandEvent& event);
#ifdef _WIN32
void VolumeChanged(wxScrollEvent& event);
#endif
};
#endif //__DSP_HLE_CONFIGDIALOG_h__
@@ -20,10 +20,12 @@
#include "DSPConfigDlgLLE.h"
BEGIN_EVENT_TABLE(DSPConfigDialogLLE, wxDialog)
EVT_BUTTON(wxID_OK, DSPConfigDialogLLE::SettingsChanged)
EVT_CHECKBOX(ID_ENABLE_DTK_MUSIC, DSPConfigDialogLLE::SettingsChanged)
EVT_CHECKBOX(ID_ENABLE_THROTTLE, DSPConfigDialogLLE::SettingsChanged)
EVT_COMMAND_SCROLL(ID_VOLUME, DSPConfigDialogLLE::VolumeChanged)
EVT_BUTTON(wxID_OK, DSPConfigDialogLLE::SettingsChanged)
EVT_CHECKBOX(ID_ENABLE_DTK_MUSIC, DSPConfigDialogLLE::SettingsChanged)
EVT_CHECKBOX(ID_ENABLE_THROTTLE, DSPConfigDialogLLE::SettingsChanged)
#ifdef _WIN32
EVT_COMMAND_SCROLL(ID_VOLUME, DSPConfigDialogLLE::VolumeChanged)
#endif
END_EVENT_TABLE()
DSPConfigDialogLLE::DSPConfigDialogLLE(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& size, long style)
@@ -36,6 +38,12 @@ DSPConfigDialogLLE::DSPConfigDialogLLE(wxWindow *parent, wxWindowID id, const wx
CenterOnParent();
m_OK = new wxButton(this, wxID_OK, wxT("OK"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
wxStaticBoxSizer *sbSettings = new wxStaticBoxSizer(wxVERTICAL, this, wxT("Sound Settings"));
// Same as for HLE. Maybe this dialog could be moved into AudioCommon or the likes?
#ifdef _WIN32
wxStaticBoxSizer *sbSettingsV = new wxStaticBoxSizer(wxVERTICAL, this, wxT("Volume"));
#endif
// Create items
m_buttonEnableDTKMusic = new wxCheckBox(this, ID_ENABLE_DTK_MUSIC, wxT("Enable DTK Music"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
@@ -43,8 +51,10 @@ DSPConfigDialogLLE::DSPConfigDialogLLE(wxWindow *parent, wxWindowID id, const wx
wxStaticText *BackendText = new wxStaticText(this, wxID_ANY, wxT("Audio Backend"), wxDefaultPosition, wxDefaultSize, 0);
m_BackendSelection = new wxComboBox(this, ID_BACKEND, wxEmptyString, wxDefaultPosition, wxSize(90, 20), wxArrayBackends, wxCB_READONLY, wxDefaultValidator);
#ifdef _WIN32
m_volumeSlider = new wxSlider(this, ID_VOLUME, ac_Config.m_Volume, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL|wxSL_INVERSE);
m_volumeText = new wxStaticText(this, wxID_ANY, wxString::Format(wxT("%d %%"), ac_Config.m_Volume), wxDefaultPosition, wxDefaultSize, 0);
#endif
// Update values
m_buttonEnableDTKMusic->SetValue(ac_Config.m_EnableDTKMusic ? true : false);
@@ -64,7 +74,6 @@ DSPConfigDialogLLE::DSPConfigDialogLLE(wxWindow *parent, wxWindowID id, const wx
wxBoxSizer *sBackend = new wxBoxSizer(wxHORIZONTAL);
wxBoxSizer *sButtons = new wxBoxSizer(wxHORIZONTAL);
wxStaticBoxSizer *sbSettings = new wxStaticBoxSizer(wxVERTICAL, this, wxT("Sound Settings"));
sbSettings->Add(m_buttonEnableDTKMusic, 0, wxALL, 5);
sbSettings->Add(m_buttonEnableThrottle, 0, wxALL, 5);
@@ -72,12 +81,13 @@ DSPConfigDialogLLE::DSPConfigDialogLLE(wxWindow *parent, wxWindowID id, const wx
sBackend->Add(m_BackendSelection, 0, wxALL, 1);
sbSettings->Add(sBackend, 0, wxALL, 2);
wxStaticBoxSizer *sbSettingsV = new wxStaticBoxSizer(wxVERTICAL, this, wxT("Volume"));
sbSettingsV->Add(m_volumeSlider, 0, wxLEFT|wxRIGHT|wxALIGN_CENTER, 6);
sbSettingsV->Add(m_volumeText, 0, wxALL|wxALIGN_LEFT, 4);
sSettings->Add(sbSettings, 0, wxALL|wxEXPAND, 4);
#ifdef _WIN32
sbSettingsV->Add(m_volumeSlider, 0, wxLEFT|wxRIGHT|wxALIGN_CENTER, 6);
sbSettingsV->Add(m_volumeText, 0, wxALL|wxALIGN_LEFT, 4);
sSettings->Add(sbSettingsV, 0, wxALL|wxEXPAND, 4);
#endif
sMain->Add(sSettings, 0, wxALL|wxEXPAND, 4);
sButtons->AddStretchSpacer();
@@ -90,15 +100,9 @@ DSPConfigDialogLLE::DSPConfigDialogLLE(wxWindow *parent, wxWindowID id, const wx
// Add audio output options
void DSPConfigDialogLLE::AddBackend(const char* backend)
{
// Update value
// Update value
m_BackendSelection->Append(wxString::FromAscii(backend));
// Unfortunately, DSound is the only API having a volume setting...
#ifndef _WIN32
m_volumeSlider->Disable();
m_volumeText->Disable();
#endif
#ifdef __APPLE__
m_BackendSelection->SetValue(wxString::FromAscii(ac_Config.sBackend));
#else
@@ -115,6 +119,7 @@ DSPConfigDialogLLE::~DSPConfigDialogLLE()
{
}
#ifdef _WIN32
void DSPConfigDialogLLE::VolumeChanged(wxScrollEvent& WXUNUSED(event))
{
ac_Config.m_Volume = m_volumeSlider->GetValue();
@@ -122,6 +127,7 @@ void DSPConfigDialogLLE::VolumeChanged(wxScrollEvent& WXUNUSED(event))
m_volumeText->SetLabel(wxString::Format(wxT("%d %%"), m_volumeSlider->GetValue()));
}
#endif
void DSPConfigDialogLLE::SettingsChanged(wxCommandEvent& event)
{
@@ -40,8 +40,10 @@ public:
private:
DECLARE_EVENT_TABLE();
#ifdef _WIN32
wxSlider *m_volumeSlider;
wxStaticText *m_volumeText;
#endif
wxButton *m_OK;
wxCheckBox *m_buttonEnableDTKMusic;
wxCheckBox *m_buttonEnableThrottle;
@@ -59,7 +61,9 @@ private:
void OnOK(wxCommandEvent& event);
void SettingsChanged(wxCommandEvent& event);
#ifdef _WIN32
void VolumeChanged(wxScrollEvent& event);
#endif
};
#endif //__DSP_LLE_CONFIGDIALOG_h__
File diff suppressed because it is too large Load Diff
@@ -68,8 +68,6 @@ class GFXConfigDialogOGL : public wxDialog
void AddWindowReso(const char *reso);
void CreateGUIControls();
void GameIniLoad();
// Combo box lists, this one needs to be public
wxArrayString arrayStringFor_FullscreenCB;
private:
DECLARE_EVENT_TABLE();
@@ -109,13 +107,9 @@ class GFXConfigDialogOGL : public wxDialog
#ifndef _WIN32
wxCheckBox *m_HideCursor;
#endif
wxArrayString arrayStringFor_WindowResolutionCB;
wxComboBox *m_WindowResolutionCB;
wxComboBox *m_WindowFSResolutionCB;
wxArrayString arrayStringFor_MaxAnisotropyCB;
wxChoice *m_MaxAnisotropyCB;
wxArrayString arrayStringFor_MSAAModeCB, arrayStringFor_PhackvalueCB;
wxArrayString arrayStringFor_PostShaderCB;
wxChoice *m_MSAAModeCB, *m_PhackvalueCB, *m_PostShaderCB, *m_KeepAR;
wxCheckBox *m_ShowFPS;
@@ -146,6 +140,14 @@ class GFXConfigDialogOGL : public wxDialog
wxSlider *m_SliderWidth, *m_SliderHeight, *m_SliderLeft, *m_SliderTop;
wxCheckBox *m_ScreenSize;
wxArrayString arrayStringFor_WindowResolutionCB;
wxArrayString arrayStringFor_FullscreenCB;
wxArrayString arrayStringFor_AspectRatio;
wxArrayString arrayStringFor_MaxAnisotropyCB;
wxArrayString arrayStringFor_MSAAModeCB;
wxArrayString arrayStringFor_PhackvalueCB;
wxArrayString arrayStringFor_PostShaderCB;
enum
{
ID_CLOSE = 1000,
@@ -217,6 +219,11 @@ class GFXConfigDialogOGL : public wxDialog
ID_EDITSHADER,
};
void LoadShaders();
void InitializeGUILists();
void InitializeGUIValues();
void InitializeGUITooltips();
void OnClose(wxCloseEvent& event);
void UpdateGUI();
void UpdateHack();
+2 -8
View File
@@ -247,7 +247,7 @@ void X11AddResolutions() {
XFree(modes);
}
#elif defined(HAVE_COCOA) && HAVE_COCOA
void CocaAddResolutions() {
void CocoaAddResolutions() {
CFArrayRef modes;
CFRange range;
@@ -306,15 +306,9 @@ void DllConfig(HWND _hParent)
#elif defined(HAVE_X11) && HAVE_X11 && defined(HAVE_XXF86VM) && HAVE_XXF86VM
X11AddResolutions();
#elif defined(HAVE_COCOA) && HAVE_COCOA
CocaAddResolutions();
CocoaAddResolutions();
#endif
// CreateGUIControls() will crash because the array is empty.
if (m_ConfigFrame->arrayStringFor_FullscreenCB.size() == 0) {
m_ConfigFrame->AddFSReso("<No resolutions found>");
m_ConfigFrame->AddWindowReso("<No resolutions found>");
}
allowConfigShow = false;
m_ConfigFrame->CreateGUIControls();
allowConfigShow = m_ConfigFrame->ShowModal() == 1 ? true : false;