diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/ConfigDlg.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/ConfigDlg.cpp index 331147431a..f9d6669d0c 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/ConfigDlg.cpp +++ b/Source/Plugins/Plugin_DSP_HLE/Src/ConfigDlg.cpp @@ -46,7 +46,7 @@ DSPConfigDialogHLE::DSPConfigDialogHLE(wxWindow *parent, wxWindowID id, const wx m_buttonEnableThrottle = new wxCheckBox(this, ID_ENABLE_THROTTLE, wxT("Enable Audio Throttle"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator); m_buttonEnableRE0Fix = new wxCheckBox(this, ID_ENABLE_RE0_FIX, wxT("Enable RE0 Audio Hack"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator); 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_BackendSelection = new wxChoice(this, ID_BACKEND, wxDefaultPosition, wxSize(90, 20), wxArrayBackends, 0, wxDefaultValidator, wxEmptyString); m_volumeSlider = new wxSlider(this, ID_VOLUME, ac_Config.m_Volume, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL|wxSL_INVERSE); m_volumeSlider->Enable(SupportsVolumeChanges(ac_Config.sBackend)); @@ -102,10 +102,11 @@ void DSPConfigDialogHLE::AddBackend(const char* backend) // Update values m_BackendSelection->Append(wxString::FromAscii(backend)); #ifdef __APPLE__ - m_BackendSelection->SetValue(wxString::FromAscii(ac_Config.sBackend)); + int num = m_BackendSelection->FindString(wxString::FromAscii(ac_Config.sBackend)); #else - m_BackendSelection->SetValue(wxString::FromAscii(ac_Config.sBackend.c_str())); + int num = m_BackendSelection->FindString(wxString::FromAscii(ac_Config.sBackend.c_str())); #endif + m_BackendSelection->SetSelection(num); } void DSPConfigDialogHLE::ClearBackends() @@ -133,9 +134,9 @@ void DSPConfigDialogHLE::SettingsChanged(wxCommandEvent& event) g_Config.m_EnableRE0Fix = m_buttonEnableRE0Fix->GetValue(); #ifdef __APPLE__ - strncpy(ac_Config.sBackend, m_BackendSelection->GetValue().mb_str(), 128); + strncpy(ac_Config.sBackend, m_BackendSelection->GetStringSelection().mb_str(), 128); #else - ac_Config.sBackend = m_BackendSelection->GetValue().mb_str(); + ac_Config.sBackend = m_BackendSelection->GetStringSelection().mb_str(); #endif ac_Config.Update(); g_Config.Save(); @@ -155,5 +156,5 @@ bool DSPConfigDialogHLE::SupportsVolumeChanges(std::string backend) void DSPConfigDialogHLE::BackendChanged(wxCommandEvent& event) { - m_volumeSlider->Enable(SupportsVolumeChanges(std::string(m_BackendSelection->GetValue().mb_str()))); + m_volumeSlider->Enable(SupportsVolumeChanges(std::string(m_BackendSelection->GetStringSelection().mb_str()))); } diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/ConfigDlg.h b/Source/Plugins/Plugin_DSP_HLE/Src/ConfigDlg.h index 6841f120e1..d724e118e9 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/ConfigDlg.h +++ b/Source/Plugins/Plugin_DSP_HLE/Src/ConfigDlg.h @@ -48,7 +48,7 @@ private: wxCheckBox *m_buttonEnableThrottle; wxCheckBox *m_buttonEnableRE0Fix; wxArrayString wxArrayBackends; - wxComboBox *m_BackendSelection; + wxChoice *m_BackendSelection; enum { diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/DSPConfigDlgLLE.cpp b/Source/Plugins/Plugin_DSP_LLE/Src/DSPConfigDlgLLE.cpp index 6d2babb516..6dc5e33941 100644 --- a/Source/Plugins/Plugin_DSP_LLE/Src/DSPConfigDlgLLE.cpp +++ b/Source/Plugins/Plugin_DSP_LLE/Src/DSPConfigDlgLLE.cpp @@ -45,7 +45,7 @@ DSPConfigDialogLLE::DSPConfigDialogLLE(wxWindow *parent, wxWindowID id, const wx m_buttonEnableDTKMusic = new wxCheckBox(this, ID_ENABLE_DTK_MUSIC, wxT("Enable DTK Music"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator); m_buttonEnableThrottle = new wxCheckBox(this, ID_ENABLE_THROTTLE, wxT("Enable Audio Throttle"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator); 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_BackendSelection = new wxChoice(this, ID_BACKEND, wxDefaultPosition, wxSize(90, 20), wxArrayBackends, 0, wxDefaultValidator, wxEmptyString); m_volumeSlider = new wxSlider(this, ID_VOLUME, ac_Config.m_Volume, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL|wxSL_INVERSE); m_volumeSlider->Enable(SupportsVolumeChanges(ac_Config.sBackend)); diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/DSPConfigDlgLLE.h b/Source/Plugins/Plugin_DSP_LLE/Src/DSPConfigDlgLLE.h index 7dae7983bd..b58486f114 100644 --- a/Source/Plugins/Plugin_DSP_LLE/Src/DSPConfigDlgLLE.h +++ b/Source/Plugins/Plugin_DSP_LLE/Src/DSPConfigDlgLLE.h @@ -46,7 +46,7 @@ private: wxCheckBox *m_buttonEnableDTKMusic; wxCheckBox *m_buttonEnableThrottle; wxArrayString wxArrayBackends; - wxComboBox *m_BackendSelection; + wxChoice *m_BackendSelection; enum { diff --git a/Source/Plugins/Plugin_GCPad/Src/ConfigBox.cpp b/Source/Plugins/Plugin_GCPad/Src/ConfigBox.cpp index b123b3b8d4..89ec95625a 100644 --- a/Source/Plugins/Plugin_GCPad/Src/ConfigBox.cpp +++ b/Source/Plugins/Plugin_GCPad/Src/ConfigBox.cpp @@ -494,12 +494,12 @@ void GCPadConfigDialog::CreateGUIControls() m_Notebook->AddPage(m_Controller[i], wxString::Format(wxT("Gamecube Pad %d"), i+1)); // Controller - m_Joyname[i] = new wxComboBox(m_Controller[i], IDC_JOYNAME, StrJoyname[0], wxDefaultPosition, wxSize(400, -1), StrJoyname, wxCB_READONLY); + m_Joyname[i] = new wxChoice(m_Controller[i], IDC_JOYNAME, wxDefaultPosition, wxSize(400, -1), StrJoyname, 0, wxDefaultValidator, StrJoyname[0]); // Dead zone m_ComboDeadZoneLabel[i] = new wxStaticText(m_Controller[i], wxID_ANY, wxT("Dead Zone")); - m_ComboDeadZoneLeft[i] = new wxComboBox(m_Controller[i], IDC_DEAD_ZONE_LEFT, TextDeadZone[0], wxDefaultPosition, wxSize(50, -1), TextDeadZone, wxCB_READONLY); - m_ComboDeadZoneRight[i] = new wxComboBox(m_Controller[i], IDC_DEAD_ZONE_RIGHT, TextDeadZone[0], wxDefaultPosition, wxSize(50, -1), TextDeadZone, wxCB_READONLY); + m_ComboDeadZoneLeft[i] = new wxChoice(m_Controller[i], IDC_DEAD_ZONE_LEFT, wxDefaultPosition, wxSize(50, -1), TextDeadZone, 0, wxDefaultValidator, TextDeadZone[0]); + m_ComboDeadZoneRight[i] = new wxChoice(m_Controller[i], IDC_DEAD_ZONE_RIGHT, wxDefaultPosition, wxSize(50, -1), TextDeadZone, 0, wxDefaultValidator, TextDeadZone[0]); // Circle to square m_CheckS2C[i] = new wxCheckBox(m_Controller[i], IDC_STICK_S2C, wxT("Square To Circle")); @@ -510,13 +510,12 @@ void GCPadConfigDialog::CreateGUIControls() m_DiagonalLabel[i] = new wxStaticText(m_Controller[i], wxID_ANY, wxT("Diagonal")); m_DiagonalLabel[i]->SetToolTip(wxT("To produce a perfect circle in the 'Out' window you have to manually set\n") wxT("your diagonal values here from what is shown in the 'In' window.")); - m_ComboDiagonal[i] = new wxComboBox(m_Controller[i], IDC_STICK_DIAGONAL, StrDiagonal[0], wxDefaultPosition, wxSize(50, -1), StrDiagonal, wxCB_READONLY); + m_ComboDiagonal[i] = new wxChoice(m_Controller[i], IDC_STICK_DIAGONAL, wxDefaultPosition, wxSize(50, -1), StrDiagonal, 0, wxDefaultValidator, StrDiagonal[0]); // Rumble m_CheckRumble[i] = new wxCheckBox(m_Controller[i], IDC_RUMBLE, wxT("Rumble")); m_RumbleStrengthLabel[i] = new wxStaticText(m_Controller[i], wxID_ANY, wxT("Strength")); - m_RumbleStrength[i] = new wxComboBox(m_Controller[i], IDC_RUMBLE_STRENGTH, StrRumble[0], wxDefaultPosition, wxSize(50, -1), StrRumble, wxCB_READONLY); - + m_RumbleStrength[i] = new wxChoice(m_Controller[i], IDC_RUMBLE_STRENGTH, wxDefaultPosition, wxSize(50, -1), StrRumble, 0, wxDefaultValidator, StrRumble[0]); // Sizers m_sDeadZoneHoriz[i] = new wxBoxSizer(wxHORIZONTAL); m_sDeadZoneHoriz[i]->Add(m_ComboDeadZoneLeft[i], 0, (wxUP), 0); @@ -607,7 +606,7 @@ void GCPadConfigDialog::CreateGUIControls() m_TriggerStatusL[i]= new wxStaticText(m_Controller[i], wxID_ANY, wxT("000"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT); m_TriggerStatusR[i]= new wxStaticText(m_Controller[i], wxID_ANY, wxT("000"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT); m_tTriggerSource[i]= new wxStaticText(m_Controller[i], wxID_ANY, wxT("Trigger Source")); - m_TriggerType[i] = new wxComboBox(m_Controller[i], IDC_TRIGGER_TYPE, StrTriggerType[0], wxDefaultPosition, wxSize(70, -1), StrTriggerType, wxCB_READONLY); + m_TriggerType[i] = new wxChoice(m_Controller[i], IDC_TRIGGER_TYPE, wxDefaultPosition, wxSize(70, -1), StrTriggerType, 0, wxDefaultValidator, StrTriggerType[0]); // Sizers m_sGridTrigger[i] = new wxGridBagSizer(0, 0); @@ -666,7 +665,7 @@ void GCPadConfigDialog::CreateGUIControls() m_gDPad[i] = new wxStaticBoxSizer(wxVERTICAL, m_Controller[i], wxT("D-Pad")); m_gStick[i] = new wxStaticBoxSizer(wxVERTICAL, m_Controller[i], wxT("Main Stick")); m_Text_StickSrc[i] = new wxStaticText(m_Controller[i], wxID_ANY, wxT("Source")); - m_Combo_StickSrc[i] = new wxComboBox(m_Controller[i], IDC_STICK_SOURCE, StrSource[0], wxDefaultPosition, wxSize(70, -1), StrSource, wxCB_READONLY); + m_Combo_StickSrc[i] = new wxChoice(m_Controller[i], IDC_STICK_SOURCE, wxDefaultPosition, wxSize(70, -1), StrSource, 0, wxDefaultValidator, StrSource[0]); m_sStickSrc[i] = new wxBoxSizer(wxHORIZONTAL); m_sStickSrc[i]->Add(m_Text_StickSrc[i], 0, (wxUP), 4); m_sStickSrc[i]->Add(m_Combo_StickSrc[i], 0, (wxLEFT), 2); @@ -674,7 +673,7 @@ void GCPadConfigDialog::CreateGUIControls() m_gStick[i]->AddSpacer(2); m_gCStick[i] = new wxStaticBoxSizer(wxVERTICAL, m_Controller[i], wxT("C-Stick")); m_Text_CStickSrc[i] = new wxStaticText(m_Controller[i], wxID_ANY, wxT("Source")); - m_Combo_CStickSrc[i] = new wxComboBox(m_Controller[i], IDC_CSTICK_SOURCE, StrSource[0], wxDefaultPosition, wxSize(70, -1), StrSource, wxCB_READONLY); + m_Combo_CStickSrc[i] = new wxChoice(m_Controller[i], IDC_CSTICK_SOURCE, wxDefaultPosition, wxSize(70, -1), StrSource, 0, wxDefaultValidator, StrSource[0]); m_sCStickSrc[i] = new wxBoxSizer(wxHORIZONTAL); m_sCStickSrc[i]->Add(m_Text_CStickSrc[i], 0, (wxUP), 4); m_sCStickSrc[i]->Add(m_Combo_CStickSrc[i], 0, (wxLEFT), 2); @@ -682,7 +681,7 @@ void GCPadConfigDialog::CreateGUIControls() m_gCStick[i]->AddSpacer(2); m_gTrigger[i] = new wxStaticBoxSizer(wxVERTICAL, m_Controller[i], wxT("Triggers")); m_Text_TriggerSrc[i] = new wxStaticText(m_Controller[i], wxID_ANY, wxT("Source")); - m_Combo_TriggerSrc[i] = new wxComboBox(m_Controller[i], IDC_TRIGGER_SOURCE, StrSource[0], wxDefaultPosition, wxSize(70, -1), StrSource, wxCB_READONLY); + m_Combo_TriggerSrc[i] = new wxChoice(m_Controller[i], IDC_TRIGGER_SOURCE, wxDefaultPosition, wxSize(70, -1), StrSource, 0, wxDefaultValidator, StrSource[0]); m_sTriggerSrc[i] = new wxBoxSizer(wxHORIZONTAL); m_sTriggerSrc[i]->Add(m_Text_TriggerSrc[i], 0, (wxUP), 4); m_sTriggerSrc[i]->Add(m_Combo_TriggerSrc[i], 0, (wxLEFT), 2); diff --git a/Source/Plugins/Plugin_GCPad/Src/ConfigBox.h b/Source/Plugins/Plugin_GCPad/Src/ConfigBox.h index e25c9c49be..096c6e75d4 100644 --- a/Source/Plugins/Plugin_GCPad/Src/ConfigBox.h +++ b/Source/Plugins/Plugin_GCPad/Src/ConfigBox.h @@ -109,7 +109,7 @@ class GCPadConfigDialog : public wxDialog IDC_STICK_DIAGONAL, IDC_STICK_S2C, IDC_RUMBLE, IDC_RUMBLE_STRENGTH, IDC_TRIGGER_TYPE, - IDC_STICK_SOURCE, IDC_CSTICK_SOURCE, IDC_TRIGGER_SOURCE, + IDC_STICK_SOURCE, IDC_CSTICK_SOURCE, IDC_TRIGGER_SOURCE, IDS_STICK_PRESS, IDS_CSTICK_PRESS, IDS_TRIGGER_PRESS, }; @@ -137,7 +137,7 @@ class GCPadConfigDialog : public wxDialog *m_Button_Analog[IDB_TRIGGER_R - IDB_ANALOG_LEFT_X + 1][4], *m_Button_GC[IDB_SHDR_SEMI_R - IDB_BTN_A + 1][4]; - wxComboBox *m_Joyname[4], + wxChoice *m_Joyname[4], *m_ComboDeadZoneLeft[4], *m_ComboDeadZoneRight[4], *m_ComboDiagonal[4],