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:
parent
811cfb059e
commit
f3868dd491
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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__
|
||||
|
|
|
@ -139,104 +139,139 @@ void GFXConfigDialogOGL::AddWindowReso(const char *reso)
|
|||
arrayStringFor_WindowResolutionCB.Add(wxString::FromAscii(reso));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void GFXConfigDialogOGL::CreateGUIControls()
|
||||
// This one could be used to reload shaders while dolphin is running...
|
||||
void GFXConfigDialogOGL::LoadShaders()
|
||||
{
|
||||
// Notebook
|
||||
m_Notebook = new wxNotebook(this, ID_NOTEBOOK, wxDefaultPosition, wxDefaultSize);
|
||||
m_PageGeneral = new wxPanel(m_Notebook, ID_PAGEGENERAL, wxDefaultPosition, wxDefaultSize);
|
||||
m_Notebook->AddPage(m_PageGeneral, wxT("General"));
|
||||
m_PageAdvanced = new wxPanel(m_Notebook, ID_PAGEADVANCED, wxDefaultPosition, wxDefaultSize);
|
||||
m_Notebook->AddPage(m_PageAdvanced, wxT("Advanced"));
|
||||
arrayStringFor_PostShaderCB.Clear();
|
||||
|
||||
// Buttons
|
||||
m_About = new wxButton(this, ID_ABOUTOGL, wxT("About"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_Close = new wxButton(this, ID_CLOSE, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
arrayStringFor_PostShaderCB.Add(wxT("(off)"));
|
||||
if (File::IsDirectory(File::GetUserPath(D_SHADERS_IDX)))
|
||||
{
|
||||
File::FSTEntry entry;
|
||||
File::ScanDirectoryTree(File::GetUserPath(D_SHADERS_IDX), entry);
|
||||
for (u32 i = 0; i < entry.children.size(); i++)
|
||||
{
|
||||
std::string name = entry.children[i].virtualName.c_str();
|
||||
if (!strcasecmp(name.substr(name.size() - 4).c_str(), ".txt"))
|
||||
name = name.substr(0, name.size() - 4);
|
||||
arrayStringFor_PostShaderCB.Add(wxString::FromAscii(name.c_str()));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
File::CreateDir(File::GetUserPath(D_SHADERS_IDX));
|
||||
}
|
||||
}
|
||||
void GFXConfigDialogOGL::InitializeGUILists()
|
||||
{
|
||||
// Resolutions
|
||||
if (arrayStringFor_FullscreenCB.empty())
|
||||
AddFSReso("<No resolutions found>");
|
||||
if (arrayStringFor_WindowResolutionCB.empty())
|
||||
AddWindowReso("<No resolutions found>");
|
||||
|
||||
// Put notebook and buttons in sizers
|
||||
wxBoxSizer* sButtons;
|
||||
sButtons = new wxBoxSizer(wxHORIZONTAL);
|
||||
sButtons->Add(m_About, 0, wxALL, 5);
|
||||
sButtons->AddStretchSpacer();
|
||||
sButtons->Add(m_Close, 0, wxALL, 5);
|
||||
// Keep Aspect Ratio
|
||||
arrayStringFor_AspectRatio.Add(wxT("Auto Aspect (recommended)"));
|
||||
arrayStringFor_AspectRatio.Add(wxT("Force 16:9 Widescreen"));
|
||||
arrayStringFor_AspectRatio.Add(wxT("Force 4:3 Standard"));
|
||||
arrayStringFor_AspectRatio.Add(wxT("Stretch to Window"));
|
||||
|
||||
wxBoxSizer* sMain;
|
||||
sMain = new wxBoxSizer(wxVERTICAL);
|
||||
sMain->Add(m_Notebook, 1, wxEXPAND|wxALL, 5);
|
||||
sMain->Add(sButtons, 0, wxEXPAND, 5);
|
||||
// Antialias (MSAA)
|
||||
arrayStringFor_MSAAModeCB.Add(wxT("(off)"));
|
||||
arrayStringFor_MSAAModeCB.Add(wxT("2x"));
|
||||
arrayStringFor_MSAAModeCB.Add(wxT("4x"));
|
||||
arrayStringFor_MSAAModeCB.Add(wxT("8x"));
|
||||
arrayStringFor_MSAAModeCB.Add(wxT("8x CSAA"));
|
||||
arrayStringFor_MSAAModeCB.Add(wxT("8xQ CSAA"));
|
||||
arrayStringFor_MSAAModeCB.Add(wxT("16x CSAA"));
|
||||
arrayStringFor_MSAAModeCB.Add(wxT("16xQ CSAA"));
|
||||
|
||||
this->SetSizer(sMain);
|
||||
this->Layout();
|
||||
// Anisotropic filter
|
||||
arrayStringFor_MaxAnisotropyCB.Add(wxT("1x"));
|
||||
arrayStringFor_MaxAnisotropyCB.Add(wxT("2x"));
|
||||
arrayStringFor_MaxAnisotropyCB.Add(wxT("4x"));
|
||||
arrayStringFor_MaxAnisotropyCB.Add(wxT("8x"));
|
||||
arrayStringFor_MaxAnisotropyCB.Add(wxT("16x"));
|
||||
|
||||
// Post-processing shader
|
||||
LoadShaders();
|
||||
|
||||
// Hacks
|
||||
arrayStringFor_PhackvalueCB.Add(wxT("None"));
|
||||
arrayStringFor_PhackvalueCB.Add(wxT("Zelda Twilight Princess Bloom hack"));
|
||||
arrayStringFor_PhackvalueCB.Add(wxT("Sonic and the Black Knight"));
|
||||
arrayStringFor_PhackvalueCB.Add(wxT("Bleach Versus Crusade"));
|
||||
arrayStringFor_PhackvalueCB.Add(wxT("Final Fantasy CC Echo of Time"));
|
||||
arrayStringFor_PhackvalueCB.Add(wxT("Harvest Moon Magical Melody"));
|
||||
arrayStringFor_PhackvalueCB.Add(wxT("Baten Kaitos"));
|
||||
arrayStringFor_PhackvalueCB.Add(wxT("Baten Kaitos Origin"));
|
||||
arrayStringFor_PhackvalueCB.Add(wxT("Skies of Arcadia"));
|
||||
}
|
||||
void GFXConfigDialogOGL::InitializeGUIValues()
|
||||
{
|
||||
// General Display Settings
|
||||
sbBasic = new wxStaticBoxSizer(wxVERTICAL, m_PageGeneral, wxT("Basic Display Settings"));
|
||||
m_RenderToMainWindow = new wxCheckBox(m_PageGeneral, ID_RENDERTOMAINWINDOW, wxT("Render to Main window"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_RenderToMainWindow->SetValue(g_Config.RenderToMainframe);
|
||||
m_NativeResolution = new wxCheckBox(m_PageGeneral, ID_NATIVERESOLUTION, wxT("Native"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_2xResolution = new wxCheckBox(m_PageGeneral, ID_2X_RESOLUTION, wxT("2x"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
wxStaticText *IRText = new wxStaticText(m_PageGeneral, ID_IRTEXT, wxT("Resolution:"), wxDefaultPosition, wxDefaultSize, 0);
|
||||
wxStaticText *RText = new wxStaticText(m_PageGeneral, ID_RTEXT, wxT("Custom resolution:"), wxDefaultPosition, wxDefaultSize, 0);
|
||||
wxStaticText *WMText = new wxStaticText(m_PageGeneral, ID_WMTEXT, wxT("Windowed:"), wxDefaultPosition, wxDefaultSize , 0 );
|
||||
m_WindowResolutionCB = new wxComboBox(m_PageGeneral, ID_WINDOWRESOLUTIONCB, arrayStringFor_WindowResolutionCB[0], wxDefaultPosition, wxDefaultSize, arrayStringFor_WindowResolutionCB, wxCB_READONLY, wxDefaultValidator);
|
||||
m_WindowResolutionCB->SetValue(wxString::FromAscii(g_Config.cInternalRes));
|
||||
m_WindowFSResolutionCB = new wxComboBox(m_PageGeneral, ID_WINDOWFSRESOLUTIONCB, arrayStringFor_FullscreenCB[0], wxDefaultPosition, wxDefaultSize, arrayStringFor_FullscreenCB, wxCB_READONLY, wxDefaultValidator);
|
||||
m_WindowFSResolutionCB->SetValue(wxString::FromAscii(g_Config.cFSResolution));
|
||||
|
||||
// Aspect ratio / positioning controls
|
||||
wxStaticText *KeepARText = new wxStaticText(m_PageGeneral, wxID_ANY, wxT("Keep aspect ratio:"), wxDefaultPosition, wxDefaultSize, 0);
|
||||
m_KeepAR = new wxChoice(m_PageGeneral, ID_ASPECT, wxDefaultPosition, wxDefaultSize);
|
||||
m_KeepAR->Append(wxT("Auto Aspect (recommended)"));
|
||||
m_KeepAR->Append(wxT("Force 16:9 Widescreen"));
|
||||
m_KeepAR->Append(wxT("Force 4:3 Standard"));
|
||||
m_KeepAR->Append(wxT("Stretch to Window"));
|
||||
m_Crop = new wxCheckBox(m_PageGeneral, ID_CROP, wxT("Crop"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_Fullscreen = new wxCheckBox(m_PageGeneral, ID_FULLSCREEN, wxT("Fullscreen :"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_Fullscreen->SetValue(g_Config.bFullscreen);
|
||||
m_UseXFB = new wxCheckBox(m_PageGeneral, ID_USEXFB, wxT("Use Real XFB"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_AutoScale = new wxCheckBox(m_PageGeneral, ID_AUTOSCALE, wxT("Auto scale (try to remove borders)"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_WidescreenHack = new wxCheckBox(m_PageGeneral, ID_WIDESCREENHACK, wxT("Wide screen hack"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
|
||||
// Default values
|
||||
m_NativeResolution->SetValue(g_Config.bNativeResolution);
|
||||
m_2xResolution->SetValue(g_Config.b2xResolution);
|
||||
m_Fullscreen->SetValue(g_Config.bFullscreen);
|
||||
m_WindowResolutionCB->SetValue(wxString::FromAscii(g_Config.cInternalRes));
|
||||
m_WindowFSResolutionCB->SetValue(wxString::FromAscii(g_Config.cFSResolution));
|
||||
#ifndef _WIN32
|
||||
m_HideCursor->SetValue(g_Config.bHideCursor);
|
||||
#endif
|
||||
m_KeepAR->SetSelection(g_Config.iAspectRatio);
|
||||
|
||||
m_Crop->SetValue(g_Config.bCrop);
|
||||
|
||||
// Advanced Display Settings
|
||||
m_RenderToMainWindow->SetValue(g_Config.RenderToMainframe);
|
||||
m_OSDHotKey->SetValue(g_Config.bOSDHotKey);
|
||||
m_VSync->SetValue(g_Config.bVSync);
|
||||
m_UseXFB->SetValue(g_Config.bUseXFB);
|
||||
m_AutoScale->SetValue(g_Config.bAutoScale);
|
||||
m_WidescreenHack->SetValue(g_Config.bWidescreenHack);
|
||||
|
||||
#ifndef _WIN32
|
||||
m_HideCursor = new wxCheckBox(m_PageGeneral, ID_HIDECURSOR, wxT("Hide mouse cursor"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_HideCursor->SetValue(g_Config.bHideCursor);
|
||||
#endif
|
||||
|
||||
// Advanced Display Settings
|
||||
sbBasicAdvanced = new wxStaticBoxSizer(wxVERTICAL, m_PageGeneral, wxT("Advanced Display Settings"));
|
||||
m_VSync = new wxCheckBox(m_PageGeneral, ID_VSYNC, wxT("VSync (req. restart)"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_VSync->SetValue(g_Config.bVSync);
|
||||
|
||||
wxStaticText *MSAAText = new wxStaticText(m_PageGeneral, ID_MSAAMODETEXT, wxT("Antialias (MSAA):"), wxDefaultPosition, wxDefaultSize, 0);
|
||||
m_MSAAModeCB = new wxChoice(m_PageGeneral, ID_MSAAMODECB, wxDefaultPosition, wxDefaultSize, arrayStringFor_MSAAModeCB, 0, wxDefaultValidator);
|
||||
m_MSAAModeCB->Append(wxT("(off)"));
|
||||
m_MSAAModeCB->Append(wxT("2x"));
|
||||
m_MSAAModeCB->Append(wxT("4x"));
|
||||
m_MSAAModeCB->Append(wxT("8x"));
|
||||
m_MSAAModeCB->Append(wxT("8x CSAA"));
|
||||
m_MSAAModeCB->Append(wxT("8xQ CSAA"));
|
||||
m_MSAAModeCB->Append(wxT("16x CSAA"));
|
||||
m_MSAAModeCB->Append(wxT("16xQ CSAA"));
|
||||
// Enhancements
|
||||
m_MaxAnisotropyCB->SetSelection(g_Config.iMaxAnisotropy - 1);
|
||||
m_ForceFiltering->SetValue(g_Config.bForceFiltering);
|
||||
m_MSAAModeCB->SetSelection(g_Config.iMultisampleMode);
|
||||
|
||||
m_OSDHotKey = new wxCheckBox(m_PageGeneral, ID_OSDHOTKEY, wxT("Enable Hotkeys"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
#ifndef _WIN32
|
||||
// JPeterson set the hot key to be Win32-specific
|
||||
m_OSDHotKey->Enable(false);
|
||||
#endif
|
||||
m_OSDHotKey->SetValue(g_Config.bOSDHotKey);
|
||||
wxString shader = wxString::FromAscii(g_Config.sPostProcessingShader.c_str());
|
||||
if (shader == _(""))
|
||||
shader = wxT("(off)");
|
||||
m_PostShaderCB->SetStringSelection(shader);
|
||||
|
||||
// Information
|
||||
m_ShowFPS->SetValue(g_Config.bShowFPS);
|
||||
//m_ShaderErrors->SetValue(g_Config.bShowShaderErrors);
|
||||
m_Statistics->SetValue(g_Config.bOverlayStats);
|
||||
m_ProjStats->SetValue(g_Config.bOverlayProjStats);
|
||||
m_ShowEFBCopyRegions->SetValue(g_Config.bShowEFBCopyRegions);
|
||||
m_TexFmtOverlay->SetValue(g_Config.bTexFmtOverlayEnable);
|
||||
m_TexFmtCenter->SetValue(g_Config.bTexFmtOverlayCenter);
|
||||
m_TexFmtCenter->Enable(m_TexFmtOverlay->IsChecked());
|
||||
|
||||
// Render
|
||||
m_Wireframe->SetValue(g_Config.bWireFrame);
|
||||
m_DisableLighting->SetValue(g_Config.bDisableLighting);
|
||||
m_DisableTexturing->SetValue(g_Config.bDisableTexturing);
|
||||
m_DstAlphaPass->SetValue(g_Config.bDstAlphaPass);
|
||||
m_DisableFog->SetValue(g_Config.bDisableFog);
|
||||
|
||||
m_CheckBox_DisableCopyEFB->SetValue(g_Config.bEFBCopyDisable);
|
||||
g_Config.bCopyEFBToTexture ? m_Radio_CopyEFBToGL->SetValue(true) : m_Radio_CopyEFBToRAM->SetValue(true);
|
||||
|
||||
// Utility
|
||||
m_DumpTextures->SetValue(g_Config.bDumpTextures);
|
||||
m_HiresTextures->SetValue(g_Config.bHiresTextures);
|
||||
m_DumpEFBTarget->SetValue(g_Config.bDumpEFBTarget);
|
||||
m_DumpFrames->SetValue(g_Config.bDumpFrames);
|
||||
m_FreeLook->SetValue(g_Config.bFreeLook);
|
||||
|
||||
// Hacks controls
|
||||
m_PhackvalueCB->SetSelection(g_Config.iPhackvalue);
|
||||
m_SafeTextureCache->SetValue(g_Config.bSafeTextureCache);
|
||||
}
|
||||
void GFXConfigDialogOGL::InitializeGUITooltips()
|
||||
{
|
||||
// Tool tips
|
||||
m_Fullscreen->SetToolTip(
|
||||
wxT("Start the separate window in fullscreen mode.")
|
||||
|
@ -269,53 +304,115 @@ void GFXConfigDialogOGL::CreateGUIControls()
|
|||
"Applies instanty during gameplay: <No>"));
|
||||
m_OSDHotKey->SetToolTip(
|
||||
wxT("Enable OSD hotkeys '3', '4', '5', '6' and '7' to easily toggle some settings."));
|
||||
|
||||
|
||||
// Enhancements
|
||||
sbEnhancements = new wxStaticBoxSizer(wxVERTICAL, m_PageGeneral, wxT("Enhancements"));
|
||||
wxStaticText *AnisoText = new wxStaticText(m_PageGeneral, ID_MAXANISOTROPYTEXT, wxT("Anisotropic filter:"), wxDefaultPosition, wxDefaultSize, 0);
|
||||
m_MaxAnisotropyCB = new wxChoice(m_PageGeneral, ID_MAXANISOTROPY, wxDefaultPosition, wxDefaultSize, arrayStringFor_MaxAnisotropyCB, 0, wxDefaultValidator);
|
||||
m_MaxAnisotropyCB->Append(wxT("1x"));
|
||||
m_MaxAnisotropyCB->Append(wxT("2x"));
|
||||
m_MaxAnisotropyCB->Append(wxT("4x"));
|
||||
m_MaxAnisotropyCB->Append(wxT("8x"));
|
||||
m_MaxAnisotropyCB->Append(wxT("16x"));
|
||||
m_MaxAnisotropyCB->SetSelection(g_Config.iMaxAnisotropy - 1);
|
||||
m_ForceFiltering = new wxCheckBox(m_PageGeneral, ID_FORCEFILTERING, wxT("Force Linear filter (!)"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_ForceFiltering->SetValue(g_Config.bForceFiltering);
|
||||
m_ForceFiltering->SetToolTip(
|
||||
wxT("Even though it will increase the IQ, it will also break some EFB effects\n")
|
||||
wxT("such as Bink FMV in many Wii games or the goo in Mario Sunshine, so be careful :)"));
|
||||
|
||||
// Render
|
||||
m_DstAlphaPass->SetToolTip(wxT("This renders a second time to set alpha to a constant value,")
|
||||
wxT("\nDisabling it may speed up some games, but could also cause glitches."));
|
||||
m_DisableFog->SetToolTip(wxT("This option should not require a restart."));
|
||||
m_CheckBox_DisableCopyEFB->SetToolTip(wxT("This may lead to a higher FPS in for example Zelda - TP.")
|
||||
wxT(" But it may also cause graphical errors and missing graphics."));
|
||||
m_Radio_CopyEFBToRAM->SetToolTip(wxT("[This option will apply immediately and does not require a restart to take effect.]"));
|
||||
m_Radio_CopyEFBToGL->SetToolTip(wxT("[This option will apply immediately and does not require a restart to take effect.]"));
|
||||
|
||||
// Utility
|
||||
#ifdef _WIN32
|
||||
m_DumpFrames->SetToolTip(
|
||||
wxT("When dumping begins, you will be prompted to choose a video codec to")
|
||||
wxT(" encode the video in."));
|
||||
#else
|
||||
m_DumpFrames->SetToolTip(wxT(
|
||||
"!!WARNING!! This option dumps raw bitmaps of each frame, and will fill up"
|
||||
" your hard drive very quickly. Only turn this on if you have a named pipe"
|
||||
" set up for the dump or several gigabytes of space available."));
|
||||
#endif
|
||||
m_FreeLook->SetToolTip(
|
||||
wxT("Use WASD to move around, 0 and 9 to move faster or slower, and the")
|
||||
wxT(" left mouse button to pan the view."));
|
||||
|
||||
// Hacks controls
|
||||
m_SafeTextureCache->SetToolTip(wxT("This is useful to prevent Metroid Prime from crashing, but can cause problems in other games.")
|
||||
wxT("\n[This option will apply immediately and does not require a restart. However it may not")
|
||||
wxT(" be entirely safe to change it midgames.]"));
|
||||
}
|
||||
void GFXConfigDialogOGL::CreateGUIControls()
|
||||
{
|
||||
InitializeGUILists();
|
||||
|
||||
// Notebook
|
||||
m_Notebook = new wxNotebook(this, ID_NOTEBOOK, wxDefaultPosition, wxDefaultSize);
|
||||
m_PageGeneral = new wxPanel(m_Notebook, ID_PAGEGENERAL, wxDefaultPosition, wxDefaultSize);
|
||||
m_Notebook->AddPage(m_PageGeneral, wxT("General"));
|
||||
m_PageAdvanced = new wxPanel(m_Notebook, ID_PAGEADVANCED, wxDefaultPosition, wxDefaultSize);
|
||||
m_Notebook->AddPage(m_PageAdvanced, wxT("Advanced"));
|
||||
|
||||
// Buttons
|
||||
m_About = new wxButton(this, ID_ABOUTOGL, wxT("About"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_Close = new wxButton(this, ID_CLOSE, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
|
||||
// Put notebook and buttons in sizers
|
||||
wxBoxSizer* sButtons;
|
||||
sButtons = new wxBoxSizer(wxHORIZONTAL);
|
||||
sButtons->Add(m_About, 0, wxALL, 5);
|
||||
sButtons->AddStretchSpacer();
|
||||
sButtons->Add(m_Close, 0, wxALL, 5);
|
||||
|
||||
wxBoxSizer* sMain;
|
||||
sMain = new wxBoxSizer(wxVERTICAL);
|
||||
sMain->Add(m_Notebook, 1, wxEXPAND|wxALL, 5);
|
||||
sMain->Add(sButtons, 0, wxEXPAND, 5);
|
||||
|
||||
this->SetSizer(sMain);
|
||||
this->Layout();
|
||||
|
||||
// General Display Settings
|
||||
sbBasic = new wxStaticBoxSizer(wxVERTICAL, m_PageGeneral, wxT("Basic Display Settings"));
|
||||
wxStaticText *IRText = new wxStaticText(m_PageGeneral, ID_IRTEXT, wxT("Resolution:"), wxDefaultPosition, wxDefaultSize, 0);
|
||||
m_NativeResolution = new wxCheckBox(m_PageGeneral, ID_NATIVERESOLUTION, wxT("Native"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_2xResolution = new wxCheckBox(m_PageGeneral, ID_2X_RESOLUTION, wxT("2x"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
wxStaticText *RText = new wxStaticText(m_PageGeneral, ID_RTEXT, wxT("Custom resolution:"), wxDefaultPosition, wxDefaultSize, 0);
|
||||
wxStaticText *WMText = new wxStaticText(m_PageGeneral, ID_WMTEXT, wxT("Windowed:"), wxDefaultPosition, wxDefaultSize , 0 );
|
||||
m_Fullscreen = new wxCheckBox(m_PageGeneral, ID_FULLSCREEN, wxT("Fullscreen:"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_WindowResolutionCB = new wxComboBox(m_PageGeneral, ID_WINDOWRESOLUTIONCB, arrayStringFor_WindowResolutionCB[0], wxDefaultPosition, wxDefaultSize, arrayStringFor_WindowResolutionCB, wxCB_READONLY, wxDefaultValidator);
|
||||
m_WindowFSResolutionCB = new wxComboBox(m_PageGeneral, ID_WINDOWFSRESOLUTIONCB, arrayStringFor_FullscreenCB[0], wxDefaultPosition, wxDefaultSize, arrayStringFor_FullscreenCB, wxCB_READONLY, wxDefaultValidator);
|
||||
#ifndef _WIN32
|
||||
m_HideCursor = new wxCheckBox(m_PageGeneral, ID_HIDECURSOR, wxT("Hide mouse cursor"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
#endif
|
||||
// Aspect ratio / positioning controls
|
||||
wxStaticText *KeepARText = new wxStaticText(m_PageGeneral, wxID_ANY, wxT("Keep aspect ratio:"), wxDefaultPosition, wxDefaultSize, 0);
|
||||
m_KeepAR = new wxChoice(m_PageGeneral, ID_ASPECT, wxDefaultPosition, wxDefaultSize, arrayStringFor_AspectRatio);
|
||||
m_Crop = new wxCheckBox(m_PageGeneral, ID_CROP, wxT("Crop"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
|
||||
// Advanced Display Settings
|
||||
sbBasicAdvanced = new wxStaticBoxSizer(wxVERTICAL, m_PageGeneral, wxT("Advanced Display Settings"));
|
||||
m_RenderToMainWindow = new wxCheckBox(m_PageGeneral, ID_RENDERTOMAINWINDOW, wxT("Render to Main window"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_OSDHotKey = new wxCheckBox(m_PageGeneral, ID_OSDHOTKEY, wxT("Enable Hotkeys"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
#ifndef _WIN32
|
||||
// JPeterson set the hot key to be Win32-specific
|
||||
m_OSDHotKey->Enable(false);
|
||||
#endif
|
||||
m_VSync = new wxCheckBox(m_PageGeneral, ID_VSYNC, wxT("VSync (req. restart)"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_UseXFB = new wxCheckBox(m_PageGeneral, ID_USEXFB, wxT("Use Real XFB"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_AutoScale = new wxCheckBox(m_PageGeneral, ID_AUTOSCALE, wxT("Auto scale (try to remove borders)"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_WidescreenHack = new wxCheckBox(m_PageGeneral, ID_WIDESCREENHACK, wxT("Wide screen hack"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
|
||||
// Enhancements
|
||||
sbEnhancements = new wxStaticBoxSizer(wxVERTICAL, m_PageGeneral, wxT("Enhancements"));
|
||||
wxStaticText *AnisoText = new wxStaticText(m_PageGeneral, ID_MAXANISOTROPYTEXT, wxT("Anisotropic filter:"), wxDefaultPosition, wxDefaultSize, 0);
|
||||
m_MaxAnisotropyCB = new wxChoice(m_PageGeneral, ID_MAXANISOTROPY, wxDefaultPosition, wxDefaultSize, arrayStringFor_MaxAnisotropyCB, 0, wxDefaultValidator);
|
||||
m_ForceFiltering = new wxCheckBox(m_PageGeneral, ID_FORCEFILTERING, wxT("Force Linear filter (!)"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
wxStaticText *MSAAText = new wxStaticText(m_PageGeneral, ID_MSAAMODETEXT, wxT("Antialias (MSAA):"), wxDefaultPosition, wxDefaultSize, 0);
|
||||
m_MSAAModeCB = new wxChoice(m_PageGeneral, ID_MSAAMODECB, wxDefaultPosition, wxDefaultSize, arrayStringFor_MSAAModeCB, 0, wxDefaultValidator);
|
||||
wxStaticText *PostShaderText = new wxStaticText(m_PageGeneral, ID_POSTSHADERTEXT, wxT("Post-processing shader:"), wxDefaultPosition, wxDefaultSize, 0);
|
||||
m_PostShaderCB = new wxChoice(m_PageGeneral, ID_POSTSHADER, wxDefaultPosition, wxDefaultSize, arrayStringFor_PostShaderCB, 0, wxDefaultValidator);
|
||||
m_PostShaderCB->Append(wxT("(off)"));
|
||||
m_ReloadShader = new wxButton(m_PageGeneral, ID_RELOADSHADER, wxT("&Reload"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_EditShader = new wxButton(m_PageGeneral, ID_EDITSHADER, wxT("&Edit"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
|
||||
if (File::IsDirectory(File::GetUserPath(D_SHADERS_IDX)))
|
||||
{
|
||||
File::FSTEntry entry;
|
||||
File::ScanDirectoryTree(File::GetUserPath(D_SHADERS_IDX), entry);
|
||||
for (u32 i = 0; i < entry.children.size(); i++)
|
||||
{
|
||||
std::string name = entry.children[i].virtualName.c_str();
|
||||
if (!strcasecmp(name.substr(name.size() - 4).c_str(), ".txt"))
|
||||
name = name.substr(0, name.size() - 4);
|
||||
m_PostShaderCB->Append(wxString::FromAscii(name.c_str()));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
File::CreateDir(File::GetUserPath(D_SHADERS_IDX));
|
||||
}
|
||||
|
||||
wxString shader= wxString::FromAscii(g_Config.sPostProcessingShader.c_str());
|
||||
if (shader == _(""))
|
||||
shader = wxT("(off)");
|
||||
m_PostShaderCB->SetStringSelection(shader);
|
||||
|
||||
// Sizers
|
||||
|
||||
sGeneral = new wxBoxSizer(wxVERTICAL);
|
||||
sBasic = new wxGridBagSizer(0, 0);
|
||||
|
||||
|
@ -330,8 +427,8 @@ void GFXConfigDialogOGL::CreateGUIControls()
|
|||
sBasic->Add(m_WindowFSResolutionCB, wxGBPosition(2, 2), wxGBSpan(1, 1), wxALL, 5);
|
||||
|
||||
sBasic->Add(KeepARText, wxGBPosition(3, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
||||
sBasic->Add(m_KeepAR, wxGBPosition(3, 1), wxGBSpan(1, 1), wxALL, 5);
|
||||
sBasic->Add(m_Crop, wxGBPosition(3, 2), wxGBSpan(1, 1), wxALL | wxALIGN_CENTER_VERTICAL, 5);
|
||||
sBasic->Add(m_KeepAR, wxGBPosition(3, 1), wxGBSpan(1, 1), wxALL, 5);
|
||||
sBasic->Add(m_Crop, wxGBPosition(3, 2), wxGBSpan(1, 1), wxALL | wxALIGN_CENTER_VERTICAL, 5);
|
||||
|
||||
// This option is configured from the main Dolphin.exe settings for _WIN32
|
||||
#ifndef _WIN32
|
||||
|
@ -344,7 +441,6 @@ void GFXConfigDialogOGL::CreateGUIControls()
|
|||
sBasicAdvanced = new wxGridBagSizer(0, 0);
|
||||
|
||||
sBasicAdvanced->Add(m_RenderToMainWindow, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALL, 5);
|
||||
|
||||
sBasicAdvanced->Add(m_OSDHotKey, wxGBPosition(1, 0), wxGBSpan(1, 2), wxALL, 5);
|
||||
sBasicAdvanced->Add(m_VSync, wxGBPosition(2, 0), wxGBSpan(1, 2), wxALL, 5);
|
||||
sBasicAdvanced->Add(m_UseXFB, wxGBPosition(3, 0), wxGBSpan(1, 2), wxALL, 5);
|
||||
|
@ -372,109 +468,45 @@ void GFXConfigDialogOGL::CreateGUIControls()
|
|||
// Information
|
||||
sbInfo = new wxStaticBoxSizer(wxVERTICAL, m_PageAdvanced, wxT("Info"));
|
||||
m_ShowFPS = new wxCheckBox(m_PageAdvanced, ID_SHOWFPS, wxT("Overlay FPS"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_ShowFPS->SetValue(g_Config.bShowFPS);
|
||||
m_Statistics = new wxCheckBox(m_PageAdvanced, ID_STATISTICS, wxT("Overlay some statistics"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_Statistics->SetValue(g_Config.bOverlayStats);
|
||||
m_ProjStats = new wxCheckBox(m_PageAdvanced, ID_PROJSTATS, wxT("Overlay Projection Stats"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_ProjStats->SetValue(g_Config.bOverlayProjStats);
|
||||
m_ShowEFBCopyRegions = new wxCheckBox(m_PageAdvanced, ID_SHOWEFBCOPYREGIONS, wxT("Show EFB Copy Regions"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_ShowEFBCopyRegions->SetValue(g_Config.bShowEFBCopyRegions);
|
||||
m_ShaderErrors = new wxCheckBox(m_PageAdvanced, ID_SHADERERRORS, wxT("Show shader compilation issues"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
//m_ShaderErrors->SetValue(g_Config.bShowShaderErrors);
|
||||
m_ShaderErrors->Enable(false);
|
||||
m_Statistics = new wxCheckBox(m_PageAdvanced, ID_STATISTICS, wxT("Overlay some statistics"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_ProjStats = new wxCheckBox(m_PageAdvanced, ID_PROJSTATS, wxT("Overlay Projection Stats"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_ShowEFBCopyRegions = new wxCheckBox(m_PageAdvanced, ID_SHOWEFBCOPYREGIONS, wxT("Show EFB Copy Regions"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_TexFmtOverlay = new wxCheckBox(m_PageAdvanced, ID_TEXFMTOVERLAY, wxT("Overlay texture format"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_TexFmtOverlay->SetValue(g_Config.bTexFmtOverlayEnable);
|
||||
m_TexFmtCenter = new wxCheckBox(m_PageAdvanced, ID_TEXFMTCENTER, wxT("centered"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_TexFmtCenter->SetValue(g_Config.bTexFmtOverlayCenter);
|
||||
m_TexFmtCenter->Enable(m_TexFmtOverlay->IsChecked());
|
||||
|
||||
// Render
|
||||
sbRendering = new wxStaticBoxSizer(wxVERTICAL, m_PageAdvanced, wxT("Rendering"));
|
||||
m_Wireframe = new wxCheckBox(m_PageAdvanced, ID_WIREFRAME, wxT("Enable Wireframe"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_Wireframe->SetValue(g_Config.bWireFrame);
|
||||
m_Wireframe->Enable(true);
|
||||
m_DisableLighting = new wxCheckBox(m_PageAdvanced, ID_DISABLELIGHTING, wxT("Disable Material Lighting"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_DisableLighting->SetValue(g_Config.bDisableLighting);
|
||||
m_DisableLighting->Enable(true);
|
||||
m_DisableTexturing = new wxCheckBox(m_PageAdvanced, ID_DISABLETEXTURING, wxT("Disable Texturing"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_DisableTexturing->SetValue(g_Config.bDisableTexturing);
|
||||
m_DisableTexturing->Enable(true);
|
||||
m_DstAlphaPass = new wxCheckBox(m_PageAdvanced, ID_DSTALPHAPASS, wxT("Disable Destination Alpha Pass"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_DstAlphaPass->SetValue(g_Config.bDstAlphaPass);
|
||||
m_DstAlphaPass->Enable(true);
|
||||
m_DisableFog = new wxCheckBox(m_PageAdvanced, ID_DISABLEFOG, wxT("Disable Fog"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_DisableFog->SetValue(g_Config.bDisableFog);
|
||||
|
||||
m_StaticBox_EFB = new wxStaticBox(m_PageAdvanced, ID_STATICBOX_EFB, wxT("EFB Copy"));
|
||||
m_CheckBox_DisableCopyEFB = new wxCheckBox(m_PageAdvanced, ID_CHECKBOX_DISABLECOPYEFB, wxT("Disable"));
|
||||
m_CheckBox_DisableCopyEFB->SetValue(g_Config.bEFBCopyDisable);
|
||||
m_CheckBox_DisableCopyEFB->SetToolTip(wxT("This may lead to a higher FPS in for example Zelda - TP.")
|
||||
wxT(" But it may also cause graphical errors and missing graphics."));
|
||||
|
||||
m_Radio_CopyEFBToRAM = new wxRadioButton(m_PageAdvanced, ID_RADIO_COPYEFBTORAM, wxT("Copy EFB to system RAM (real)"));
|
||||
m_Radio_CopyEFBToRAM->SetToolTip(wxT("[This option will apply immediately and does not require a restart to take effect.]"));
|
||||
m_Radio_CopyEFBToGL = new wxRadioButton(m_PageAdvanced, ID_RADIO_COPYEFBTOGL, wxT("Copy EFB to GL texture (hack)"));
|
||||
m_Radio_CopyEFBToGL->SetToolTip(wxT("[This option will apply immediately and does not require a restart to take effect.]"));
|
||||
g_Config.bCopyEFBToTexture ? m_Radio_CopyEFBToGL->SetValue(true) : m_Radio_CopyEFBToRAM->SetValue(true);
|
||||
|
||||
// Utility
|
||||
sbUtilities = new wxStaticBoxSizer(wxVERTICAL, m_PageAdvanced, wxT("Utilities"));
|
||||
m_DumpTextures = new wxCheckBox(m_PageAdvanced, ID_DUMPTEXTURES, wxT("Dump textures"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_DumpTextures->SetValue(g_Config.bDumpTextures);
|
||||
m_HiresTextures = new wxCheckBox(m_PageAdvanced, ID_HIRESTEXTURES, wxT("Load Hires textures"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_HiresTextures->SetValue(g_Config.bHiresTextures);
|
||||
m_DumpEFBTarget = new wxCheckBox(m_PageAdvanced, ID_DUMPEFBTARGET, wxT("Dump EFB Target"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_DumpEFBTarget->SetValue(g_Config.bDumpEFBTarget);
|
||||
m_DumpFrames = new wxCheckBox(m_PageAdvanced, ID_DUMPFRAMES, wxT("Dump Rendered Frames"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
#ifdef _WIN32
|
||||
m_DumpFrames->SetToolTip(
|
||||
wxT("When dumping begins, you will be prompted to choose a video codec to")
|
||||
wxT(" encode the video in."));
|
||||
#else
|
||||
m_DumpFrames->SetToolTip(wxT(
|
||||
"!!WARNING!! This option dumps raw bitmaps of each frame, and will fill up"
|
||||
" your hard drive very quickly. Only turn this on if you have a named pipe"
|
||||
" set up for the dump or several gigabytes of space available."));
|
||||
#endif
|
||||
m_DumpFrames->SetValue(g_Config.bDumpFrames);
|
||||
m_FreeLook = new wxCheckBox(m_PageAdvanced, ID_FREELOOK, wxT("Free Look"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_FreeLook->SetToolTip(
|
||||
wxT("Use WASD to move around, 0 and 9 to move faster or slower, and the")
|
||||
wxT(" left mouse button to pan the view."));
|
||||
m_FreeLook->SetValue(g_Config.bFreeLook);
|
||||
|
||||
// Hacks controls
|
||||
sbHacks = new wxStaticBoxSizer(wxVERTICAL, m_PageAdvanced, wxT("Hacks"));
|
||||
m_SafeTextureCache = new wxCheckBox(m_PageAdvanced, ID_SAFETEXTURECACHE, wxT("Use Safe texture cache"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_PhackvalueCB = new wxChoice(m_PageAdvanced, ID_PHACKVALUE, wxDefaultPosition, wxDefaultSize, arrayStringFor_PhackvalueCB, 0, wxDefaultValidator);
|
||||
m_PhackvalueCB->Append(wxT("None"));
|
||||
m_PhackvalueCB->Append(wxT("Zelda Twilight Princess Bloom hack"));
|
||||
m_PhackvalueCB->Append(wxT("Sonic and the Black Knight"));
|
||||
m_PhackvalueCB->Append(wxT("Bleach Versus Crusade"));
|
||||
m_PhackvalueCB->Append(wxT("Final Fantasy CC Echo of Time"));
|
||||
m_PhackvalueCB->Append(wxT("Harvest Moon Magical Melody"));
|
||||
m_PhackvalueCB->Append(wxT("Baten Kaitos"));
|
||||
m_PhackvalueCB->Append(wxT("Baten Kaitos Origin"));
|
||||
m_PhackvalueCB->Append(wxT("Skies of Arcadia"));
|
||||
m_PhackvalueCB->SetSelection(g_Config.iPhackvalue);
|
||||
|
||||
// Default values
|
||||
m_SafeTextureCache->SetValue(g_Config.bSafeTextureCache);
|
||||
|
||||
// Tool tips
|
||||
m_SafeTextureCache->SetToolTip(wxT("This is useful to prevent Metroid Prime from crashing, but can cause problems in other games.")
|
||||
wxT("\n[This option will apply immediately and does not require a restart. However it may not")
|
||||
wxT(" be entirely safe to change it midgames.]"));
|
||||
|
||||
m_DstAlphaPass->SetToolTip(wxT("This renders a second time to set alpha to a constant value,")
|
||||
wxT("\nDisabling it may speed up some games, but could also cause glitches."));
|
||||
m_DisableFog->SetToolTip(wxT("This option should not require a restart."));
|
||||
|
||||
// Sizers
|
||||
sHacks = new wxGridBagSizer(0, 0);
|
||||
sHacks->Add(m_SafeTextureCache, wxGBPosition(1, 0), wxGBSpan(1, 1), wxALL, 5);
|
||||
sHacks->Add(m_PhackvalueCB, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALL, 5);
|
||||
|
||||
sbHacks = new wxStaticBoxSizer(wxVERTICAL, m_PageAdvanced, wxT("Hacks"));
|
||||
sbHacks->Add(sHacks, 0, wxEXPAND | (wxTOP), 0);
|
||||
|
||||
// Sizers
|
||||
|
@ -497,16 +529,15 @@ void GFXConfigDialogOGL::CreateGUIControls()
|
|||
sRendering->Add(m_DstAlphaPass, wxGBPosition(3, 0), wxGBSpan(1, 1), wxALL, 4);
|
||||
sRendering->Add(m_DisableFog, wxGBPosition(4, 0), wxGBSpan(1, 1), wxALL, 4);
|
||||
sRenderBoxRow1->Add(sRendering, 0, wxALL|wxEXPAND, 1);
|
||||
wxStaticBoxSizer *sSBox = new wxStaticBoxSizer(m_StaticBox_EFB, wxVERTICAL);
|
||||
wxBoxSizer *sStrip1 = new wxBoxSizer(wxHORIZONTAL);
|
||||
sStrip1->Add(m_CheckBox_DisableCopyEFB, 0, wxALL|wxEXPAND, 5);
|
||||
sSBox->Add(sStrip1, 0, wxALL|wxEXPAND, 0);
|
||||
sSBox->Add(m_Radio_CopyEFBToRAM, 0, wxALL|wxEXPAND, 5);
|
||||
sSBox->Add(m_Radio_CopyEFBToGL, 0, wxALL|wxEXPAND, 5);
|
||||
wxStaticBoxSizer *sSBox = new wxStaticBoxSizer(m_StaticBox_EFB, wxVERTICAL);
|
||||
wxBoxSizer *sStrip1 = new wxBoxSizer(wxHORIZONTAL);
|
||||
sStrip1->Add(m_CheckBox_DisableCopyEFB, 0, wxALL|wxEXPAND, 5);
|
||||
sSBox->Add(sStrip1, 0, wxALL|wxEXPAND, 0);
|
||||
sSBox->Add(m_Radio_CopyEFBToRAM, 0, wxALL|wxEXPAND, 5);
|
||||
sSBox->Add(m_Radio_CopyEFBToGL, 0, wxALL|wxEXPAND, 5);
|
||||
sRenderBoxRow1->Add(sSBox, 0, wxALL|wxEXPAND, 5);
|
||||
sbRendering->Add(sRenderBoxRow1);
|
||||
|
||||
//sUtilities = new wxBoxSizer(wxHORIZONTAL);
|
||||
sUtilities = new wxGridBagSizer(0, 0);
|
||||
sUtilities->Add(m_DumpTextures, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||
sUtilities->Add(m_HiresTextures, wxGBPosition(0, 1), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||
|
@ -524,6 +555,9 @@ void GFXConfigDialogOGL::CreateGUIControls()
|
|||
m_PageAdvanced->SetSizer(sAdvanced);
|
||||
sAdvanced->Layout();
|
||||
|
||||
InitializeGUIValues();
|
||||
InitializeGUITooltips();
|
||||
|
||||
Fit();
|
||||
Center();
|
||||
UpdateGUI();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue