Added support for JIT multithreaded compilation in both CPU and DSP cores this gives up to 78% speedup in some scenarios such as when looking at a corner in Zelda or the menus in Super Puzzle Bobble.

Added SSE optimizations to JIT LLE, up to 136% speedup observed in Resident Evil games.
Rewrote the GUI to make it more user friendly, added a User friendly Setup.
Also Billiard please: learn to merge.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7000 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
sl1nk3.s 2011-01-31 02:38:36 +00:00
parent f1e8da63ec
commit 1ee18ff146
4 changed files with 133 additions and 123 deletions

View File

@ -18,10 +18,12 @@
#include "Common.h" #include "Common.h"
#include "Thread.h" #include "Thread.h"
#include "../PluginDSP.h"
#include "../PowerPC/PowerPC.h" #include "../PowerPC/PowerPC.h"
#include "../Host.h" #include "../Host.h"
#include "../Core.h" #include "../Core.h"
#include "CPU.h" #include "CPU.h"
#include "DSP.h"
#include "VideoBackendBase.h" #include "VideoBackendBase.h"
@ -116,12 +118,14 @@ void CCPU::EnableStepping(const bool _bStepping)
{ {
PowerPC::Pause(); PowerPC::Pause();
g_video_backend->EmuStateChange(PLUGIN_EMUSTATE_PAUSE); g_video_backend->EmuStateChange(PLUGIN_EMUSTATE_PAUSE);
DSP::GetPlugin()->DSP_ClearAudioBuffer(true);
} }
else else
{ {
PowerPC::Start(); PowerPC::Start();
m_StepEvent.Set(); m_StepEvent.Set();
g_video_backend->EmuStateChange(PLUGIN_EMUSTATE_PLAY); g_video_backend->EmuStateChange(PLUGIN_EMUSTATE_PLAY);
DSP::GetPlugin()->DSP_ClearAudioBuffer(false);
} }
} }

View File

@ -29,7 +29,6 @@ public:
virtual void Initialize(void *hWnd, bool bWii, bool bDSPThread); virtual void Initialize(void *hWnd, bool bWii, bool bDSPThread);
virtual void Shutdown(); virtual void Shutdown();
virtual bool IsLLE() { return true; } virtual bool IsLLE() { return true; }
virtual void DoState(PointerWrap &p); virtual void DoState(PointerWrap &p);

View File

@ -19,7 +19,6 @@
#define _PLUGINDSP_H_ #define _PLUGINDSP_H_
#include "PluginSpecs.h" // TODO: Only here for EmuStateChange
#include "ChunkFile.h" #include "ChunkFile.h"
class PluginDSP class PluginDSP

View File

