|
|
|
@ -30,13 +30,14 @@
|
|
|
|
|
|
|
|
|
|
#include "Globals.h" // Local
|
|
|
|
|
#include "ConfigMain.h"
|
|
|
|
|
#include "PluginManager.h"
|
|
|
|
|
#include "ConfigManager.h"
|
|
|
|
|
#include "SysConf.h"
|
|
|
|
|
#include "Frame.h"
|
|
|
|
|
#include "HotkeyDlg.h"
|
|
|
|
|
#include "Main.h"
|
|
|
|
|
|
|
|
|
|
#include "VideoBackendBase.h"
|
|
|
|
|
|
|
|
|
|
#ifdef __APPLE__
|
|
|
|
|
#include <ApplicationServices/ApplicationServices.h>
|
|
|
|
|
#endif
|
|
|
|
@ -176,8 +177,7 @@ EVT_BUTTON(ID_GRAPHIC_CONFIG, CConfigMain::OnConfig)
|
|
|
|
|
|
|
|
|
|
END_EVENT_TABLE()
|
|
|
|
|
|
|
|
|
|
CConfigMain::CConfigMain(wxWindow* parent, wxWindowID id, const wxString& title,
|
|
|
|
|
const wxPoint& position, const wxSize& size, long style)
|
|
|
|
|
CConfigMain::CConfigMain(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& position, const wxSize& size, long style)
|
|
|
|
|
: wxDialog(parent, id, title, position, size, style)
|
|
|
|
|
{
|
|
|
|
|
// Control refreshing of the ISOs list
|
|
|
|
@ -223,6 +223,7 @@ void CConfigMain::UpdateGUI()
|
|
|
|
|
CPUEngine->Disable();
|
|
|
|
|
LockThreads->Disable();
|
|
|
|
|
DSPThread->Disable();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Disable stuff on DisplayPage
|
|
|
|
|
FullscreenResolution->Disable();
|
|
|
|
@ -230,16 +231,12 @@ void CConfigMain::UpdateGUI()
|
|
|
|
|
ProgressiveScan->Disable();
|
|
|
|
|
NTSCJ->Disable();
|
|
|
|
|
|
|
|
|
|
#if defined _WIN32 || defined __linux__
|
|
|
|
|
// Disable graphics plugin selection
|
|
|
|
|
GraphicSelection->Disable();
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
// Disable stuff on AudioPage
|
|
|
|
|
DSPEngine->Disable();
|
|
|
|
|
|
|
|
|
|
// Disable stuff on GamecubePage
|
|
|
|
|
GCSystemLang->Disable();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Disable stuff on WiiPage
|
|
|
|
|
WiiSensBarPos->Disable();
|
|
|
|
@ -250,8 +247,15 @@ void CConfigMain::UpdateGUI()
|
|
|
|
|
WiiAspectRatio->Disable();
|
|
|
|
|
WiiSystemLang->Disable();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Disable stuff on PathsPage
|
|
|
|
|
PathsPage->Disable();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if defined _WIN32 || defined __linux__
|
|
|
|
|
// Disable stuff on PluginsPage
|
|
|
|
|
GraphicSelection->Disable();
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -376,8 +380,7 @@ void CConfigMain::InitializeGUIValues()
|
|
|
|
|
UsePanicHandlers->SetValue(startup_params.bUsePanicHandlers);
|
|
|
|
|
Theme->SetSelection(startup_params.iTheme);
|
|
|
|
|
// need redesign
|
|
|
|
|
for (unsigned int i = 0; i < sizeof(langIds) / sizeof(wxLanguage); i++)
|
|
|
|
|
{
|
|
|
|
|
for (unsigned int i = 0; i < sizeof(langIds) / sizeof(wxLanguage); i++) {
|
|
|
|
|
if (langIds[i] == SConfig::GetInstance().m_InterfaceLanguage)
|
|
|
|
|
{
|
|
|
|
|
InterfaceLang->SetSelection(i);
|
|
|
|
@ -407,90 +410,9 @@ void CConfigMain::InitializeGUIValues()
|
|
|
|
|
GCSystemLang->SetSelection(startup_params.SelectedLanguage);
|
|
|
|
|
|
|
|
|
|
// Gamecube - Devices
|
|
|
|
|
wxArrayString SlotDevices;
|
|
|
|
|
SlotDevices.Add(_(DEV_NONE_STR));
|
|
|
|
|
SlotDevices.Add(_(DEV_DUMMY_STR));
|
|
|
|
|
SlotDevices.Add(_(EXIDEV_MEMCARD_STR));
|
|
|
|
|
SlotDevices.Add(_(EXIDEV_GECKO_STR));
|
|
|
|
|
#if HAVE_PORTAUDIO
|
|
|
|
|
SlotDevices.Add(_(EXIDEV_MIC_STR));
|
|
|
|
|
#endif
|
|
|
|
|
// Not here. They use some locals over in CreateGUIControls for initialization,
|
|
|
|
|
// which is why they are still there.
|
|
|
|
|
|
|
|
|
|
wxArrayString SP1Devices;
|
|
|
|
|
SP1Devices.Add(_(DEV_NONE_STR));
|
|
|
|
|
SP1Devices.Add(_(DEV_DUMMY_STR));
|
|
|
|
|
SP1Devices.Add(_(EXIDEV_BBA_STR));
|
|
|
|
|
SP1Devices.Add(_(EXIDEV_AM_BB_STR));
|
|
|
|
|
|
|
|
|
|
wxArrayString SIDevices;
|
|
|
|
|
SIDevices.Add(_(DEV_NONE_STR));
|
|
|
|
|
SIDevices.Add(_(SIDEV_STDCONT_STR));
|
|
|
|
|
SIDevices.Add(_(SIDEV_GBA_STR));
|
|
|
|
|
SIDevices.Add(_(SIDEV_AM_BB_STR));
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < 3; ++i)
|
|
|
|
|
{
|
|
|
|
|
bool isMemcard = false;
|
|
|
|
|
|
|
|
|
|
// Add strings to the wxChoice list, the third wxChoice is the SP1 slot
|
|
|
|
|
if (i == 2)
|
|
|
|
|
GCEXIDevice[i]->Append(SP1Devices);
|
|
|
|
|
else
|
|
|
|
|
GCEXIDevice[i]->Append(SlotDevices);
|
|
|
|
|
|
|
|
|
|
switch (SConfig::GetInstance().m_EXIDevice[i])
|
|
|
|
|
{
|
|
|
|
|
case EXIDEVICE_NONE:
|
|
|
|
|
GCEXIDevice[i]->SetStringSelection(SlotDevices[0]);
|
|
|
|
|
break;
|
|
|
|
|
case EXIDEVICE_MEMORYCARD_A:
|
|
|
|
|
case EXIDEVICE_MEMORYCARD_B:
|
|
|
|
|
isMemcard = GCEXIDevice[i]->SetStringSelection(SlotDevices[2]);
|
|
|
|
|
break;
|
|
|
|
|
case EXIDEVICE_MIC:
|
|
|
|
|
GCEXIDevice[i]->SetStringSelection(SlotDevices[4]);
|
|
|
|
|
break;
|
|
|
|
|
case EXIDEVICE_ETH:
|
|
|
|
|
GCEXIDevice[i]->SetStringSelection(SP1Devices[2]);
|
|
|
|
|
break;
|
|
|
|
|
case EXIDEVICE_AM_BASEBOARD:
|
|
|
|
|
GCEXIDevice[i]->SetStringSelection(SP1Devices[3]);
|
|
|
|
|
break;
|
|
|
|
|
case EXIDEVICE_GECKO:
|
|
|
|
|
GCEXIDevice[i]->SetStringSelection(SlotDevices[3]);
|
|
|
|
|
break;
|
|
|
|
|
case EXIDEVICE_DUMMY:
|
|
|
|
|
default:
|
|
|
|
|
GCEXIDevice[i]->SetStringSelection(SlotDevices[1]);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
if (!isMemcard && i < 2)
|
|
|
|
|
GCMemcardPath[i]->Disable();
|
|
|
|
|
}
|
|
|
|
|
for (int i = 0; i < 4; ++i)
|
|
|
|
|
{
|
|
|
|
|
// Add string to the wxChoice list
|
|
|
|
|
GCSIDevice[i]->Append(SIDevices);
|
|
|
|
|
|
|
|
|
|
switch (SConfig::GetInstance().m_SIDevice[i])
|
|
|
|
|
{
|
|
|
|
|
case SI_GC_CONTROLLER:
|
|
|
|
|
GCSIDevice[i]->SetStringSelection(SIDevices[1]);
|
|
|
|
|
break;
|
|
|
|
|
case SI_GBA:
|
|
|
|
|
GCSIDevice[i]->SetStringSelection(SIDevices[2]);
|
|
|
|
|
break;
|
|
|
|
|
case SI_AM_BASEBOARD:
|
|
|
|
|
GCSIDevice[i]->SetStringSelection(SIDevices[3]);
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
GCSIDevice[i]->SetStringSelection(SIDevices[0]);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
// Remove the AM baseboard from the list, only the first list can select it
|
|
|
|
|
if (i == 0)
|
|
|
|
|
SIDevices.RemoveAt(SIDevices.GetCount() - 1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Wii - Wiimote
|
|
|
|
|
WiiSensBarPos->SetSelection(SConfig::GetInstance().m_SYSCONF->GetData<u8>("BT.BAR"));
|
|
|
|
@ -514,11 +436,13 @@ void CConfigMain::InitializeGUIValues()
|
|
|
|
|
DVDRoot->SetPath(wxString(startup_params.m_strDVDRoot.c_str(), *wxConvCurrent));
|
|
|
|
|
ApploaderPath->SetPath(wxString(startup_params.m_strApploader.c_str(), *wxConvCurrent));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if defined _WIN32 || defined __linux__
|
|
|
|
|
// Plugins
|
|
|
|
|
FillChoiceBox(GraphicSelection, PLUGIN_TYPE_VIDEO, startup_params.m_strVideoPlugin);
|
|
|
|
|
#endif
|
|
|
|
|
// video backend list
|
|
|
|
|
for (std::vector<VideoBackend*>::const_iterator it = g_available_video_backends.begin(); it != g_available_video_backends.end(); ++it)
|
|
|
|
|
{
|
|
|
|
|
GraphicSelection->AppendString(wxString::FromUTF8((*it)->GetName().c_str()));
|
|
|
|
|
if (*it == g_video_backend)
|
|
|
|
|
GraphicSelection->Select(it - g_available_video_backends.begin());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CConfigMain::InitializeGUITooltips()
|
|
|
|
@ -556,6 +480,7 @@ void CConfigMain::InitializeGUITooltips()
|
|
|
|
|
// Audio tooltips
|
|
|
|
|
EnableDTKMusic->SetToolTip(_("This is used to play music tracks, like BGM."));
|
|
|
|
|
EnableThrottle->SetToolTip(_("This is used to control game speed by sound throttle.\nDisabling this could cause abnormal game speed, such as too fast.\nBut sometimes enabling this could cause constant noise.\n\nKeyboard Shortcut <TAB>: Hold down to instantly disable Throttle."));
|
|
|
|
|
DSPEngine->SetToolTip(_("please someone fill this tooltip i have no idea what to say :D"));
|
|
|
|
|
FrequencySelection->SetToolTip(_("Changing this will have no effect while the emulator is running!"));
|
|
|
|
|
BackendSelection->SetToolTip(_("Changing this will have no effect while the emulator is running!"));
|
|
|
|
|
|
|
|
|
@ -571,13 +496,13 @@ void CConfigMain::CreateGUIControls()
|
|
|
|
|
InitializeGUILists();
|
|
|
|
|
|
|
|
|
|
// Create the notebook and pages
|
|
|
|
|
Notebook = new wxNotebook(this, ID_NOTEBOOK, wxDefaultPosition, wxDefaultSize);
|
|
|
|
|
wxPanel *GeneralPage = new wxPanel(Notebook, ID_GENERALPAGE, wxDefaultPosition, wxDefaultSize);
|
|
|
|
|
wxPanel *DisplayPage = new wxPanel(Notebook, ID_DISPLAYPAGE, wxDefaultPosition, wxDefaultSize);
|
|
|
|
|
wxPanel *AudioPage = new wxPanel(Notebook, ID_AUDIOPAGE, wxDefaultPosition, wxDefaultSize);
|
|
|
|
|
wxPanel *GamecubePage = new wxPanel(Notebook, ID_GAMECUBEPAGE, wxDefaultPosition, wxDefaultSize);
|
|
|
|
|
wxPanel *WiiPage = new wxPanel(Notebook, ID_WIIPAGE, wxDefaultPosition, wxDefaultSize);
|
|
|
|
|
PathsPage = new wxPanel(Notebook, ID_PATHSPAGE, wxDefaultPosition, wxDefaultSize);
|
|
|
|
|
wxNotebook* const Notebook = new wxNotebook(this, ID_NOTEBOOK, wxDefaultPosition, wxDefaultSize);
|
|
|
|
|
wxPanel* const GeneralPage = new wxPanel(Notebook, ID_GENERALPAGE, wxDefaultPosition, wxDefaultSize);
|
|
|
|
|
wxPanel* const DisplayPage = new wxPanel(Notebook, ID_DISPLAYPAGE, wxDefaultPosition, wxDefaultSize);
|
|
|
|
|
wxPanel* const AudioPage = new wxPanel(Notebook, ID_AUDIOPAGE, wxDefaultPosition, wxDefaultSize);
|
|
|
|
|
wxPanel* const GamecubePage = new wxPanel(Notebook, ID_GAMECUBEPAGE, wxDefaultPosition, wxDefaultSize);
|
|
|
|
|
wxPanel* const WiiPage = new wxPanel(Notebook, ID_WIIPAGE, wxDefaultPosition, wxDefaultSize);
|
|
|
|
|
wxPanel* const PathsPage = new wxPanel(Notebook, ID_PATHSPAGE, wxDefaultPosition, wxDefaultSize);
|
|
|
|
|
|
|
|
|
|
Notebook->AddPage(GeneralPage, _("General"));
|
|
|
|
|
Notebook->AddPage(DisplayPage, _("Display"));
|
|
|
|
@ -588,30 +513,19 @@ void CConfigMain::CreateGUIControls()
|
|
|
|
|
|
|
|
|
|
// General page
|
|
|
|
|
// Core Settings - Basic
|
|
|
|
|
wxStaticBoxSizer *sbBasic =
|
|
|
|
|
new wxStaticBoxSizer(wxVERTICAL, GeneralPage, _("Basic Settings"));
|
|
|
|
|
CPUThread = new wxCheckBox(GeneralPage, ID_CPUTHREAD, _("Enable Dual Core (speedup)"),
|
|
|
|
|
wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
SkipIdle = new wxCheckBox(GeneralPage, ID_IDLESKIP, _("Enable Idle Skipping (speedup)"),
|
|
|
|
|
wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
EnableCheats = new wxCheckBox(GeneralPage, ID_ENABLECHEATS, _("Enable Cheats"),
|
|
|
|
|
wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
wxStaticBoxSizer* const sbBasic = new wxStaticBoxSizer(wxVERTICAL, GeneralPage, _("Basic Settings"));
|
|
|
|
|
CPUThread = new wxCheckBox(GeneralPage, ID_CPUTHREAD, _("Enable Dual Core (speedup)"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
SkipIdle = new wxCheckBox(GeneralPage, ID_IDLESKIP, _("Enable Idle Skipping (speedup)"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
EnableCheats = new wxCheckBox(GeneralPage, ID_ENABLECHEATS, _("Enable Cheats"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
// Framelimit
|
|
|
|
|
Framelimit = new wxChoice(GeneralPage, ID_FRAMELIMIT, wxDefaultPosition, wxDefaultSize,
|
|
|
|
|
arrayStringFor_Framelimit, 0, wxDefaultValidator);
|
|
|
|
|
UseFPSForLimiting = new wxCheckBox(GeneralPage, ID_FRAMELIMIT_USEFPSFORLIMITING,
|
|
|
|
|
_("Use FPS For Limiting"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
Framelimit = new wxChoice(GeneralPage, ID_FRAMELIMIT, wxDefaultPosition, wxDefaultSize, arrayStringFor_Framelimit, 0, wxDefaultValidator);
|
|
|
|
|
UseFPSForLimiting = new wxCheckBox(GeneralPage, ID_FRAMELIMIT_USEFPSFORLIMITING, _("Use FPS For Limiting"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
// Core Settings - Advanced
|
|
|
|
|
wxStaticBoxSizer *sbAdvanced =
|
|
|
|
|
new wxStaticBoxSizer(wxVERTICAL, GeneralPage, _("Advanced Settings"));
|
|
|
|
|
AlwaysHLE_BS2 = new wxCheckBox(GeneralPage, ID_ALWAYS_HLE_BS2, _("Skip GC BIOS"),
|
|
|
|
|
wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
CPUEngine = new wxRadioBox(GeneralPage, ID_CPUENGINE, _("CPU Emulator Engine"),
|
|
|
|
|
wxDefaultPosition, wxDefaultSize, arrayStringFor_CPUEngine, 0, wxRA_SPECIFY_ROWS);
|
|
|
|
|
LockThreads = new wxCheckBox(GeneralPage, ID_LOCKTHREADS, _("Lock threads to cores"),
|
|
|
|
|
wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
DSPThread = new wxCheckBox(GeneralPage, ID_DSPTHREAD, _("DSPLLE on thread"),
|
|
|
|
|
wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
wxStaticBoxSizer* const sbAdvanced = new wxStaticBoxSizer(wxVERTICAL, GeneralPage, _("Advanced Settings"));
|
|
|
|
|
AlwaysHLE_BS2 = new wxCheckBox(GeneralPage, ID_ALWAYS_HLE_BS2, _("Skip GC BIOS"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
CPUEngine = new wxRadioBox(GeneralPage, ID_CPUENGINE, _("CPU Emulator Engine"), wxDefaultPosition, wxDefaultSize, arrayStringFor_CPUEngine, 0, wxRA_SPECIFY_ROWS);
|
|
|
|
|
LockThreads = new wxCheckBox(GeneralPage, ID_LOCKTHREADS, _("Lock threads to cores"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
DSPThread = new wxCheckBox(GeneralPage, ID_DSPTHREAD, _("DSPLLE on thread"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
|
|
|
|
|
// Populate the General settings
|
|
|
|
|
sbBasic->Add(CPUThread, 0, wxALL, 5);
|
|
|
|
@ -628,73 +542,57 @@ void CConfigMain::CreateGUIControls()
|
|
|
|
|
sbAdvanced->Add(LockThreads, 0, wxALL, 5);
|
|
|
|
|
sbAdvanced->Add(DSPThread, 0, wxALL, 5);
|
|
|
|
|
|
|
|
|
|
wxBoxSizer *sGeneralPage = new wxBoxSizer(wxVERTICAL);
|
|
|
|
|
wxBoxSizer* const sGeneralPage = new wxBoxSizer(wxVERTICAL);
|
|
|
|
|
sGeneralPage->Add(sbBasic, 0, wxEXPAND | wxALL, 5);
|
|
|
|
|
sGeneralPage->Add(sbAdvanced, 0, wxEXPAND | wxALL, 5);
|
|
|
|
|
GeneralPage->SetSizer(sGeneralPage);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// General display settings
|
|
|
|
|
sbDisplay = new wxStaticBoxSizer(wxVERTICAL, DisplayPage, _("Emulator Display Settings"));
|
|
|
|
|
FullscreenResolution = new wxChoice(DisplayPage, ID_DISPLAY_FULLSCREENRES,
|
|
|
|
|
wxDefaultPosition, wxDefaultSize, arrayStringFor_FullscreenResolution,
|
|
|
|
|
0, wxDefaultValidator, arrayStringFor_FullscreenResolution[0]);
|
|
|
|
|
WindowWidth = new wxSpinCtrl(DisplayPage, ID_DISPLAY_WINDOWWIDTH, wxEmptyString,
|
|
|
|
|
wxDefaultPosition, wxSize(70, -1));
|
|
|
|
|
FullscreenResolution = new wxChoice(DisplayPage, ID_DISPLAY_FULLSCREENRES, wxDefaultPosition, wxDefaultSize, arrayStringFor_FullscreenResolution, 0, wxDefaultValidator, arrayStringFor_FullscreenResolution[0]);
|
|
|
|
|
WindowWidth = new wxSpinCtrl(DisplayPage, ID_DISPLAY_WINDOWWIDTH, wxEmptyString, wxDefaultPosition, wxSize(70, -1));
|
|
|
|
|
WindowWidth->SetRange(0,3280);
|
|
|
|
|
WindowHeight = new wxSpinCtrl(DisplayPage, ID_DISPLAY_WINDOWHEIGHT,
|
|
|
|
|
wxEmptyString, wxDefaultPosition, wxSize(70, -1));
|
|
|
|
|
WindowHeight = new wxSpinCtrl(DisplayPage, ID_DISPLAY_WINDOWHEIGHT, wxEmptyString, wxDefaultPosition, wxSize(70, -1));
|
|
|
|
|
WindowHeight->SetRange(0,2048);
|
|
|
|
|
WindowAutoSize = new wxCheckBox(DisplayPage, ID_DISPLAY_AUTOSIZE, _("Auto"),
|
|
|
|
|
wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
Fullscreen = new wxCheckBox(DisplayPage, ID_DISPLAY_FULLSCREEN,
|
|
|
|
|
_("Start Renderer in Fullscreen"), wxDefaultPosition, wxDefaultSize,
|
|
|
|
|
0, wxDefaultValidator);
|
|
|
|
|
WindowAutoSize = new wxCheckBox(DisplayPage, ID_DISPLAY_AUTOSIZE, _("Auto"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
Fullscreen = new wxCheckBox(DisplayPage, ID_DISPLAY_FULLSCREEN, _("Start Renderer in Fullscreen"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
HideCursor = new wxCheckBox(DisplayPage, ID_DISPLAY_HIDECURSOR, _("Hide Mouse Cursor"));
|
|
|
|
|
RenderToMain = new wxCheckBox(DisplayPage, ID_DISPLAY_RENDERTOMAIN,
|
|
|
|
|
_("Render to Main Window"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
ProgressiveScan = new wxCheckBox(DisplayPage, ID_DISPLAY_PROGSCAN,
|
|
|
|
|
_("Enable Progressive Scan"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
NTSCJ = new wxCheckBox(DisplayPage, ID_DISPLAY_NTSCJ, _("Set Console as NTSC-J"),
|
|
|
|
|
wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
|
|
|
|
|
#if defined _WIN32 || defined __linux__
|
|
|
|
|
// GFX Plugin Selection
|
|
|
|
|
GraphicSelection = new wxChoice(DisplayPage, ID_GRAPHIC_CB,
|
|
|
|
|
wxDefaultPosition, wxDefaultSize, 0, NULL, 0, wxDefaultValidator);
|
|
|
|
|
GraphicConfig = new wxButton(DisplayPage, ID_GRAPHIC_CONFIG, _("Config..."),
|
|
|
|
|
wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
#endif
|
|
|
|
|
RenderToMain = new wxCheckBox(DisplayPage, ID_DISPLAY_RENDERTOMAIN, _("Render to Main Window"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
ProgressiveScan = new wxCheckBox(DisplayPage, ID_DISPLAY_PROGSCAN, _("Enable Progressive Scan"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
NTSCJ = new wxCheckBox(DisplayPage, ID_DISPLAY_NTSCJ, _("Set Console as NTSC-J"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
|
|
|
|
|
// Interface Language
|
|
|
|
|
// TODO : Do these really belong to the display page?
|
|
|
|
|
InterfaceLang = new wxChoice(DisplayPage, ID_INTERFACE_LANG, wxDefaultPosition,
|
|
|
|
|
wxDefaultSize, arrayStringFor_InterfaceLang, 0, wxDefaultValidator);
|
|
|
|
|
InterfaceLang = new wxChoice(DisplayPage, ID_INTERFACE_LANG, wxDefaultPosition, wxDefaultSize, arrayStringFor_InterfaceLang, 0, wxDefaultValidator);
|
|
|
|
|
// Hotkey configuration
|
|
|
|
|
HotkeyConfig = new wxButton(DisplayPage, ID_HOTKEY_CONFIG, _("Hotkeys"),
|
|
|
|
|
wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, wxDefaultValidator);
|
|
|
|
|
// TODO : doesn't really belong to the display page, heh.
|
|
|
|
|
HotkeyConfig = new wxButton(DisplayPage, ID_HOTKEY_CONFIG, _("Hotkeys"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, wxDefaultValidator);
|
|
|
|
|
// Themes - this should really be a wxChoice...
|
|
|
|
|
Theme = new wxRadioBox(DisplayPage, ID_INTERFACE_THEME, _("Theme"),
|
|
|
|
|
wxDefaultPosition, wxDefaultSize, arrayStringFor_Themes, 1, wxRA_SPECIFY_ROWS);
|
|
|
|
|
Theme = new wxRadioBox(DisplayPage, ID_INTERFACE_THEME, _("Theme"), wxDefaultPosition, wxDefaultSize, arrayStringFor_Themes, 1, wxRA_SPECIFY_ROWS);
|
|
|
|
|
// Interface settings
|
|
|
|
|
sbInterface = new wxStaticBoxSizer(wxVERTICAL, DisplayPage, _("Interface Settings"));
|
|
|
|
|
ConfirmStop = new wxCheckBox(DisplayPage, ID_INTERFACE_CONFIRMSTOP, _("Confirm On Stop"),
|
|
|
|
|
wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
UsePanicHandlers = new wxCheckBox(DisplayPage, ID_INTERFACE_USEPANICHANDLERS,
|
|
|
|
|
_("Use Panic Handlers"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
ConfirmStop = new wxCheckBox(DisplayPage, ID_INTERFACE_CONFIRMSTOP, _("Confirm On Stop"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
UsePanicHandlers = new wxCheckBox(DisplayPage, ID_INTERFACE_USEPANICHANDLERS, _("Use Panic Handlers"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
|
|
|
|
|
// Populate the Display page
|
|
|
|
|
wxBoxSizer* sDisplayRes = new wxBoxSizer(wxHORIZONTAL);
|
|
|
|
|
sDisplayRes->Add(TEXT_BOX(DisplayPage, _("Fullscreen Display Resolution:")),
|
|
|
|
|
0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
|
|
|
|
sDisplayRes->Add(FullscreenResolution, 0, wxEXPAND | wxALL, 5);
|
|
|
|
|
0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 5);
|
|
|
|
|
sDisplayRes->Add(FullscreenResolution, 0, wxEXPAND, 5);
|
|
|
|
|
sbDisplay->Add(sDisplayRes, 0, wxALL, 5);
|
|
|
|
|
|
|
|
|
|
// backend
|
|
|
|
|
wxBoxSizer* svidbackend = new wxBoxSizer(wxHORIZONTAL);
|
|
|
|
|
svidbackend->Add(TEXT_BOX(DisplayPage, _("Video Backend:")), 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 5);
|
|
|
|
|
GraphicSelection = new wxChoice(DisplayPage, ID_GRAPHIC_CB, wxDefaultPosition, wxDefaultSize, 0, NULL, 0, wxDefaultValidator);
|
|
|
|
|
svidbackend->Add(GraphicSelection, 0, wxALIGN_CENTER_VERTICAL, 5);
|
|
|
|
|
sbDisplay->Add(svidbackend, 0, wxLEFT, 5);
|
|
|
|
|
|
|
|
|
|
wxBoxSizer* sDisplaySize = new wxBoxSizer(wxHORIZONTAL);
|
|
|
|
|
sDisplaySize->Add(TEXT_BOX(DisplayPage, _("Window Size:")), 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
|
|
|
|
sDisplaySize->Add(WindowWidth, 0, wxEXPAND | wxALL, 5);
|
|
|
|
|
sDisplaySize->Add(TEXT_BOX(DisplayPage, wxT("x")), 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
|
|
|
|
sDisplaySize->Add(WindowHeight, 0, wxEXPAND | wxALL, 5);
|
|
|
|
|
sDisplaySize->Add(WindowAutoSize, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
|
|
|
|
sDisplaySize->Add(TEXT_BOX(DisplayPage, _("Window Size:")), 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 5);
|
|
|
|
|
sDisplaySize->Add(WindowWidth, 0, wxEXPAND | wxRIGHT, 5);
|
|
|
|
|
sDisplaySize->Add(TEXT_BOX(DisplayPage, wxT("x")), 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 5);
|
|
|
|
|
sDisplaySize->Add(WindowHeight, 0, wxEXPAND | wxRIGHT, 5);
|
|
|
|
|
sDisplaySize->Add(WindowAutoSize, 0, wxALIGN_CENTER_VERTICAL, 5);
|
|
|
|
|
sbDisplay->Add(sDisplaySize, 0, wxALL, 5);
|
|
|
|
|
sbDisplay->Add(Fullscreen, 0, wxEXPAND | wxALL, 5);
|
|
|
|
|
sbDisplay->Add(HideCursor, 0, wxALL, 5);
|
|
|
|
@ -702,13 +600,6 @@ void CConfigMain::CreateGUIControls()
|
|
|
|
|
sbDisplay->Add(ProgressiveScan, 0, wxEXPAND | wxALL, 5);
|
|
|
|
|
sbDisplay->Add(NTSCJ, 0, wxEXPAND | wxALL, 5);
|
|
|
|
|
|
|
|
|
|
#if defined _WIN32 || defined __linux__
|
|
|
|
|
wxStaticBoxSizer *sbGraphicsPlugin =
|
|
|
|
|
new wxStaticBoxSizer(wxHORIZONTAL, DisplayPage, _("Graphics Plugin"));
|
|
|
|
|
sbGraphicsPlugin->Add(GraphicSelection, 1, wxEXPAND|wxALL, 5);
|
|
|
|
|
sbGraphicsPlugin->Add(GraphicConfig, 0, wxALL, 5);
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
sbInterface->Add(ConfirmStop, 0, wxALL, 5);
|
|
|
|
|
sbInterface->Add(UsePanicHandlers, 0, wxALL, 5);
|
|
|
|
|
sbInterface->Add(Theme, 0, wxEXPAND | wxALL, 5);
|
|
|
|
@ -721,26 +612,17 @@ void CConfigMain::CreateGUIControls()
|
|
|
|
|
|
|
|
|
|
sDisplayPage = new wxBoxSizer(wxVERTICAL);
|
|
|
|
|
sDisplayPage->Add(sbDisplay, 0, wxEXPAND | wxALL, 5);
|
|
|
|
|
#if defined _WIN32 || defined __linux__
|
|
|
|
|
sDisplayPage->Add(sbGraphicsPlugin, 0, wxEXPAND | wxALL, 5);
|
|
|
|
|
#endif
|
|
|
|
|
sDisplayPage->Add(sbInterface, 0, wxEXPAND | wxALL, 5);
|
|
|
|
|
DisplayPage->SetSizer(sDisplayPage);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Audio page
|
|
|
|
|
DSPEngine = new wxRadioBox(AudioPage, ID_DSPENGINE, _("DSP Emulator Engine"),
|
|
|
|
|
wxDefaultPosition, wxDefaultSize, arrayStringFor_DSPEngine, 0, wxRA_SPECIFY_ROWS);
|
|
|
|
|
EnableDTKMusic = new wxCheckBox(AudioPage, ID_ENABLE_DTK_MUSIC, _("Enable DTK Music"),
|
|
|
|
|
wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
EnableThrottle = new wxCheckBox(AudioPage, ID_ENABLE_THROTTLE, _("Enable Audio Throttle"),
|
|
|
|
|
wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
VolumeSlider = new wxSlider(AudioPage, ID_VOLUME, 0, 1, 100,
|
|
|
|
|
wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL|wxSL_INVERSE);
|
|
|
|
|
VolumeText = new wxStaticText(AudioPage, wxID_ANY, wxT(""),
|
|
|
|
|
wxDefaultPosition, wxDefaultSize, 0);
|
|
|
|
|
BackendSelection = new wxChoice(AudioPage, ID_BACKEND, wxDefaultPosition,
|
|
|
|
|
wxDefaultSize, wxArrayBackends, 0, wxDefaultValidator, wxEmptyString);
|
|
|
|
|
DSPEngine = new wxRadioBox(AudioPage, ID_DSPENGINE, _("DSP Emulator Engine"), wxDefaultPosition, wxDefaultSize, arrayStringFor_DSPEngine, 0, wxRA_SPECIFY_ROWS);
|
|
|
|
|
EnableDTKMusic = new wxCheckBox(AudioPage, ID_ENABLE_DTK_MUSIC, _("Enable DTK Music"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
EnableThrottle = new wxCheckBox(AudioPage, ID_ENABLE_THROTTLE, _("Enable Audio Throttle"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
VolumeSlider = new wxSlider(AudioPage, ID_VOLUME, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL|wxSL_INVERSE);
|
|
|
|
|
VolumeText = new wxStaticText(AudioPage, wxID_ANY, wxT(""), wxDefaultPosition, wxDefaultSize, 0);
|
|
|
|
|
BackendSelection = new wxChoice(AudioPage, ID_BACKEND, wxDefaultPosition, wxDefaultSize, wxArrayBackends, 0, wxDefaultValidator, wxEmptyString);
|
|
|
|
|
FrequencySelection = new wxChoice(AudioPage, ID_FREQUENCY);
|
|
|
|
|
FrequencySelection->Append(_("48,000 Hz"));
|
|
|
|
|
FrequencySelection->Append(_("32,000 Hz"));
|
|
|
|
@ -775,26 +657,66 @@ void CConfigMain::CreateGUIControls()
|
|
|
|
|
AudioPage->SetSizerAndFit(sAudioPage);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// TODO : Warning the following code hurts
|
|
|
|
|
// Gamecube page
|
|
|
|
|
// IPL settings
|
|
|
|
|
sbGamecubeIPLSettings = new wxStaticBoxSizer(wxVERTICAL, GamecubePage, _("IPL Settings"));
|
|
|
|
|
GCSystemLang = new wxChoice(GamecubePage, ID_GC_SRAM_LNG, wxDefaultPosition,
|
|
|
|
|
wxDefaultSize, arrayStringFor_GCSystemLang, 0, wxDefaultValidator);
|
|
|
|
|
GCSystemLang = new wxChoice(GamecubePage, ID_GC_SRAM_LNG, wxDefaultPosition, wxDefaultSize, arrayStringFor_GCSystemLang, 0, wxDefaultValidator);
|
|
|
|
|
// Device settings
|
|
|
|
|
// EXI Devices
|
|
|
|
|
wxStaticBoxSizer *sbGamecubeDeviceSettings =
|
|
|
|
|
new wxStaticBoxSizer(wxVERTICAL, GamecubePage, _("Device Settings"));
|
|
|
|
|
wxStaticBoxSizer *sbGamecubeDeviceSettings = new wxStaticBoxSizer(wxVERTICAL, GamecubePage, _("Device Settings"));
|
|
|
|
|
wxStaticText* GCEXIDeviceText[3];
|
|
|
|
|
GCEXIDeviceText[0] = TEXT_BOX(GamecubePage, _("Slot A"));
|
|
|
|
|
GCEXIDeviceText[1] = TEXT_BOX(GamecubePage, _("Slot B"));
|
|
|
|
|
GCEXIDeviceText[2] = TEXT_BOX(GamecubePage, wxT("SP1 "));
|
|
|
|
|
GCEXIDevice[0] = new wxChoice(GamecubePage, ID_GC_EXIDEVICE_SLOTA);
|
|
|
|
|
GCEXIDevice[1] = new wxChoice(GamecubePage, ID_GC_EXIDEVICE_SLOTB);
|
|
|
|
|
GCEXIDevice[2] = new wxChoice(GamecubePage, ID_GC_EXIDEVICE_SP1);
|
|
|
|
|
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);
|
|
|
|
|
const wxString SlotDevices[] = {_(DEV_NONE_STR), _(DEV_DUMMY_STR), _(EXIDEV_MEMCARD_STR), _(EXIDEV_GECKO_STR)
|
|
|
|
|
#if HAVE_PORTAUDIO
|
|
|
|
|
, _(EXIDEV_MIC_STR)
|
|
|
|
|
#endif
|
|
|
|
|
};
|
|
|
|
|
static const int numSlotDevices = sizeof(SlotDevices)/sizeof(wxString);
|
|
|
|
|
const wxString SP1Devices[] = { _(DEV_NONE_STR), _(DEV_DUMMY_STR), _(EXIDEV_BBA_STR), _(EXIDEV_AM_BB_STR) };
|
|
|
|
|
static const int numSP1Devices = sizeof(SP1Devices)/sizeof(wxString);
|
|
|
|
|
GCEXIDevice[0] = new wxChoice(GamecubePage, ID_GC_EXIDEVICE_SLOTA, wxDefaultPosition, wxDefaultSize, numSlotDevices, SlotDevices, 0, wxDefaultValidator);
|
|
|
|
|
GCEXIDevice[1] = new wxChoice(GamecubePage, ID_GC_EXIDEVICE_SLOTB, wxDefaultPosition, wxDefaultSize, numSlotDevices, SlotDevices, 0, wxDefaultValidator);
|
|
|
|
|
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,
|
|
|
|
|
// TODO : lies, wxArrayString + wxChoice->Create.
|
|
|
|
|
for (int i = 0; i < 3; ++i)
|
|
|
|
|
{
|
|
|
|
|
bool isMemcard = false;
|
|
|
|
|
switch (SConfig::GetInstance().m_EXIDevice[i])
|
|
|
|
|
{
|
|
|
|
|
case EXIDEVICE_NONE:
|
|
|
|
|
GCEXIDevice[i]->SetStringSelection(SlotDevices[0]);
|
|
|
|
|
break;
|
|
|
|
|
case EXIDEVICE_MEMORYCARD_A:
|
|
|
|
|
case EXIDEVICE_MEMORYCARD_B:
|
|
|
|
|
isMemcard = GCEXIDevice[i]->SetStringSelection(SlotDevices[2]);
|
|
|
|
|
break;
|
|
|
|
|
case EXIDEVICE_MIC:
|
|
|
|
|
GCEXIDevice[i]->SetStringSelection(SlotDevices[4]);
|
|
|
|
|
break;
|
|
|
|
|
case EXIDEVICE_ETH:
|
|
|
|
|
GCEXIDevice[i]->SetStringSelection(SP1Devices[2]);
|
|
|
|
|
break;
|
|
|
|
|
case EXIDEVICE_AM_BASEBOARD:
|
|
|
|
|
GCEXIDevice[i]->SetStringSelection(SP1Devices[3]);
|
|
|
|
|
break;
|
|
|
|
|
case EXIDEVICE_GECKO:
|
|
|
|
|
GCEXIDevice[i]->SetStringSelection(SlotDevices[3]);
|
|
|
|
|
break;
|
|
|
|
|
case EXIDEVICE_DUMMY:
|
|
|
|
|
default:
|
|
|
|
|
GCEXIDevice[i]->SetStringSelection(SlotDevices[1]);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
if (!isMemcard && i < 2)
|
|
|
|
|
GCMemcardPath[i]->Disable();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//SI Devices
|
|
|
|
|
wxStaticText* GCSIDeviceText[4];
|
|
|
|
@ -802,11 +724,33 @@ void CConfigMain::CreateGUIControls()
|
|
|
|
|
GCSIDeviceText[1] = TEXT_BOX(GamecubePage, _("Port 2"));
|
|
|
|
|
GCSIDeviceText[2] = TEXT_BOX(GamecubePage, _("Port 3"));
|
|
|
|
|
GCSIDeviceText[3] = TEXT_BOX(GamecubePage, _("Port 4"));
|
|
|
|
|
GCSIDevice[0] = new wxChoice(GamecubePage, ID_GC_SIDEVICE0);
|
|
|
|
|
GCSIDevice[1] = new wxChoice(GamecubePage, ID_GC_SIDEVICE1);
|
|
|
|
|
GCSIDevice[2] = new wxChoice(GamecubePage, ID_GC_SIDEVICE2);
|
|
|
|
|
GCSIDevice[3] = new wxChoice(GamecubePage, ID_GC_SIDEVICE3);
|
|
|
|
|
|
|
|
|
|
// SIDEV_AM_BB_STR must be last!
|
|
|
|
|
const wxString SIDevices[] = {_(DEV_NONE_STR),_(SIDEV_STDCONT_STR),_(SIDEV_GBA_STR),_(SIDEV_AM_BB_STR)};
|
|
|
|
|
static const int numSIDevices = sizeof(SIDevices)/sizeof(wxString);
|
|
|
|
|
GCSIDevice[0] = new wxChoice(GamecubePage, ID_GC_SIDEVICE0, wxDefaultPosition, wxDefaultSize, numSIDevices, SIDevices, 0, wxDefaultValidator);
|
|
|
|
|
GCSIDevice[1] = new wxChoice(GamecubePage, ID_GC_SIDEVICE1, wxDefaultPosition, wxDefaultSize, numSIDevices - 1, SIDevices, 0, wxDefaultValidator);
|
|
|
|
|
GCSIDevice[2] = new wxChoice(GamecubePage, ID_GC_SIDEVICE2, wxDefaultPosition, wxDefaultSize, numSIDevices - 1, SIDevices, 0, wxDefaultValidator);
|
|
|
|
|
GCSIDevice[3] = new wxChoice(GamecubePage, ID_GC_SIDEVICE3, wxDefaultPosition, wxDefaultSize, numSIDevices - 1, 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])
|
|
|
|
|
{
|
|
|
|
|
case SI_GC_CONTROLLER:
|
|
|
|
|
GCSIDevice[i]->SetStringSelection(SIDevices[1]);
|
|
|
|
|
break;
|
|
|
|
|
case SI_GBA:
|
|
|
|
|
GCSIDevice[i]->SetStringSelection(SIDevices[2]);
|
|
|
|
|
break;
|
|
|
|
|
case SI_AM_BASEBOARD:
|
|
|
|
|
GCSIDevice[i]->SetStringSelection(SIDevices[3]);
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
GCSIDevice[i]->SetStringSelection(SIDevices[0]);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Populate the Gamecube page
|
|
|
|
|
sGamecubeIPLSettings = new wxGridBagSizer();
|
|
|
|
@ -840,30 +784,21 @@ void CConfigMain::CreateGUIControls()
|
|
|
|
|
// Wii page
|
|
|
|
|
// Wiimote Settings
|
|
|
|
|
sbWiimoteSettings = new wxStaticBoxSizer(wxHORIZONTAL, WiiPage, _("Wiimote Settings"));
|
|
|
|
|
WiiSensBarPos = new wxChoice(WiiPage, ID_WII_BT_BAR, wxDefaultPosition,
|
|
|
|
|
wxDefaultSize, arrayStringFor_WiiSensBarPos, 0, wxDefaultValidator);
|
|
|
|
|
WiiSensBarPos = new wxChoice(WiiPage, ID_WII_BT_BAR, wxDefaultPosition, wxDefaultSize, arrayStringFor_WiiSensBarPos, 0, wxDefaultValidator);
|
|
|
|
|
WiiSensBarSens = new wxSlider(WiiPage, ID_WII_BT_SENS, 0, 0, 4);
|
|
|
|
|
WiimoteMotor = new wxCheckBox(WiiPage, ID_WII_BT_MOT, _("Wiimote Motor"),
|
|
|
|
|
wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
WiimoteMotor = new wxCheckBox(WiiPage, ID_WII_BT_MOT, _("Wiimote Motor"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
|
|
|
|
|
// Misc Settings
|
|
|
|
|
sbWiiIPLSettings = new wxStaticBoxSizer(wxVERTICAL, WiiPage, _("Misc Settings"));
|
|
|
|
|
WiiScreenSaver = new wxCheckBox(WiiPage, ID_WII_IPL_SSV,
|
|
|
|
|
_("Enable Screen Saver (burn-in reduction)"),
|
|
|
|
|
wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
WiiEuRGB60 = new wxCheckBox(WiiPage, ID_WII_IPL_E60, _("Use EuRGB60 Mode (PAL60)"),
|
|
|
|
|
wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
WiiAspectRatio = new wxChoice(WiiPage, ID_WII_IPL_AR, wxDefaultPosition,
|
|
|
|
|
wxDefaultSize, arrayStringFor_WiiAspectRatio, 0, wxDefaultValidator);
|
|
|
|
|
WiiSystemLang = new wxChoice(WiiPage, ID_WII_IPL_LNG, wxDefaultPosition,
|
|
|
|
|
wxDefaultSize, arrayStringFor_WiiSystemLang, 0, wxDefaultValidator);
|
|
|
|
|
WiiScreenSaver = new wxCheckBox(WiiPage, ID_WII_IPL_SSV, _("Enable Screen Saver (burn-in reduction)"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
WiiEuRGB60 = new wxCheckBox(WiiPage, ID_WII_IPL_E60, _("Use EuRGB60 Mode (PAL60)"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
WiiAspectRatio = new wxChoice(WiiPage, ID_WII_IPL_AR, wxDefaultPosition, wxDefaultSize, arrayStringFor_WiiAspectRatio, 0, wxDefaultValidator);
|
|
|
|
|
WiiSystemLang = new wxChoice(WiiPage, ID_WII_IPL_LNG, wxDefaultPosition, wxDefaultSize, arrayStringFor_WiiSystemLang, 0, wxDefaultValidator);
|
|
|
|
|
|
|
|
|
|
// Device Settings
|
|
|
|
|
sbWiiDeviceSettings = new wxStaticBoxSizer(wxVERTICAL, WiiPage, _("Device Settings"));
|
|
|
|
|
WiiSDCard = new wxCheckBox(WiiPage, ID_WII_SD_CARD, _("Insert SD Card"),
|
|
|
|
|
wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
WiiKeyboard = new wxCheckBox(WiiPage, ID_WII_KEYBOARD, _("Connect USB Keyboard"),
|
|
|
|
|
wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
WiiSDCard = new wxCheckBox(WiiPage, ID_WII_SD_CARD, _("Insert SD Card"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
WiiKeyboard = new wxCheckBox(WiiPage, ID_WII_KEYBOARD, _("Connect USB Keyboard"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
|
|
|
|
|
// Populate the Wii Page
|
|
|
|
|
sWiimoteSettings = new wxGridBagSizer();
|
|
|
|
@ -899,27 +834,19 @@ void CConfigMain::CreateGUIControls()
|
|
|
|
|
|
|
|
|
|
// Paths page
|
|
|
|
|
sbISOPaths = new wxStaticBoxSizer(wxVERTICAL, PathsPage, _("ISO Directories"));
|
|
|
|
|
ISOPaths = new wxListBox(PathsPage, ID_ISOPATHS, wxDefaultPosition,
|
|
|
|
|
wxDefaultSize, arrayStringFor_ISOPaths, wxLB_SINGLE, wxDefaultValidator);
|
|
|
|
|
RecursiveISOPath = new wxCheckBox(PathsPage, ID_RECURSIVEISOPATH, _("Search Subfolders"),
|
|
|
|
|
wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
AddISOPath = new wxButton(PathsPage, ID_ADDISOPATH, _("Add..."),
|
|
|
|
|
wxDefaultPosition, wxDefaultSize, 0);
|
|
|
|
|
RemoveISOPath = new wxButton(PathsPage, ID_REMOVEISOPATH, _("Remove"),
|
|
|
|
|
wxDefaultPosition, wxDefaultSize, 0);
|
|
|
|
|
ISOPaths = new wxListBox(PathsPage, ID_ISOPATHS, wxDefaultPosition, wxDefaultSize, arrayStringFor_ISOPaths, wxLB_SINGLE, wxDefaultValidator);
|
|
|
|
|
RecursiveISOPath = new wxCheckBox(PathsPage, ID_RECURSIVEISOPATH, _("Search Subfolders"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
AddISOPath = new wxButton(PathsPage, ID_ADDISOPATH, _("Add..."), wxDefaultPosition, wxDefaultSize, 0);
|
|
|
|
|
RemoveISOPath = new wxButton(PathsPage, ID_REMOVEISOPATH, _("Remove"), wxDefaultPosition, wxDefaultSize, 0);
|
|
|
|
|
RemoveISOPath->Enable(false);
|
|
|
|
|
|
|
|
|
|
DefaultISO = new wxFilePickerCtrl(PathsPage, ID_DEFAULTISO, wxEmptyString,
|
|
|
|
|
_("Choose a default ISO:"),
|
|
|
|
|
_("All GC/Wii images (gcm, iso, ciso, gcz)") + wxString::Format(wxT("|*.gcm;*.iso;*.ciso;*.gcz|%s"),
|
|
|
|
|
wxGetTranslation(wxALL_FILES)),
|
|
|
|
|
wxDefaultPosition, wxDefaultSize, wxFLP_USE_TEXTCTRL|wxFLP_OPEN);
|
|
|
|
|
DVDRoot = new wxDirPickerCtrl(PathsPage, ID_DVDROOT, wxEmptyString,
|
|
|
|
|
_("Choose a DVD root directory:"), wxDefaultPosition, wxDefaultSize, wxDIRP_USE_TEXTCTRL);
|
|
|
|
|
ApploaderPath = new wxFilePickerCtrl(PathsPage, ID_APPLOADERPATH, wxEmptyString,
|
|
|
|
|
_("Choose file to use as apploader: (applies to discs constructed from directories only)"),
|
|
|
|
|
_("apploader (.img)") + wxString::Format(wxT("|*.img|%s"), wxGetTranslation(wxALL_FILES)),
|
|
|
|
|
wxDefaultPosition, wxDefaultSize, wxFLP_USE_TEXTCTRL|wxFLP_OPEN);
|
|
|
|
|
DefaultISO = new wxFilePickerCtrl(PathsPage, ID_DEFAULTISO, wxEmptyString, _("Choose a default ISO:"),
|
|
|
|
|
_("All GC/Wii images (gcm, iso, ciso, gcz)") + wxString::Format(wxT("|*.gcm;*.iso;*.ciso;*.gcz|%s"), wxGetTranslation(wxALL_FILES)),
|
|
|
|
|
wxDefaultPosition, wxDefaultSize, wxFLP_USE_TEXTCTRL|wxFLP_OPEN);
|
|
|
|
|
DVDRoot = new wxDirPickerCtrl(PathsPage, ID_DVDROOT, wxEmptyString, _("Choose a DVD root directory:"), wxDefaultPosition, wxDefaultSize, wxDIRP_USE_TEXTCTRL);
|
|
|
|
|
ApploaderPath = new wxFilePickerCtrl(PathsPage, ID_APPLOADERPATH, wxEmptyString, _("Choose file to use as apploader: (applies to discs constructed from directories only)"),
|
|
|
|
|
_("apploader (.img)") + wxString::Format(wxT("|*.img|%s"), wxGetTranslation(wxALL_FILES)),
|
|
|
|
|
wxDefaultPosition, wxDefaultSize, wxFLP_USE_TEXTCTRL|wxFLP_OPEN);
|
|
|
|
|
|
|
|
|
|
// Populate the settings
|
|
|
|
|
sbISOPaths->Add(ISOPaths, 1, wxEXPAND|wxALL, 0);
|
|
|
|
@ -948,6 +875,25 @@ void CConfigMain::CreateGUIControls()
|
|
|
|
|
sPathsPage->Add(sOtherPaths, 0, wxEXPAND|wxALL, 5);
|
|
|
|
|
PathsPage->SetSizer(sPathsPage);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if defined _WIN32 || defined __linux__
|
|
|
|
|
// Plugins page
|
|
|
|
|
//sbGraphicsPlugin = new wxStaticBoxSizer(wxHORIZONTAL, PluginsPage, _("Graphics"));
|
|
|
|
|
//GraphicSelection = new wxChoice(PluginsPage, ID_GRAPHIC_CB, wxDefaultPosition, wxDefaultSize, 0, NULL, 0, wxDefaultValidator);
|
|
|
|
|
//GraphicConfig = new wxButton(PluginsPage, ID_GRAPHIC_CONFIG, _("Config..."), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
|
|
|
|
|
|
|
|
|
//// Populate the settings
|
|
|
|
|
//sbGraphicsPlugin->Add(GraphicSelection, 1, wxEXPAND|wxALL, 5);
|
|
|
|
|
//sbGraphicsPlugin->Add(GraphicConfig, 0, wxALL, 5);
|
|
|
|
|
|
|
|
|
|
//// Populate the Plugins page
|
|
|
|
|
//sPluginsPage = new wxBoxSizer(wxVERTICAL);
|
|
|
|
|
//sPluginsPage->Add(sbGraphicsPlugin, 0, wxEXPAND|wxALL, 5);
|
|
|
|
|
|
|
|
|
|
//PluginsPage->SetSizer(sPluginsPage);
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
m_Ok = new wxButton(this, wxID_OK);
|
|
|
|
|
|
|
|
|
|
wxBoxSizer* sButtons = new wxBoxSizer(wxHORIZONTAL);
|
|
|
|
@ -1102,13 +1048,14 @@ void CConfigMain::AudioSettingsChanged(wxCommandEvent& event)
|
|
|
|
|
ac_Config.m_EnableJIT = DSPEngine->GetSelection() == 1;
|
|
|
|
|
ac_Config.Update();
|
|
|
|
|
break;
|
|
|
|
|
case ID_BACKEND:
|
|
|
|
|
VolumeSlider->Enable(SupportsVolumeChanges(std::string(BackendSelection->GetStringSelection().mb_str())));
|
|
|
|
|
break;
|
|
|
|
|
case ID_VOLUME:
|
|
|
|
|
ac_Config.m_Volume = VolumeSlider->GetValue();
|
|
|
|
|
ac_Config.Update();
|
|
|
|
|
VolumeText->SetLabel(wxString::Format(wxT("%d %%"), VolumeSlider->GetValue()));
|
|
|
|
|
break;
|
|
|
|
|
case ID_BACKEND:
|
|
|
|
|
VolumeSlider->Enable(SupportsVolumeChanges(std::string(BackendSelection->GetStringSelection().mb_str())));
|
|
|
|
|
default:
|
|
|
|
|
ac_Config.m_EnableDTKMusic = EnableDTKMusic->GetValue();
|
|
|
|
|
ac_Config.m_EnableThrottle = EnableThrottle->GetValue();
|
|
|
|
@ -1388,88 +1335,16 @@ void CConfigMain::ApploaderPathChanged(wxFileDirPickerEvent& WXUNUSED (event))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Plugin settings
|
|
|
|
|
void CConfigMain::OnSelectionChanged(wxCommandEvent& WXUNUSED (event))
|
|
|
|
|
void CConfigMain::OnSelectionChanged(wxCommandEvent& ev)
|
|
|
|
|
{
|
|
|
|
|
// Update plugin filenames
|
|
|
|
|
if (GetFilename(GraphicSelection, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoPlugin))
|
|
|
|
|
CPluginManager::GetInstance().FreeVideo();
|
|
|
|
|
g_video_backend = g_available_video_backends[ev.GetInt()];
|
|
|
|
|
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoPlugin = g_video_backend->GetName();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CConfigMain::OnConfig(wxCommandEvent& event)
|
|
|
|
|
void CConfigMain::OnConfig(wxCommandEvent&)
|
|
|
|
|
{
|
|
|
|
|
switch (event.GetId())
|
|
|
|
|
{
|
|
|
|
|
case ID_GRAPHIC_CONFIG:
|
|
|
|
|
CallConfig(GraphicSelection);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void CConfigMain::CallConfig(wxChoice* _pChoice)
|
|
|
|
|
{
|
|
|
|
|
int Index = _pChoice->GetSelection();
|
|
|
|
|
INFO_LOG(CONSOLE, "CallConfig: %i\n", Index);
|
|
|
|
|
if (Index >= 0)
|
|
|
|
|
{
|
|
|
|
|
const CPluginInfo* pInfo = static_cast<CPluginInfo*>(_pChoice->GetClientData(Index));
|
|
|
|
|
if (pInfo != NULL)
|
|
|
|
|
{
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
|
// Make sure only one dialog can be opened at a time in Windows,
|
|
|
|
|
// but is unnecessary and looks bad in linux.
|
|
|
|
|
Disable();
|
|
|
|
|
#endif
|
|
|
|
|
CPluginManager::GetInstance().OpenConfig(this,
|
|
|
|
|
pInfo->GetFilename().c_str(), pInfo->GetPluginInfo().Type);
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
|
Enable();
|
|
|
|
|
Raise();
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CConfigMain::FillChoiceBox(wxChoice* _pChoice, int _PluginType, const std::string& _SelectFilename)
|
|
|
|
|
{
|
|
|
|
|
_pChoice->Clear();
|
|
|
|
|
|
|
|
|
|
int Index = -1;
|
|
|
|
|
const CPluginInfos& rInfos = CPluginManager::GetInstance().GetPluginInfos();
|
|
|
|
|
|
|
|
|
|
for (size_t i = 0; i < rInfos.size(); i++)
|
|
|
|
|
{
|
|
|
|
|
const PLUGIN_INFO& rPluginInfo = rInfos[i].GetPluginInfo();
|
|
|
|
|
|
|
|
|
|
if (rPluginInfo.Type == _PluginType)
|
|
|
|
|
{
|
|
|
|
|
wxString temp;
|
|
|
|
|
temp = wxGetTranslation(wxString::FromUTF8(rInfos[i].GetPluginInfo().Name));
|
|
|
|
|
int NewIndex = _pChoice->Append(temp, (void*)&rInfos[i]);
|
|
|
|
|
|
|
|
|
|
if (rInfos[i].GetFilename() == _SelectFilename)
|
|
|
|
|
{
|
|
|
|
|
Index = NewIndex;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_pChoice->Select(Index);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool CConfigMain::GetFilename(wxChoice* _pChoice, std::string& _rFilename)
|
|
|
|
|
{
|
|
|
|
|
_rFilename.clear();
|
|
|
|
|
int Index = _pChoice->GetSelection();
|
|
|
|
|
if (Index >= 0)
|
|
|
|
|
{
|
|
|
|
|
const CPluginInfo* pInfo = static_cast<CPluginInfo*>(_pChoice->GetClientData(Index));
|
|
|
|
|
_rFilename = pInfo->GetFilename();
|
|
|
|
|
INFO_LOG(CONSOLE, "GetFilename: %i %s\n", Index, _rFilename.c_str());
|
|
|
|
|
return(true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return(false);
|
|
|
|
|
if (g_video_backend)
|
|
|
|
|
g_video_backend->ShowConfig(this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Search for avaliable resolutions
|
|
|
|
@ -1537,4 +1412,4 @@ void CConfigMain::AddResolutions()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|