@ -177,7 +177,8 @@ EVT_BUTTON(ID_GRAPHIC_CONFIG, CConfigMain::OnConfig)
END_EVENT_TABLE() 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) : wxDialog(parent, id, title, position, size, style)
{ {
// Control refreshing of the ISOs list // Control refreshing of the ISOs list
@ -224,20 +225,21 @@ void CConfigMain::UpdateGUI()
LockThreads->Disable(); LockThreads->Disable();
DSPThread->Disable(); DSPThread->Disable();
// Disable stuff on DisplayPage // Disable stuff on DisplayPage
FullscreenResolution->Disable(); FullscreenResolution->Disable();
RenderToMain->Disable(); RenderToMain->Disable();
ProgressiveScan->Disable(); ProgressiveScan->Disable();
NTSCJ->Disable(); NTSCJ->Disable();
// Disable graphics plugin selection
GraphicSelection->Disable();
// Disable stuff on AudioPage // Disable stuff on AudioPage
DSPEngine->Disable(); DSPEngine->Disable();
// Disable stuff on GamecubePage // Disable stuff on GamecubePage
GCSystemLang->Disable(); GCSystemLang->Disable();
// Disable stuff on WiiPage // Disable stuff on WiiPage
WiiSensBarPos->Disable(); WiiSensBarPos->Disable();
WiiSensBarSens->Disable(); WiiSensBarSens->Disable();
@ -247,13 +249,8 @@ void CConfigMain::UpdateGUI()
WiiAspectRatio->Disable(); WiiAspectRatio->Disable();
WiiSystemLang->Disable(); WiiSystemLang->Disable();
// Disable stuff on PathsPage // Disable stuff on PathsPage
PathsPage->Disable(); PathsPage->Disable();
// Disable stuff on PluginsPage
GraphicSelection->Disable();
} }
} }
@ -378,7 +375,8 @@ void CConfigMain::InitializeGUIValues()
UsePanicHandlers->SetValue(startup_params.bUsePanicHandlers); UsePanicHandlers->SetValue(startup_params.bUsePanicHandlers);
Theme->SetSelection(startup_params.iTheme); Theme->SetSelection(startup_params.iTheme);
// need redesign // 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) if (langIds[i] == SConfig::GetInstance().m_InterfaceLanguage)
{ {
InterfaceLang->SetSelection(i); InterfaceLang->SetSelection(i);
@ -408,9 +406,90 @@ void CConfigMain::InitializeGUIValues()
GCSystemLang->SetSelection(startup_params.SelectedLanguage); GCSystemLang->SetSelection(startup_params.SelectedLanguage);
// Gamecube - Devices // Gamecube - Devices
// Not here. They use some locals over in CreateGUIControls for initialization, wxArrayString SlotDevices;
// which is why they are still there. 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
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 // Wii - Wiimote
WiiSensBarPos->SetSelection(SConfig::GetInstance().m_SYSCONF->GetData<u8>("BT.BAR")); WiiSensBarPos->SetSelection(SConfig::GetInstance().m_SYSCONF->GetData<u8>("BT.BAR"));
@ -478,7 +557,6 @@ void CConfigMain::InitializeGUITooltips()
// Audio tooltips // Audio tooltips
EnableDTKMusic->SetToolTip(_("This is used to play music tracks, like BGM.")); 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.")); 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!")); 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!")); BackendSelection->SetToolTip(_("Changing this will have no effect while the emulator is running!"));
@ -560,16 +638,22 @@ void CConfigMain::CreateGUIControls()
NTSCJ = new wxCheckBox(DisplayPage, ID_DISPLAY_NTSCJ, _("Set Console as NTSC-J"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator); NTSCJ = new wxCheckBox(DisplayPage, ID_DISPLAY_NTSCJ, _("Set Console as NTSC-J"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
// Interface Language // Interface Language
InterfaceLang = new wxChoice(DisplayPage, ID_INTERFACE_LANG, wxDefaultPosition, wxDefaultSize, arrayStringFor_InterfaceLang, 0, wxDefaultValidator); // TODO : Do these really belong to the display page?
InterfaceLang = new wxChoice(DisplayPage, ID_INTERFACE_LANG, wxDefaultPosition,
wxDefaultSize, arrayStringFor_InterfaceLang, 0, wxDefaultValidator);
// Hotkey configuration // Hotkey configuration
// TODO : doesn't really belong to the display page, heh. HotkeyConfig = new wxButton(DisplayPage, ID_HOTKEY_CONFIG, _("Hotkeys"),
HotkeyConfig = new wxButton(DisplayPage, ID_HOTKEY_CONFIG, _("Hotkeys"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, wxDefaultValidator); wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, wxDefaultValidator);
// Themes - this should really be a wxChoice... // 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 // Interface settings
sbInterface = new wxStaticBoxSizer(wxVERTICAL, DisplayPage, _("Interface Settings")); sbInterface = new wxStaticBoxSizer(wxVERTICAL, DisplayPage, _("Interface Settings"));
ConfirmStop = new wxCheckBox(DisplayPage, ID_INTERFACE_CONFIRMSTOP, _("Confirm On Stop"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator); ConfirmStop = new wxCheckBox(DisplayPage, ID_INTERFACE_CONFIRMSTOP, _("Confirm On Stop"),
UsePanicHandlers = new wxCheckBox(DisplayPage, ID_INTERFACE_USEPANICHANDLERS, _("Use Panic Handlers"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator); wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
UsePanicHandlers = new wxCheckBox(DisplayPage, ID_INTERFACE_USEPANICHANDLERS,
_("Use Panic Handlers"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
// Populate the Display page // Populate the Display page
wxBoxSizer* sDisplayRes = new wxBoxSizer(wxHORIZONTAL); wxBoxSizer* sDisplayRes = new wxBoxSizer(wxHORIZONTAL);
@ -615,12 +699,18 @@ void CConfigMain::CreateGUIControls()
// Audio page // Audio page
DSPEngine = new wxRadioBox(AudioPage, ID_DSPENGINE, _("DSP Emulator Engine"), wxDefaultPosition, wxDefaultSize, arrayStringFor_DSPEngine, 0, wxRA_SPECIFY_ROWS); DSPEngine = new wxRadioBox(AudioPage, ID_DSPENGINE, _("DSP Emulator Engine"),
EnableDTKMusic = new wxCheckBox(AudioPage, ID_ENABLE_DTK_MUSIC, _("Enable DTK Music"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator); wxDefaultPosition, wxDefaultSize, arrayStringFor_DSPEngine, 0, wxRA_SPECIFY_ROWS);
EnableThrottle = new wxCheckBox(AudioPage, ID_ENABLE_THROTTLE, _("Enable Audio Throttle"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator); EnableDTKMusic = new wxCheckBox(AudioPage, ID_ENABLE_DTK_MUSIC, _("Enable DTK Music"),
VolumeSlider = new wxSlider(AudioPage, ID_VOLUME, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL|wxSL_INVERSE); wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
VolumeText = new wxStaticText(AudioPage, wxID_ANY, wxT(""), wxDefaultPosition, wxDefaultSize, 0); EnableThrottle = new wxCheckBox(AudioPage, ID_ENABLE_THROTTLE, _("Enable Audio Throttle"),
BackendSelection = new wxChoice(AudioPage, ID_BACKEND, wxDefaultPosition, wxDefaultSize, wxArrayBackends, 0, wxDefaultValidator, wxEmptyString); 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 = new wxChoice(AudioPage, ID_FREQUENCY);
FrequencySelection->Append(_("48,000 Hz")); FrequencySelection->Append(_("48,000 Hz"));
FrequencySelection->Append(_("32,000 Hz")); FrequencySelection->Append(_("32,000 Hz"));
@ -655,11 +745,11 @@ void CConfigMain::CreateGUIControls()
AudioPage->SetSizerAndFit(sAudioPage); AudioPage->SetSizerAndFit(sAudioPage);
// TODO : Warning the following code hurts
// Gamecube page // Gamecube page
// IPL settings // IPL settings
sbGamecubeIPLSettings = new wxStaticBoxSizer(wxVERTICAL, GamecubePage, _("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 // Device settings
// EXI Devices // EXI Devices
wxStaticBoxSizer *sbGamecubeDeviceSettings = new wxStaticBoxSizer(wxVERTICAL, GamecubePage, _("Device Settings")); wxStaticBoxSizer *sbGamecubeDeviceSettings = new wxStaticBoxSizer(wxVERTICAL, GamecubePage, _("Device Settings"));
@ -667,54 +757,13 @@ void CConfigMain::CreateGUIControls()
GCEXIDeviceText[0] = TEXT_BOX(GamecubePage, _("Slot A")); GCEXIDeviceText[0] = TEXT_BOX(GamecubePage, _("Slot A"));
GCEXIDeviceText[1] = TEXT_BOX(GamecubePage, _("Slot B")); GCEXIDeviceText[1] = TEXT_BOX(GamecubePage, _("Slot B"));
GCEXIDeviceText[2] = TEXT_BOX(GamecubePage, wxT("SP1 ")); GCEXIDeviceText[2] = TEXT_BOX(GamecubePage, wxT("SP1 "));
const wxString SlotDevices[] = {_(DEV_NONE_STR), _(DEV_DUMMY_STR), _(EXIDEV_MEMCARD_STR), _(EXIDEV_GECKO_STR) GCEXIDevice[0] = new wxChoice(GamecubePage, ID_GC_EXIDEVICE_SLOTA);
#if HAVE_PORTAUDIO GCEXIDevice[1] = new wxChoice(GamecubePage, ID_GC_EXIDEVICE_SLOTB);
, _(EXIDEV_MIC_STR) GCEXIDevice[2] = new wxChoice(GamecubePage, ID_GC_EXIDEVICE_SP1);
#endif GCMemcardPath[0] = new wxButton(GamecubePage, ID_GC_EXIDEVICE_SLOTA_PATH, wxT("..."),
}; wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, wxDefaultValidator);
static const int numSlotDevices = sizeof(SlotDevices)/sizeof(wxString); GCMemcardPath[1] = new wxButton(GamecubePage, ID_GC_EXIDEVICE_SLOTB_PATH, wxT("..."),
const wxString SP1Devices[] = { _(DEV_NONE_STR), _(DEV_DUMMY_STR), _(EXIDEV_BBA_STR), _(EXIDEV_AM_BB_STR) }; wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, wxDefaultValidator);
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 //SI Devices
wxStaticText* GCSIDeviceText[4]; wxStaticText* GCSIDeviceText[4];
@ -722,33 +771,10 @@ void CConfigMain::CreateGUIControls()
GCSIDeviceText[1] = TEXT_BOX(GamecubePage, _("Port 2")); GCSIDeviceText[1] = TEXT_BOX(GamecubePage, _("Port 2"));
GCSIDeviceText[2] = TEXT_BOX(GamecubePage, _("Port 3")); GCSIDeviceText[2] = TEXT_BOX(GamecubePage, _("Port 3"));
GCSIDeviceText[3] = TEXT_BOX(GamecubePage, _("Port 4")); GCSIDeviceText[3] = TEXT_BOX(GamecubePage, _("Port 4"));
GCSIDevice[0] = new wxChoice(GamecubePage, ID_GC_SIDEVICE0);
// SIDEV_AM_BB_STR must be last! GCSIDevice[1] = new wxChoice(GamecubePage, ID_GC_SIDEVICE1);
const wxString SIDevices[] = {_(DEV_NONE_STR),_(SIDEV_STDCONT_STR),_(SIDEV_GBA_STR),_(SIDEV_AM_BB_STR)}; GCSIDevice[2] = new wxChoice(GamecubePage, ID_GC_SIDEVICE2);
static const int numSIDevices = sizeof(SIDevices)/sizeof(wxString); GCSIDevice[3] = new wxChoice(GamecubePage, ID_GC_SIDEVICE3);
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 // Populate the Gamecube page
sGamecubeIPLSettings = new wxGridBagSizer(); sGamecubeIPLSettings = new wxGridBagSizer();
@ -873,23 +899,6 @@ void CConfigMain::CreateGUIControls()
sPathsPage->Add(sOtherPaths, 0, wxEXPAND|wxALL, 5); sPathsPage->Add(sOtherPaths, 0, wxEXPAND|wxALL, 5);
PathsPage->SetSizer(sPathsPage); PathsPage->SetSizer(sPathsPage);
// 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);
m_Ok = new wxButton(this, wxID_OK); m_Ok = new wxButton(this, wxID_OK);
wxBoxSizer* sButtons = new wxBoxSizer(wxHORIZONTAL); wxBoxSizer* sButtons = new wxBoxSizer(wxHORIZONTAL);
@ -1044,14 +1053,13 @@ void CConfigMain::AudioSettingsChanged(wxCommandEvent& event)
ac_Config.m_EnableJIT = DSPEngine->GetSelection() == 1; ac_Config.m_EnableJIT = DSPEngine->GetSelection() == 1;
ac_Config.Update(); ac_Config.Update();
break; break;
case ID_BACKEND:
VolumeSlider->Enable(SupportsVolumeChanges(std::string(BackendSelection->GetStringSelection().mb_str())));
break;
case ID_VOLUME: case ID_VOLUME:
ac_Config.m_Volume = VolumeSlider->GetValue(); ac_Config.m_Volume = VolumeSlider->GetValue();
ac_Config.Update(); ac_Config.Update();
VolumeText->SetLabel(wxString::Format(wxT("%d %%"), VolumeSlider->GetValue())); VolumeText->SetLabel(wxString::Format(wxT("%d %%"), VolumeSlider->GetValue()));
break; break;
case ID_BACKEND:
VolumeSlider->Enable(SupportsVolumeChanges(std::string(BackendSelection->GetStringSelection().mb_str())));
default: default:
ac_Config.m_EnableDTKMusic = EnableDTKMusic->GetValue(); ac_Config.m_EnableDTKMusic = EnableDTKMusic->GetValue();
ac_Config.m_EnableThrottle = EnableThrottle->GetValue(); ac_Config.m_EnableThrottle = EnableThrottle->GetValue();