From d17a054e75a1e8084e424fcca425ebf45889de16 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 21 Nov 2014 11:55:18 -0500 Subject: [PATCH 01/11] WiimoteConfigDiag: Move GameCube controller settings over Beginning of unifying the controller settings. No functionality yet. --- Source/Core/DolphinWX/WiimoteConfigDiag.cpp | 69 ++++++++++++++++++--- Source/Core/DolphinWX/WiimoteConfigDiag.h | 2 + 2 files changed, 64 insertions(+), 7 deletions(-) diff --git a/Source/Core/DolphinWX/WiimoteConfigDiag.cpp b/Source/Core/DolphinWX/WiimoteConfigDiag.cpp index cb4baff7ff..9cfcb86e12 100644 --- a/Source/Core/DolphinWX/WiimoteConfigDiag.cpp +++ b/Source/Core/DolphinWX/WiimoteConfigDiag.cpp @@ -67,7 +67,9 @@ WiimoteConfigDiag::WiimoteConfigDiag(wxWindow* const parent, InputConfig& config } // "Wiimotes" layout - wxStaticBoxSizer* const wiimote_group = new wxStaticBoxSizer(wxHORIZONTAL, this, _("Wiimotes")); + // TODO: Give sizers better names + wxStaticBoxSizer* const wiimote_group = new wxStaticBoxSizer(wxVERTICAL,this, _("Wiimotes")); + wxBoxSizer* const wiimote_control_section = new wxBoxSizer(wxHORIZONTAL); wxFlexGridSizer* const wiimote_sizer = new wxFlexGridSizer(3, 5, 5); for (unsigned int i = 0; i < 4; ++i) { @@ -75,7 +77,7 @@ WiimoteConfigDiag::WiimoteConfigDiag(wxWindow* const parent, InputConfig& config wiimote_sizer->Add(wiimote_source_ch[i], 0, wxALIGN_CENTER_VERTICAL); wiimote_sizer->Add(wiimote_configure_bt[i]); } - wiimote_group->Add(wiimote_sizer, 1, wxEXPAND, 5 ); + wiimote_control_section->Add(wiimote_sizer, 1, wxEXPAND, 5 ); // "BalanceBoard" layout @@ -206,12 +208,23 @@ WiimoteConfigDiag::WiimoteConfigDiag(wxWindow* const parent, InputConfig& config general_sizer->Add(choice_sizer); general_sizer->Add(general_wiimote_sizer); + // Combine all wiimote UI. + wiimote_group->Add(wiimote_control_section, 0, wxEXPAND | wxALL); + wiimote_group->AddSpacer(5); + wiimote_group->Add(bb_group, 0, wxEXPAND | wxALL); + wiimote_group->Add(real_wiimotes_group, 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM); + wiimote_group->Add(general_sizer, 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM); - // Dialog layout - main_sizer->Add(wiimote_group, 0, wxEXPAND | wxALL, 5); - main_sizer->Add(bb_group, 0, wxEXPAND | wxALL, 5); - main_sizer->Add(real_wiimotes_group, 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5); - main_sizer->Add(general_sizer, 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5); + // Combine all Wiimote UI controls into their own encompassing sizer. + wxBoxSizer* wiimote_section = new wxBoxSizer(wxVERTICAL); + wiimote_section->Add(CreateGamecubeSizer(), 0, wxEXPAND | wxALL, 5); + wiimote_section->Add(wiimote_group, 0, wxEXPAND | wxALL, 5); + /*wiimote_section->Add(bb_group, 0, wxEXPAND | wxALL, 5); + wiimote_section->Add(real_wiimotes_group, 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5); + wiimote_section->Add(general_sizer, 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5);*/ + + // TODO: Rename wiimote_section to something else. + main_sizer->Add(wiimote_section, 0, wxEXPAND); main_sizer->Add(CreateButtonSizer(wxOK | wxCANCEL), 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5); Bind(wxEVT_BUTTON, &WiimoteConfigDiag::Save, this, wxID_OK); @@ -221,6 +234,48 @@ WiimoteConfigDiag::WiimoteConfigDiag(wxWindow* const parent, InputConfig& config Center(); } +wxStaticBoxSizer* WiimoteConfigDiag::CreateGamecubeSizer() +{ + wxStaticBoxSizer* const gamecube_static_sizer = new wxStaticBoxSizer(wxHORIZONTAL, this, _("GameCube Controllers")); + wxFlexGridSizer* const gamecube_flex_sizer = new wxFlexGridSizer(3, 5, 5); + + static const std::array pad_type_strs = {{ + _("None"), + _("Standard Controller"), + _("Steering Wheel"), + _("Dance Mat"), + _("TaruKonga (Bongos)"), + _("GBA"), + _("AM-Baseboard") + }}; + + wxStaticText* pad_labels[4]; + wxChoice* pad_type_choices[4]; + wxButton* config_buttons[4]; + // TODO: Add bind call here + + for (int i = 0; i < 4; i++) + { + config_buttons[i] = new wxButton(this, wxID_ANY, _("Configure")); + pad_labels[i] = new wxStaticText(this, wxID_ANY, wxString::Format(_("Pad %i"), i + 1)); + + // Only add AM-Baseboard to the first pad. + if (i == 0) + pad_type_choices[i] = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, pad_type_strs.size(), pad_type_strs.data()); + else + pad_type_choices[i] = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, pad_type_strs.size() - 1, pad_type_strs.data()); + + gamecube_flex_sizer->Add(pad_labels[i], 0, wxALIGN_CENTER_VERTICAL); + gamecube_flex_sizer->AddGrowableCol(0, 1); + gamecube_flex_sizer->Add(pad_type_choices[i], 0, wxALIGN_CENTER_VERTICAL); + gamecube_flex_sizer->AddGrowableCol(0, 2); + gamecube_flex_sizer->Add(config_buttons[i], 0, wxALIGN_RIGHT); + } + + gamecube_static_sizer->Add(gamecube_flex_sizer, 1, wxEXPAND, 5 ); + return gamecube_static_sizer; +} + void WiimoteConfigDiag::ConfigEmulatedWiimote(wxCommandEvent& ev) { diff --git a/Source/Core/DolphinWX/WiimoteConfigDiag.h b/Source/Core/DolphinWX/WiimoteConfigDiag.h index ddad3c36fb..0edd0a2a87 100644 --- a/Source/Core/DolphinWX/WiimoteConfigDiag.h +++ b/Source/Core/DolphinWX/WiimoteConfigDiag.h @@ -11,6 +11,7 @@ class InputConfig; class wxButton; +class wxStaticBoxSizer; class wxWindow; class WiimoteConfigDiag : public wxDialog @@ -59,6 +60,7 @@ public: } private: + wxStaticBoxSizer* CreateGamecubeSizer(); void Cancel(wxCommandEvent& event); InputConfig& m_config; From 94d033020e240a91b718f3dca974501bbb077a0e Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 21 Nov 2014 13:01:22 -0500 Subject: [PATCH 02/11] WiimoteConfigDiag: Split UI sizer creation into their own functions. --- Source/Core/DolphinWX/WiimoteConfigDiag.cpp | 399 ++++++++++---------- Source/Core/DolphinWX/WiimoteConfigDiag.h | 4 + 2 files changed, 213 insertions(+), 190 deletions(-) diff --git a/Source/Core/DolphinWX/WiimoteConfigDiag.cpp b/Source/Core/DolphinWX/WiimoteConfigDiag.cpp index 9cfcb86e12..53c2acc910 100644 --- a/Source/Core/DolphinWX/WiimoteConfigDiag.cpp +++ b/Source/Core/DolphinWX/WiimoteConfigDiag.cpp @@ -1,3 +1,4 @@ +#include #include #include #include @@ -34,197 +35,12 @@ WiimoteConfigDiag::WiimoteConfigDiag(wxWindow* const parent, InputConfig& config { wxBoxSizer* const main_sizer = new wxBoxSizer(wxVERTICAL); - - // "Wiimotes" controls - wxStaticText* wiimote_label[4]; - wxChoice* wiimote_source_ch[4]; - - for (unsigned int i = 0; i < MAX_WIIMOTES; ++i) - { - wxString wiimote_str = wxString::Format(_("Wiimote %i"), i + 1); - - const wxString src_choices[] = { _("None"), - _("Emulated Wiimote"), _("Real Wiimote"), _("Hybrid Wiimote") }; - - // reserve four ids, so that we can calculate the index from the ids later on - // Stupid wx 2.8 doesn't support reserving sequential IDs, so we need to do that more complicated.. - int source_ctrl_id = wxWindow::NewControlId(); - m_wiimote_index_from_ctrl_id.insert(std::pair(source_ctrl_id, i)); - - int config_bt_id = wxWindow::NewControlId(); - m_wiimote_index_from_conf_bt_id.insert(std::pair(config_bt_id, i)); - - wiimote_label[i] = new wxStaticText(this, wxID_ANY, wiimote_str); - wiimote_source_ch[i] = new wxChoice(this, source_ctrl_id, wxDefaultPosition, wxDefaultSize, sizeof(src_choices)/sizeof(*src_choices), src_choices); - wiimote_source_ch[i]->Bind(wxEVT_CHOICE, &WiimoteConfigDiag::SelectSource, this); - wiimote_configure_bt[i] = new wxButton(this, config_bt_id, _("Configure")); - wiimote_configure_bt[i]->Bind(wxEVT_BUTTON, &WiimoteConfigDiag::ConfigEmulatedWiimote, this); - - m_orig_wiimote_sources[i] = g_wiimote_sources[i]; - wiimote_source_ch[i]->Select(m_orig_wiimote_sources[i]); - if (m_orig_wiimote_sources[i] != WIIMOTE_SRC_EMU && m_orig_wiimote_sources[i] != WIIMOTE_SRC_HYBRID) - wiimote_configure_bt[i]->Disable(); - } - - // "Wiimotes" layout - // TODO: Give sizers better names - wxStaticBoxSizer* const wiimote_group = new wxStaticBoxSizer(wxVERTICAL,this, _("Wiimotes")); - wxBoxSizer* const wiimote_control_section = new wxBoxSizer(wxHORIZONTAL); - wxFlexGridSizer* const wiimote_sizer = new wxFlexGridSizer(3, 5, 5); - for (unsigned int i = 0; i < 4; ++i) - { - wiimote_sizer->Add(wiimote_label[i], 0, wxALIGN_CENTER_VERTICAL); - wiimote_sizer->Add(wiimote_source_ch[i], 0, wxALIGN_CENTER_VERTICAL); - wiimote_sizer->Add(wiimote_configure_bt[i]); - } - wiimote_control_section->Add(wiimote_sizer, 1, wxEXPAND, 5 ); - - - // "BalanceBoard" layout - wxStaticBoxSizer* const bb_group = new wxStaticBoxSizer(wxHORIZONTAL, this, _("Balance Board")); - wxFlexGridSizer* const bb_sizer = new wxFlexGridSizer(1, 5, 5); - int source_ctrl_id = wxWindow::NewControlId(); - m_wiimote_index_from_ctrl_id.insert(std::pair(source_ctrl_id, WIIMOTE_BALANCE_BOARD)); - const wxString src_choices[] = { _("None"), _("Real Balance Board") }; - wxChoice* bb_source = new wxChoice(this, source_ctrl_id, wxDefaultPosition, wxDefaultSize, sizeof(src_choices)/sizeof(*src_choices), src_choices); - bb_source->Bind(wxEVT_CHOICE, &WiimoteConfigDiag::SelectSource, this); - - m_orig_wiimote_sources[WIIMOTE_BALANCE_BOARD] = g_wiimote_sources[WIIMOTE_BALANCE_BOARD]; - bb_source->Select(m_orig_wiimote_sources[WIIMOTE_BALANCE_BOARD] ? 1 : 0); - - bb_sizer->Add(bb_source, 0, wxALIGN_CENTER_VERTICAL); - - bb_group->Add(bb_sizer, 1, wxEXPAND, 5 ); - - - // "Real wiimotes" controls - wxButton* const refresh_btn = new wxButton(this, -1, _("Refresh")); - refresh_btn->Bind(wxEVT_BUTTON, &WiimoteConfigDiag::RefreshRealWiimotes, this); - - wxStaticBoxSizer* const real_wiimotes_group = new wxStaticBoxSizer(wxVERTICAL, this, _("Real Wiimotes")); - - wxBoxSizer* const real_wiimotes_sizer = new wxBoxSizer(wxHORIZONTAL); - - if (!WiimoteReal::g_wiimote_scanner.IsReady()) - real_wiimotes_group->Add(new wxStaticText(this, -1, _("A supported bluetooth device could not be found.\n" - "You must manually connect your wiimotes.")), 0, wxALIGN_CENTER | wxALL, 5); - - wxCheckBox* const continuous_scanning = new wxCheckBox(this, wxID_ANY, _("Continuous Scanning")); - continuous_scanning->Bind(wxEVT_CHECKBOX, &WiimoteConfigDiag::OnContinuousScanning, this); - continuous_scanning->SetValue(SConfig::GetInstance().m_WiimoteContinuousScanning); - - real_wiimotes_sizer->Add(continuous_scanning, 0, wxALIGN_CENTER_VERTICAL); - real_wiimotes_sizer->AddStretchSpacer(1); - real_wiimotes_sizer->Add(refresh_btn, 0, wxALL | wxALIGN_CENTER, 5); - - real_wiimotes_group->Add(real_wiimotes_sizer, 0, wxEXPAND); - - // "General Settings" controls - const wxString str[] = { _("Bottom"), _("Top") }; - wxChoice* const WiiSensBarPos = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 2, str); - wxSlider* const WiiSensBarSens = new wxSlider(this, wxID_ANY, 0, 0, 4); - wxSlider* const WiimoteSpkVolume = new wxSlider(this, wxID_ANY, 0, 0, 127); - wxCheckBox* const WiimoteMotor = new wxCheckBox(this, wxID_ANY, _("Wiimote Motor")); - - auto wiimote_speaker = new wxCheckBox(this, wxID_ANY, _("Enable Speaker Data")); - wiimote_speaker->Bind(wxEVT_CHECKBOX, &WiimoteConfigDiag::OnEnableSpeaker, this); - wiimote_speaker->SetValue(SConfig::GetInstance().m_WiimoteEnableSpeaker); - - wxStaticText* const WiiSensBarPosText = new wxStaticText(this, wxID_ANY, _("Sensor Bar Position:")); - wxStaticText* const WiiSensBarSensText = new wxStaticText(this, wxID_ANY, _("IR Sensitivity:")); - wxStaticText* const WiiSensBarSensMinText = new wxStaticText(this, wxID_ANY, _("Min")); - wxStaticText* const WiiSensBarSensMaxText = new wxStaticText(this, wxID_ANY, _("Max")); - wxStaticText* const WiimoteSpkVolumeText = new wxStaticText(this, wxID_ANY, _("Speaker Volume:")); - wxStaticText* const WiimoteSpkVolumeMinText = new wxStaticText(this, wxID_ANY, _("Min")); - wxStaticText* const WiimoteSpkVolumeMaxText = new wxStaticText(this, wxID_ANY, _("Max")); - - // With some GTK themes, no minimum size will be applied - so do this manually here - WiiSensBarSens->SetMinSize(wxSize(100,-1)); - WiimoteSpkVolume->SetMinSize(wxSize(100,-1)); - - - // Disable some controls when emulation is running - if (Core::GetState() != Core::CORE_UNINITIALIZED) - { - WiiSensBarPos->Disable(); - WiiSensBarSens->Disable(); - WiimoteSpkVolume->Disable(); - WiimoteMotor->Disable(); - WiiSensBarPosText->Disable(); - WiiSensBarSensText->Disable(); - WiiSensBarSensMinText->Disable(); - WiiSensBarSensMaxText->Disable(); - WiimoteSpkVolumeText->Disable(); - WiimoteSpkVolumeMinText->Disable(); - WiimoteSpkVolumeMaxText->Disable(); - if (NetPlay::IsNetPlayRunning()) - { - bb_source->Disable(); - for (int i = 0; i < 4; ++i) - { - wiimote_label[i]->Disable(); - wiimote_source_ch[i]->Disable(); - } - } - } - - // "General Settings" initialization - WiiSensBarPos->SetSelection(SConfig::GetInstance().m_SYSCONF->GetData("BT.BAR")); - WiiSensBarSens->SetValue(SConfig::GetInstance().m_SYSCONF->GetData("BT.SENS")); - WiimoteSpkVolume->SetValue(SConfig::GetInstance().m_SYSCONF->GetData("BT.SPKV")); - WiimoteMotor->SetValue(SConfig::GetInstance().m_SYSCONF->GetData("BT.MOT")); - - WiiSensBarPos->Bind(wxEVT_CHOICE, &WiimoteConfigDiag::OnSensorBarPos, this); - WiiSensBarSens->Bind(wxEVT_SLIDER, &WiimoteConfigDiag::OnSensorBarSensitivity, this); - WiimoteSpkVolume->Bind(wxEVT_SLIDER, &WiimoteConfigDiag::OnSpeakerVolume, this); - WiimoteMotor->Bind(wxEVT_CHECKBOX, &WiimoteConfigDiag::OnMotor, this); - - - // "General Settings" layout - wxStaticBoxSizer* const general_sizer = new wxStaticBoxSizer(wxVERTICAL, this, _("General Settings")); - wxFlexGridSizer* const choice_sizer = new wxFlexGridSizer(2, 5, 5); - - wxBoxSizer* const sensbarsens_sizer = new wxBoxSizer(wxHORIZONTAL); - sensbarsens_sizer->Add(WiiSensBarSensMinText, 0, wxALIGN_CENTER_VERTICAL); - sensbarsens_sizer->Add(WiiSensBarSens); - sensbarsens_sizer->Add(WiiSensBarSensMaxText, 0, wxALIGN_CENTER_VERTICAL); - - wxBoxSizer* const spkvol_sizer = new wxBoxSizer(wxHORIZONTAL); - spkvol_sizer->Add(WiimoteSpkVolumeMinText, 0, wxALIGN_CENTER_VERTICAL); - spkvol_sizer->Add(WiimoteSpkVolume); - spkvol_sizer->Add(WiimoteSpkVolumeMaxText, 0, wxALIGN_CENTER_VERTICAL); - - choice_sizer->Add(WiiSensBarPosText, 0, wxALIGN_CENTER_VERTICAL); - choice_sizer->Add(WiiSensBarPos); - choice_sizer->Add(WiiSensBarSensText, 0, wxALIGN_CENTER_VERTICAL); - choice_sizer->Add(sensbarsens_sizer); - choice_sizer->Add(WiimoteSpkVolumeText, 0, wxALIGN_CENTER_VERTICAL); - choice_sizer->Add(spkvol_sizer); - - wxGridSizer* const general_wiimote_sizer = new wxGridSizer(1, 5, 5); - general_wiimote_sizer->Add(WiimoteMotor); - general_wiimote_sizer->Add(wiimote_speaker, 0); - - general_sizer->Add(choice_sizer); - general_sizer->Add(general_wiimote_sizer); - - // Combine all wiimote UI. - wiimote_group->Add(wiimote_control_section, 0, wxEXPAND | wxALL); - wiimote_group->AddSpacer(5); - wiimote_group->Add(bb_group, 0, wxEXPAND | wxALL); - wiimote_group->Add(real_wiimotes_group, 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM); - wiimote_group->Add(general_sizer, 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM); - - // Combine all Wiimote UI controls into their own encompassing sizer. - wxBoxSizer* wiimote_section = new wxBoxSizer(wxVERTICAL); - wiimote_section->Add(CreateGamecubeSizer(), 0, wxEXPAND | wxALL, 5); - wiimote_section->Add(wiimote_group, 0, wxEXPAND | wxALL, 5); - /*wiimote_section->Add(bb_group, 0, wxEXPAND | wxALL, 5); - wiimote_section->Add(real_wiimotes_group, 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5); - wiimote_section->Add(general_sizer, 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5);*/ + // Combine all UI controls into their own encompassing sizer. + wxBoxSizer* control_sizer = new wxBoxSizer(wxVERTICAL); + control_sizer->Add(CreateGamecubeSizer(), 0, wxEXPAND | wxALL, 5); + control_sizer->Add(CreateWiimoteConfigSizer(), 0, wxEXPAND | wxALL, 5); - // TODO: Rename wiimote_section to something else. - main_sizer->Add(wiimote_section, 0, wxEXPAND); + main_sizer->Add(control_sizer, 0, wxEXPAND); main_sizer->Add(CreateButtonSizer(wxOK | wxCANCEL), 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5); Bind(wxEVT_BUTTON, &WiimoteConfigDiag::Save, this, wxID_OK); @@ -276,6 +92,209 @@ wxStaticBoxSizer* WiimoteConfigDiag::CreateGamecubeSizer() return gamecube_static_sizer; } +wxStaticBoxSizer* WiimoteConfigDiag::CreateWiimoteConfigSizer() +{ + wxStaticText* wiimote_label[4]; + wxChoice* wiimote_source_ch[4]; + + for (unsigned int i = 0; i < MAX_WIIMOTES; ++i) + { + wxString wiimote_str = wxString::Format(_("Wiimote %i"), i + 1); + + static const std::array src_choices = {{ + _("None"), _("Emulated Wiimote"), _("Real Wiimote"), _("Hybrid Wiimote") + }}; + + // reserve four ids, so that we can calculate the index from the ids later on + // Stupid wx 2.8 doesn't support reserving sequential IDs, so we need to do that more complicated.. + int source_ctrl_id = wxWindow::NewControlId(); + m_wiimote_index_from_ctrl_id.insert(std::pair(source_ctrl_id, i)); + + int config_bt_id = wxWindow::NewControlId(); + m_wiimote_index_from_conf_bt_id.insert(std::pair(config_bt_id, i)); + + wiimote_label[i] = new wxStaticText(this, wxID_ANY, wiimote_str); + wiimote_source_ch[i] = new wxChoice(this, source_ctrl_id, wxDefaultPosition, wxDefaultSize, src_choices.size(), src_choices.data()); + wiimote_source_ch[i]->Bind(wxEVT_CHOICE, &WiimoteConfigDiag::SelectSource, this); + wiimote_configure_bt[i] = new wxButton(this, config_bt_id, _("Configure")); + wiimote_configure_bt[i]->Bind(wxEVT_BUTTON, &WiimoteConfigDiag::ConfigEmulatedWiimote, this); + + m_orig_wiimote_sources[i] = g_wiimote_sources[i]; + wiimote_source_ch[i]->Select(m_orig_wiimote_sources[i]); + if (m_orig_wiimote_sources[i] != WIIMOTE_SRC_EMU && m_orig_wiimote_sources[i] != WIIMOTE_SRC_HYBRID) + wiimote_configure_bt[i]->Disable(); + } + + // "Wiimotes" layout + wxStaticBoxSizer* const wiimote_group = new wxStaticBoxSizer(wxVERTICAL,this, _("Wiimotes")); + wxBoxSizer* const wiimote_control_section = new wxBoxSizer(wxHORIZONTAL); + wxFlexGridSizer* const wiimote_sizer = new wxFlexGridSizer(3, 5, 5); + for (unsigned int i = 0; i < 4; ++i) + { + wiimote_sizer->Add(wiimote_label[i], 0, wxALIGN_CENTER_VERTICAL); + wiimote_sizer->Add(wiimote_source_ch[i], 0, wxALIGN_CENTER_VERTICAL); + wiimote_sizer->Add(wiimote_configure_bt[i]); + } + wiimote_control_section->Add(wiimote_sizer, 1, wxEXPAND, 5 ); + + // TODO: Move to wiimote sizer creation. + // Disable some controls when emulation is running + if (Core::GetState() != Core::CORE_UNINITIALIZED && NetPlay::IsNetPlayRunning()) + { + for (int i = 0; i < 4; ++i) + { + wiimote_label[i]->Disable(); + wiimote_source_ch[i]->Disable(); + } + } + + // Combine all wiimote UI. + wiimote_group->Add(wiimote_control_section, 0, wxEXPAND | wxALL); + wiimote_group->AddSpacer(5); + wiimote_group->Add(CreateBalanceBoardSizer(), 0, wxEXPAND | wxALL); + wiimote_group->Add(CreateRealWiimoteSizer(), 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM); + wiimote_group->Add(CreateGeneralWiimoteSettingsSizer(), 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM); + + return wiimote_group; +} + +wxStaticBoxSizer* WiimoteConfigDiag::CreateBalanceBoardSizer() +{ + wxStaticBoxSizer* const bb_group = new wxStaticBoxSizer(wxHORIZONTAL, this, _("Balance Board")); + wxFlexGridSizer* const bb_sizer = new wxFlexGridSizer(1, 5, 5); + int source_ctrl_id = wxWindow::NewControlId(); + + m_wiimote_index_from_ctrl_id.insert(std::pair(source_ctrl_id, WIIMOTE_BALANCE_BOARD)); + + static const std::array src_choices = {{ + ("None"), _("Real Balance Board") + }}; + + wxChoice* const bb_source = new wxChoice(this, source_ctrl_id, wxDefaultPosition, wxDefaultSize, src_choices.size(), src_choices.data()); + bb_source->Bind(wxEVT_CHOICE, &WiimoteConfigDiag::SelectSource, this); + + m_orig_wiimote_sources[WIIMOTE_BALANCE_BOARD] = g_wiimote_sources[WIIMOTE_BALANCE_BOARD]; + bb_source->Select(m_orig_wiimote_sources[WIIMOTE_BALANCE_BOARD] ? 1 : 0); + + bb_sizer->Add(bb_source, 0, wxALIGN_CENTER_VERTICAL); + + bb_group->Add(bb_sizer, 1, wxEXPAND, 5); + + // Disable when emulation is running. + if (Core::GetState() != Core::CORE_UNINITIALIZED) + bb_source->Disable(); + + return bb_group; +} + +wxStaticBoxSizer* WiimoteConfigDiag::CreateRealWiimoteSizer() +{ + // "Real wiimotes" controls + wxButton* const refresh_btn = new wxButton(this, -1, _("Refresh")); + refresh_btn->Bind(wxEVT_BUTTON, &WiimoteConfigDiag::RefreshRealWiimotes, this); + + wxStaticBoxSizer* const real_wiimotes_group = new wxStaticBoxSizer(wxVERTICAL, this, _("Real Wiimotes")); + wxBoxSizer* const real_wiimotes_sizer = new wxBoxSizer(wxHORIZONTAL); + + if (!WiimoteReal::g_wiimote_scanner.IsReady()) + real_wiimotes_group->Add(new wxStaticText(this, -1, _("A supported bluetooth device could not be found.\n" + "You must manually connect your wiimotes.")), 0, wxALIGN_CENTER | wxALL, 5); + + wxCheckBox* const continuous_scanning = new wxCheckBox(this, wxID_ANY, _("Continuous Scanning")); + continuous_scanning->Bind(wxEVT_CHECKBOX, &WiimoteConfigDiag::OnContinuousScanning, this); + continuous_scanning->SetValue(SConfig::GetInstance().m_WiimoteContinuousScanning); + + real_wiimotes_sizer->Add(continuous_scanning, 0, wxALIGN_CENTER_VERTICAL); + real_wiimotes_sizer->AddStretchSpacer(1); + real_wiimotes_sizer->Add(refresh_btn, 0, wxALL | wxALIGN_CENTER, 5); + + real_wiimotes_group->Add(real_wiimotes_sizer, 0, wxEXPAND); + + return real_wiimotes_group; +} + +wxStaticBoxSizer* WiimoteConfigDiag::CreateGeneralWiimoteSettingsSizer() +{ + const wxString str[] = { _("Bottom"), _("Top") }; + wxChoice* const WiiSensBarPos = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 2, str); + wxSlider* const WiiSensBarSens = new wxSlider(this, wxID_ANY, 0, 0, 4); + wxSlider* const WiimoteSpkVolume = new wxSlider(this, wxID_ANY, 0, 0, 127); + wxCheckBox* const WiimoteMotor = new wxCheckBox(this, wxID_ANY, _("Wiimote Motor")); + + auto wiimote_speaker = new wxCheckBox(this, wxID_ANY, _("Enable Speaker Data")); + wiimote_speaker->Bind(wxEVT_CHECKBOX, &WiimoteConfigDiag::OnEnableSpeaker, this); + wiimote_speaker->SetValue(SConfig::GetInstance().m_WiimoteEnableSpeaker); + + wxStaticText* const WiiSensBarPosText = new wxStaticText(this, wxID_ANY, _("Sensor Bar Position:")); + wxStaticText* const WiiSensBarSensText = new wxStaticText(this, wxID_ANY, _("IR Sensitivity:")); + wxStaticText* const WiiSensBarSensMinText = new wxStaticText(this, wxID_ANY, _("Min")); + wxStaticText* const WiiSensBarSensMaxText = new wxStaticText(this, wxID_ANY, _("Max")); + wxStaticText* const WiimoteSpkVolumeText = new wxStaticText(this, wxID_ANY, _("Speaker Volume:")); + wxStaticText* const WiimoteSpkVolumeMinText = new wxStaticText(this, wxID_ANY, _("Min")); + wxStaticText* const WiimoteSpkVolumeMaxText = new wxStaticText(this, wxID_ANY, _("Max")); + + // With some GTK themes, no minimum size will be applied - so do this manually here + WiiSensBarSens->SetMinSize(wxSize(100,-1)); + WiimoteSpkVolume->SetMinSize(wxSize(100,-1)); + + // Disable some controls when emulation is running + if (Core::GetState() != Core::CORE_UNINITIALIZED) + { + WiiSensBarPos->Disable(); + WiiSensBarSens->Disable(); + WiimoteSpkVolume->Disable(); + WiimoteMotor->Disable(); + WiiSensBarPosText->Disable(); + WiiSensBarSensText->Disable(); + WiiSensBarSensMinText->Disable(); + WiiSensBarSensMaxText->Disable(); + WiimoteSpkVolumeText->Disable(); + WiimoteSpkVolumeMinText->Disable(); + WiimoteSpkVolumeMaxText->Disable(); + } + + // "General Settings" initialization + WiiSensBarPos->SetSelection(SConfig::GetInstance().m_SYSCONF->GetData("BT.BAR")); + WiiSensBarSens->SetValue(SConfig::GetInstance().m_SYSCONF->GetData("BT.SENS")); + WiimoteSpkVolume->SetValue(SConfig::GetInstance().m_SYSCONF->GetData("BT.SPKV")); + WiimoteMotor->SetValue(SConfig::GetInstance().m_SYSCONF->GetData("BT.MOT")); + + WiiSensBarPos->Bind(wxEVT_CHOICE, &WiimoteConfigDiag::OnSensorBarPos, this); + WiiSensBarSens->Bind(wxEVT_SLIDER, &WiimoteConfigDiag::OnSensorBarSensitivity, this); + WiimoteSpkVolume->Bind(wxEVT_SLIDER, &WiimoteConfigDiag::OnSpeakerVolume, this); + WiimoteMotor->Bind(wxEVT_CHECKBOX, &WiimoteConfigDiag::OnMotor, this); + + // "General Settings" layout + wxStaticBoxSizer* const general_sizer = new wxStaticBoxSizer(wxVERTICAL, this, _("General Settings")); + wxFlexGridSizer* const choice_sizer = new wxFlexGridSizer(2, 5, 5); + + wxBoxSizer* const sensbarsens_sizer = new wxBoxSizer(wxHORIZONTAL); + sensbarsens_sizer->Add(WiiSensBarSensMinText, 0, wxALIGN_CENTER_VERTICAL); + sensbarsens_sizer->Add(WiiSensBarSens); + sensbarsens_sizer->Add(WiiSensBarSensMaxText, 0, wxALIGN_CENTER_VERTICAL); + + wxBoxSizer* const spkvol_sizer = new wxBoxSizer(wxHORIZONTAL); + spkvol_sizer->Add(WiimoteSpkVolumeMinText, 0, wxALIGN_CENTER_VERTICAL); + spkvol_sizer->Add(WiimoteSpkVolume); + spkvol_sizer->Add(WiimoteSpkVolumeMaxText, 0, wxALIGN_CENTER_VERTICAL); + + choice_sizer->Add(WiiSensBarPosText, 0, wxALIGN_CENTER_VERTICAL); + choice_sizer->Add(WiiSensBarPos); + choice_sizer->Add(WiiSensBarSensText, 0, wxALIGN_CENTER_VERTICAL); + choice_sizer->Add(sensbarsens_sizer); + choice_sizer->Add(WiimoteSpkVolumeText, 0, wxALIGN_CENTER_VERTICAL); + choice_sizer->Add(spkvol_sizer); + + wxGridSizer* const general_wiimote_sizer = new wxGridSizer(1, 5, 5); + general_wiimote_sizer->Add(WiimoteMotor); + general_wiimote_sizer->Add(wiimote_speaker, 0); + + general_sizer->Add(choice_sizer); + general_sizer->Add(general_wiimote_sizer); + + return general_sizer; +} + void WiimoteConfigDiag::ConfigEmulatedWiimote(wxCommandEvent& ev) { diff --git a/Source/Core/DolphinWX/WiimoteConfigDiag.h b/Source/Core/DolphinWX/WiimoteConfigDiag.h index 0edd0a2a87..5b6e9195ed 100644 --- a/Source/Core/DolphinWX/WiimoteConfigDiag.h +++ b/Source/Core/DolphinWX/WiimoteConfigDiag.h @@ -61,6 +61,10 @@ public: private: wxStaticBoxSizer* CreateGamecubeSizer(); + wxStaticBoxSizer* CreateWiimoteConfigSizer(); + wxStaticBoxSizer* CreateBalanceBoardSizer(); + wxStaticBoxSizer* CreateRealWiimoteSizer(); + wxStaticBoxSizer* CreateGeneralWiimoteSettingsSizer(); void Cancel(wxCommandEvent& event); InputConfig& m_config; From 1791897815b71d0a53f117d15012955ada8d76d7 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 21 Nov 2014 22:33:46 -0500 Subject: [PATCH 03/11] WiimoteConfigDiag: Fix assertion problems on non-OSX OSes. --- Source/Core/DolphinWX/WiimoteConfigDiag.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/Core/DolphinWX/WiimoteConfigDiag.cpp b/Source/Core/DolphinWX/WiimoteConfigDiag.cpp index 53c2acc910..ee2b5fdc95 100644 --- a/Source/Core/DolphinWX/WiimoteConfigDiag.cpp +++ b/Source/Core/DolphinWX/WiimoteConfigDiag.cpp @@ -73,7 +73,7 @@ wxStaticBoxSizer* WiimoteConfigDiag::CreateGamecubeSizer() for (int i = 0; i < 4; i++) { config_buttons[i] = new wxButton(this, wxID_ANY, _("Configure")); - pad_labels[i] = new wxStaticText(this, wxID_ANY, wxString::Format(_("Pad %i"), i + 1)); + pad_labels[i] = new wxStaticText(this, wxID_ANY, wxString::Format(_("Port %i"), i + 1)); // Only add AM-Baseboard to the first pad. if (i == 0) @@ -82,13 +82,11 @@ wxStaticBoxSizer* WiimoteConfigDiag::CreateGamecubeSizer() pad_type_choices[i] = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, pad_type_strs.size() - 1, pad_type_strs.data()); gamecube_flex_sizer->Add(pad_labels[i], 0, wxALIGN_CENTER_VERTICAL); - gamecube_flex_sizer->AddGrowableCol(0, 1); gamecube_flex_sizer->Add(pad_type_choices[i], 0, wxALIGN_CENTER_VERTICAL); - gamecube_flex_sizer->AddGrowableCol(0, 2); - gamecube_flex_sizer->Add(config_buttons[i], 0, wxALIGN_RIGHT); + gamecube_flex_sizer->Add(config_buttons[i], 0, wxALIGN_CENTER_VERTICAL); } - gamecube_static_sizer->Add(gamecube_flex_sizer, 1, wxEXPAND, 5 ); + gamecube_static_sizer->Add(gamecube_flex_sizer, 1, wxEXPAND, 5); return gamecube_static_sizer; } @@ -152,7 +150,9 @@ wxStaticBoxSizer* WiimoteConfigDiag::CreateWiimoteConfigSizer() wiimote_group->Add(wiimote_control_section, 0, wxEXPAND | wxALL); wiimote_group->AddSpacer(5); wiimote_group->Add(CreateBalanceBoardSizer(), 0, wxEXPAND | wxALL); + wiimote_group->AddSpacer(5); wiimote_group->Add(CreateRealWiimoteSizer(), 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM); + wiimote_group->AddSpacer(5); wiimote_group->Add(CreateGeneralWiimoteSettingsSizer(), 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM); return wiimote_group; From 22c547f6fb7c87feba5482c0da98642ee9dd5e2c Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 21 Nov 2014 22:35:56 -0500 Subject: [PATCH 04/11] WiimoteConfigDiag: Remove trailing whitespace --- Source/Core/DolphinWX/WiimoteConfigDiag.cpp | 56 ++++++++++----------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/Source/Core/DolphinWX/WiimoteConfigDiag.cpp b/Source/Core/DolphinWX/WiimoteConfigDiag.cpp index ee2b5fdc95..7d4b6f2ee4 100644 --- a/Source/Core/DolphinWX/WiimoteConfigDiag.cpp +++ b/Source/Core/DolphinWX/WiimoteConfigDiag.cpp @@ -39,7 +39,7 @@ WiimoteConfigDiag::WiimoteConfigDiag(wxWindow* const parent, InputConfig& config wxBoxSizer* control_sizer = new wxBoxSizer(wxVERTICAL); control_sizer->Add(CreateGamecubeSizer(), 0, wxEXPAND | wxALL, 5); control_sizer->Add(CreateWiimoteConfigSizer(), 0, wxEXPAND | wxALL, 5); - + main_sizer->Add(control_sizer, 0, wxEXPAND); main_sizer->Add(CreateButtonSizer(wxOK | wxCANCEL), 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5); @@ -94,35 +94,35 @@ wxStaticBoxSizer* WiimoteConfigDiag::CreateWiimoteConfigSizer() { wxStaticText* wiimote_label[4]; wxChoice* wiimote_source_ch[4]; - + for (unsigned int i = 0; i < MAX_WIIMOTES; ++i) { wxString wiimote_str = wxString::Format(_("Wiimote %i"), i + 1); - + static const std::array src_choices = {{ _("None"), _("Emulated Wiimote"), _("Real Wiimote"), _("Hybrid Wiimote") }}; - + // reserve four ids, so that we can calculate the index from the ids later on // Stupid wx 2.8 doesn't support reserving sequential IDs, so we need to do that more complicated.. int source_ctrl_id = wxWindow::NewControlId(); m_wiimote_index_from_ctrl_id.insert(std::pair(source_ctrl_id, i)); - + int config_bt_id = wxWindow::NewControlId(); m_wiimote_index_from_conf_bt_id.insert(std::pair(config_bt_id, i)); - + wiimote_label[i] = new wxStaticText(this, wxID_ANY, wiimote_str); wiimote_source_ch[i] = new wxChoice(this, source_ctrl_id, wxDefaultPosition, wxDefaultSize, src_choices.size(), src_choices.data()); wiimote_source_ch[i]->Bind(wxEVT_CHOICE, &WiimoteConfigDiag::SelectSource, this); wiimote_configure_bt[i] = new wxButton(this, config_bt_id, _("Configure")); wiimote_configure_bt[i]->Bind(wxEVT_BUTTON, &WiimoteConfigDiag::ConfigEmulatedWiimote, this); - + m_orig_wiimote_sources[i] = g_wiimote_sources[i]; wiimote_source_ch[i]->Select(m_orig_wiimote_sources[i]); if (m_orig_wiimote_sources[i] != WIIMOTE_SRC_EMU && m_orig_wiimote_sources[i] != WIIMOTE_SRC_HYBRID) wiimote_configure_bt[i]->Disable(); } - + // "Wiimotes" layout wxStaticBoxSizer* const wiimote_group = new wxStaticBoxSizer(wxVERTICAL,this, _("Wiimotes")); wxBoxSizer* const wiimote_control_section = new wxBoxSizer(wxHORIZONTAL); @@ -134,7 +134,7 @@ wxStaticBoxSizer* WiimoteConfigDiag::CreateWiimoteConfigSizer() wiimote_sizer->Add(wiimote_configure_bt[i]); } wiimote_control_section->Add(wiimote_sizer, 1, wxEXPAND, 5 ); - + // TODO: Move to wiimote sizer creation. // Disable some controls when emulation is running if (Core::GetState() != Core::CORE_UNINITIALIZED && NetPlay::IsNetPlayRunning()) @@ -145,7 +145,7 @@ wxStaticBoxSizer* WiimoteConfigDiag::CreateWiimoteConfigSizer() wiimote_source_ch[i]->Disable(); } } - + // Combine all wiimote UI. wiimote_group->Add(wiimote_control_section, 0, wxEXPAND | wxALL); wiimote_group->AddSpacer(5); @@ -172,12 +172,12 @@ wxStaticBoxSizer* WiimoteConfigDiag::CreateBalanceBoardSizer() wxChoice* const bb_source = new wxChoice(this, source_ctrl_id, wxDefaultPosition, wxDefaultSize, src_choices.size(), src_choices.data()); bb_source->Bind(wxEVT_CHOICE, &WiimoteConfigDiag::SelectSource, this); - + m_orig_wiimote_sources[WIIMOTE_BALANCE_BOARD] = g_wiimote_sources[WIIMOTE_BALANCE_BOARD]; bb_source->Select(m_orig_wiimote_sources[WIIMOTE_BALANCE_BOARD] ? 1 : 0); - + bb_sizer->Add(bb_source, 0, wxALIGN_CENTER_VERTICAL); - + bb_group->Add(bb_sizer, 1, wxEXPAND, 5); // Disable when emulation is running. @@ -192,22 +192,22 @@ wxStaticBoxSizer* WiimoteConfigDiag::CreateRealWiimoteSizer() // "Real wiimotes" controls wxButton* const refresh_btn = new wxButton(this, -1, _("Refresh")); refresh_btn->Bind(wxEVT_BUTTON, &WiimoteConfigDiag::RefreshRealWiimotes, this); - + wxStaticBoxSizer* const real_wiimotes_group = new wxStaticBoxSizer(wxVERTICAL, this, _("Real Wiimotes")); wxBoxSizer* const real_wiimotes_sizer = new wxBoxSizer(wxHORIZONTAL); - + if (!WiimoteReal::g_wiimote_scanner.IsReady()) real_wiimotes_group->Add(new wxStaticText(this, -1, _("A supported bluetooth device could not be found.\n" "You must manually connect your wiimotes.")), 0, wxALIGN_CENTER | wxALL, 5); - + wxCheckBox* const continuous_scanning = new wxCheckBox(this, wxID_ANY, _("Continuous Scanning")); continuous_scanning->Bind(wxEVT_CHECKBOX, &WiimoteConfigDiag::OnContinuousScanning, this); continuous_scanning->SetValue(SConfig::GetInstance().m_WiimoteContinuousScanning); - + real_wiimotes_sizer->Add(continuous_scanning, 0, wxALIGN_CENTER_VERTICAL); real_wiimotes_sizer->AddStretchSpacer(1); real_wiimotes_sizer->Add(refresh_btn, 0, wxALL | wxALIGN_CENTER, 5); - + real_wiimotes_group->Add(real_wiimotes_sizer, 0, wxEXPAND); return real_wiimotes_group; @@ -220,11 +220,11 @@ wxStaticBoxSizer* WiimoteConfigDiag::CreateGeneralWiimoteSettingsSizer() wxSlider* const WiiSensBarSens = new wxSlider(this, wxID_ANY, 0, 0, 4); wxSlider* const WiimoteSpkVolume = new wxSlider(this, wxID_ANY, 0, 0, 127); wxCheckBox* const WiimoteMotor = new wxCheckBox(this, wxID_ANY, _("Wiimote Motor")); - + auto wiimote_speaker = new wxCheckBox(this, wxID_ANY, _("Enable Speaker Data")); wiimote_speaker->Bind(wxEVT_CHECKBOX, &WiimoteConfigDiag::OnEnableSpeaker, this); wiimote_speaker->SetValue(SConfig::GetInstance().m_WiimoteEnableSpeaker); - + wxStaticText* const WiiSensBarPosText = new wxStaticText(this, wxID_ANY, _("Sensor Bar Position:")); wxStaticText* const WiiSensBarSensText = new wxStaticText(this, wxID_ANY, _("IR Sensitivity:")); wxStaticText* const WiiSensBarSensMinText = new wxStaticText(this, wxID_ANY, _("Min")); @@ -232,7 +232,7 @@ wxStaticBoxSizer* WiimoteConfigDiag::CreateGeneralWiimoteSettingsSizer() wxStaticText* const WiimoteSpkVolumeText = new wxStaticText(this, wxID_ANY, _("Speaker Volume:")); wxStaticText* const WiimoteSpkVolumeMinText = new wxStaticText(this, wxID_ANY, _("Min")); wxStaticText* const WiimoteSpkVolumeMaxText = new wxStaticText(this, wxID_ANY, _("Max")); - + // With some GTK themes, no minimum size will be applied - so do this manually here WiiSensBarSens->SetMinSize(wxSize(100,-1)); WiimoteSpkVolume->SetMinSize(wxSize(100,-1)); @@ -252,13 +252,13 @@ wxStaticBoxSizer* WiimoteConfigDiag::CreateGeneralWiimoteSettingsSizer() WiimoteSpkVolumeMinText->Disable(); WiimoteSpkVolumeMaxText->Disable(); } - + // "General Settings" initialization WiiSensBarPos->SetSelection(SConfig::GetInstance().m_SYSCONF->GetData("BT.BAR")); WiiSensBarSens->SetValue(SConfig::GetInstance().m_SYSCONF->GetData("BT.SENS")); WiimoteSpkVolume->SetValue(SConfig::GetInstance().m_SYSCONF->GetData("BT.SPKV")); WiimoteMotor->SetValue(SConfig::GetInstance().m_SYSCONF->GetData("BT.MOT")); - + WiiSensBarPos->Bind(wxEVT_CHOICE, &WiimoteConfigDiag::OnSensorBarPos, this); WiiSensBarSens->Bind(wxEVT_SLIDER, &WiimoteConfigDiag::OnSensorBarSensitivity, this); WiimoteSpkVolume->Bind(wxEVT_SLIDER, &WiimoteConfigDiag::OnSpeakerVolume, this); @@ -267,28 +267,28 @@ wxStaticBoxSizer* WiimoteConfigDiag::CreateGeneralWiimoteSettingsSizer() // "General Settings" layout wxStaticBoxSizer* const general_sizer = new wxStaticBoxSizer(wxVERTICAL, this, _("General Settings")); wxFlexGridSizer* const choice_sizer = new wxFlexGridSizer(2, 5, 5); - + wxBoxSizer* const sensbarsens_sizer = new wxBoxSizer(wxHORIZONTAL); sensbarsens_sizer->Add(WiiSensBarSensMinText, 0, wxALIGN_CENTER_VERTICAL); sensbarsens_sizer->Add(WiiSensBarSens); sensbarsens_sizer->Add(WiiSensBarSensMaxText, 0, wxALIGN_CENTER_VERTICAL); - + wxBoxSizer* const spkvol_sizer = new wxBoxSizer(wxHORIZONTAL); spkvol_sizer->Add(WiimoteSpkVolumeMinText, 0, wxALIGN_CENTER_VERTICAL); spkvol_sizer->Add(WiimoteSpkVolume); spkvol_sizer->Add(WiimoteSpkVolumeMaxText, 0, wxALIGN_CENTER_VERTICAL); - + choice_sizer->Add(WiiSensBarPosText, 0, wxALIGN_CENTER_VERTICAL); choice_sizer->Add(WiiSensBarPos); choice_sizer->Add(WiiSensBarSensText, 0, wxALIGN_CENTER_VERTICAL); choice_sizer->Add(sensbarsens_sizer); choice_sizer->Add(WiimoteSpkVolumeText, 0, wxALIGN_CENTER_VERTICAL); choice_sizer->Add(spkvol_sizer); - + wxGridSizer* const general_wiimote_sizer = new wxGridSizer(1, 5, 5); general_wiimote_sizer->Add(WiimoteMotor); general_wiimote_sizer->Add(wiimote_speaker, 0); - + general_sizer->Add(choice_sizer); general_sizer->Add(general_wiimote_sizer); From 00dcaba37d66e0cd80442b9e4956e7d986f34a9b Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 21 Nov 2014 23:10:13 -0500 Subject: [PATCH 05/11] WiimoteConfigDiag: Size the config buttons correctly --- Source/Core/DolphinWX/WiimoteConfigDiag.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/DolphinWX/WiimoteConfigDiag.cpp b/Source/Core/DolphinWX/WiimoteConfigDiag.cpp index 7d4b6f2ee4..96e1e98017 100644 --- a/Source/Core/DolphinWX/WiimoteConfigDiag.cpp +++ b/Source/Core/DolphinWX/WiimoteConfigDiag.cpp @@ -72,7 +72,7 @@ wxStaticBoxSizer* WiimoteConfigDiag::CreateGamecubeSizer() for (int i = 0; i < 4; i++) { - config_buttons[i] = new wxButton(this, wxID_ANY, _("Configure")); + config_buttons[i] = new wxButton(this, wxID_ANY, _("Configure"), wxDefaultPosition, wxSize(100, 25)); pad_labels[i] = new wxStaticText(this, wxID_ANY, wxString::Format(_("Port %i"), i + 1)); // Only add AM-Baseboard to the first pad. @@ -83,7 +83,7 @@ wxStaticBoxSizer* WiimoteConfigDiag::CreateGamecubeSizer() gamecube_flex_sizer->Add(pad_labels[i], 0, wxALIGN_CENTER_VERTICAL); gamecube_flex_sizer->Add(pad_type_choices[i], 0, wxALIGN_CENTER_VERTICAL); - gamecube_flex_sizer->Add(config_buttons[i], 0, wxALIGN_CENTER_VERTICAL); + gamecube_flex_sizer->Add(config_buttons[i], 1, wxEXPAND); } gamecube_static_sizer->Add(gamecube_flex_sizer, 1, wxEXPAND, 5); From e801fcead90b3044b76a79fdbc456cea15cfd3c0 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 22 Nov 2014 15:29:13 -0500 Subject: [PATCH 06/11] WiimoteConfigDiag: Unify controller menu with the GameCube controllers. --- Source/Core/DolphinWX/ConfigMain.cpp | 114 -------------- Source/Core/DolphinWX/ConfigMain.h | 8 - Source/Core/DolphinWX/Frame.cpp | 3 +- Source/Core/DolphinWX/Frame.h | 6 +- Source/Core/DolphinWX/FrameTools.cpp | 82 ++-------- Source/Core/DolphinWX/Globals.h | 3 +- Source/Core/DolphinWX/WiimoteConfigDiag.cpp | 160 +++++++++++++++++--- Source/Core/DolphinWX/WiimoteConfigDiag.h | 12 +- 8 files changed, 171 insertions(+), 217 deletions(-) diff --git a/Source/Core/DolphinWX/ConfigMain.cpp b/Source/Core/DolphinWX/ConfigMain.cpp index 96c29f2d87..d213a7cbda 100644 --- a/Source/Core/DolphinWX/ConfigMain.cpp +++ b/Source/Core/DolphinWX/ConfigMain.cpp @@ -107,13 +107,6 @@ static const wxLanguage langIds[] = #define DEV_NONE_STR _trans("") #define DEV_DUMMY_STR _trans("Dummy") -#define SIDEV_STDCONT_STR _trans("Standard Controller") -#define SIDEV_STEERING_STR _trans("Steering Wheel") -#define SIDEV_DANCEMAT_STR _trans("Dance Mat") -#define SIDEV_BONGO_STR _trans("TaruKonga (Bongos)") -#define SIDEV_GBA_STR "GBA" -#define SIDEV_AM_BB_STR _trans("AM-Baseboard") - #define EXIDEV_MEMCARD_STR _trans("Memory Card") #define EXIDEV_MEMDIR_STR _trans("GCI Folder") #define EXIDEV_MIC_STR _trans("Mic") @@ -165,11 +158,6 @@ EVT_BUTTON(ID_GC_EXIDEVICE_SLOTA_PATH, CConfigMain::GCSettingsChanged) EVT_CHOICE(ID_GC_EXIDEVICE_SLOTB, CConfigMain::GCSettingsChanged) EVT_BUTTON(ID_GC_EXIDEVICE_SLOTB_PATH, CConfigMain::GCSettingsChanged) EVT_CHOICE(ID_GC_EXIDEVICE_SP1, CConfigMain::GCSettingsChanged) -EVT_CHOICE(ID_GC_SIDEVICE0, CConfigMain::GCSettingsChanged) -EVT_CHOICE(ID_GC_SIDEVICE1, CConfigMain::GCSettingsChanged) -EVT_CHOICE(ID_GC_SIDEVICE2, CConfigMain::GCSettingsChanged) -EVT_CHOICE(ID_GC_SIDEVICE3, CConfigMain::GCSettingsChanged) - EVT_CHECKBOX(ID_WII_IPL_SSV, CConfigMain::WiiSettingsChanged) EVT_CHECKBOX(ID_WII_IPL_E60, CConfigMain::WiiSettingsChanged) @@ -404,14 +392,6 @@ void CConfigMain::InitializeGUIValues() 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_STEERING_STR)); - SIDevices.Add(_(SIDEV_DANCEMAT_STR)); - SIDevices.Add(_(SIDEV_BONGO_STR)); - SIDevices.Add(_(SIDEV_GBA_STR)); - SIDevices.Add(_(SIDEV_AM_BB_STR)); for (int i = 0; i < 3; ++i) { @@ -454,39 +434,6 @@ void CConfigMain::InitializeGUIValues() 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 SIDEVICE_GC_CONTROLLER: - GCSIDevice[i]->SetStringSelection(SIDevices[1]); - break; - case SIDEVICE_GC_STEERING: - GCSIDevice[i]->SetStringSelection(SIDevices[2]); - break; - case SIDEVICE_DANCEMAT: - GCSIDevice[i]->SetStringSelection(SIDevices[3]); - break; - case SIDEVICE_GC_TARUKONGA: - GCSIDevice[i]->SetStringSelection(SIDevices[4]); - break; - case SIDEVICE_GC_GBA: - GCSIDevice[i]->SetStringSelection(SIDevices[5]); - break; - case SIDEVICE_AM_BASEBOARD: - GCSIDevice[i]->SetStringSelection(SIDevices[6]); - 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 - Misc WiiScreenSaver->SetValue(!!SConfig::GetInstance().m_SYSCONF->GetData("IPL.SSV")); @@ -729,17 +676,6 @@ void CConfigMain::CreateGUIControls() GCMemcardPath[1] = new wxButton(GamecubePage, ID_GC_EXIDEVICE_SLOTB_PATH, "...", wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT); - //SI Devices - wxStaticText* GCSIDeviceText[4]; - GCSIDeviceText[0] = TEXT_BOX(GamecubePage, _("Port 1")); - 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); - // Populate the GameCube page sGamecubeIPLSettings = new wxGridBagSizer(); sGamecubeIPLSettings->Add(GCAlwaysHLE_BS2, wxGBPosition(0, 0), wxGBSpan(1, 2), wxALL, 5); @@ -761,24 +697,11 @@ void CConfigMain::CreateGUIControls() } sbGamecubeDeviceSettings->Add(sbGamecubeEXIDevSettings, 0, wxALL, 5); - wxFlexGridSizer* sbGamecubeDevSettings = new wxFlexGridSizer(2, 10, 10); - for (int i = 0; i < 4; ++i) - { - sbGamecubeDevSettings->Add(GCSIDeviceText[i], 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 0); - sbGamecubeDevSettings->Add(GCSIDevice[i], 1, wxEXPAND|wxLEFT|wxRIGHT|wxBOTTOM, 0); - if (NetPlay::IsNetPlayRunning() || Movie::IsMovieActive()) - { - GCSIDevice[i]->Disable(); - } - } - sbGamecubeDeviceSettings->Add(sbGamecubeDevSettings, 0, wxALL, 5); - sGamecubePage = new wxBoxSizer(wxVERTICAL); sGamecubePage->Add(sbGamecubeIPLSettings, 0, wxEXPAND|wxALL, 5); sGamecubePage->Add(sbGamecubeDeviceSettings, 0, wxEXPAND|wxALL, 5); GamecubePage->SetSizer(sGamecubePage); - // Wii page // Misc Settings WiiScreenSaver = new wxCheckBox(WiiPage, ID_WII_IPL_SSV, _("Enable Screen Saver")); @@ -1026,7 +949,6 @@ bool CConfigMain::SupportsVolumeChanges(std::string backend) // ----------------------- void CConfigMain::GCSettingsChanged(wxCommandEvent& event) { - int sidevice = 0; int exidevice = 0; switch (event.GetId()) { @@ -1053,15 +975,6 @@ void CConfigMain::GCSettingsChanged(wxCommandEvent& event) case ID_GC_EXIDEVICE_SLOTB_PATH: ChooseMemcardPath(SConfig::GetInstance().m_strMemoryCardB, false); break; - case ID_GC_SIDEVICE3: - sidevice++; - case ID_GC_SIDEVICE2: - sidevice++; - case ID_GC_SIDEVICE1: - sidevice++; - case ID_GC_SIDEVICE0: - ChooseSIDevice(event.GetString(), sidevice); - break; } } @@ -1123,33 +1036,6 @@ void CConfigMain::ChooseMemcardPath(std::string& strMemcard, bool isSlotA) } } -void CConfigMain::ChooseSIDevice(wxString deviceName, int deviceNum) -{ - SIDevices tempType; - if (!deviceName.compare(_(SIDEV_STDCONT_STR))) - tempType = SIDEVICE_GC_CONTROLLER; - else if (!deviceName.compare(_(SIDEV_STEERING_STR))) - tempType = SIDEVICE_GC_STEERING; - else if (!deviceName.compare(_(SIDEV_DANCEMAT_STR))) - tempType = SIDEVICE_DANCEMAT; - else if (!deviceName.compare(_(SIDEV_BONGO_STR))) - tempType = SIDEVICE_GC_TARUKONGA; - else if (!deviceName.compare(SIDEV_GBA_STR)) - tempType = SIDEVICE_GC_GBA; - else if (!deviceName.compare(_(SIDEV_AM_BB_STR))) - tempType = SIDEVICE_AM_BASEBOARD; - else - tempType = SIDEVICE_NONE; - - SConfig::GetInstance().m_SIDevice[deviceNum] = tempType; - - if (Core::IsRunning()) - { - // Change plugged device! :D - SerialInterface::ChangeDevice(tempType, deviceNum); - } -} - void CConfigMain::ChooseEXIDevice(wxString deviceName, int deviceNum) { TEXIDevices tempType; diff --git a/Source/Core/DolphinWX/ConfigMain.h b/Source/Core/DolphinWX/ConfigMain.h index bf447b0ace..16341dedce 100644 --- a/Source/Core/DolphinWX/ConfigMain.h +++ b/Source/Core/DolphinWX/ConfigMain.h @@ -108,11 +108,6 @@ private: ID_GC_EXIDEVICE_SLOTB, ID_GC_EXIDEVICE_SLOTB_PATH, ID_GC_EXIDEVICE_SP1, - ID_GC_SIDEVICE0, - ID_GC_SIDEVICE1, - ID_GC_SIDEVICE2, - ID_GC_SIDEVICE3, - ID_WII_IPL_SSV, ID_WII_IPL_E60, @@ -186,8 +181,6 @@ private: // Device wxChoice* GCEXIDevice[3]; wxButton* GCMemcardPath[2]; - wxChoice* GCSIDevice[4]; - wxBoxSizer* sWiiPage; // Wii settings wxStaticBoxSizer* /*sbWiimoteSettings, **/sbWiiIPLSettings, *sbWiiDeviceSettings; // Wiimote, Misc and Device sections @@ -257,7 +250,6 @@ private: void GCSettingsChanged(wxCommandEvent& event); void ChooseMemcardPath(std::string& strMemcard, bool isSlotA); - void ChooseSIDevice(wxString deviceName, int deviceNum); void ChooseEXIDevice(wxString deviceName, int deviceNum); void WiiSettingsChanged(wxCommandEvent& event); diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp index 96752dfbcc..8785fa93df 100644 --- a/Source/Core/DolphinWX/Frame.cpp +++ b/Source/Core/DolphinWX/Frame.cpp @@ -260,8 +260,7 @@ EVT_MENU(IDM_TOGGLE_DUMPAUDIO, CFrame::OnToggleDumpAudio) EVT_MENU(wxID_PREFERENCES, CFrame::OnConfigMain) EVT_MENU(IDM_CONFIG_GFX_BACKEND, CFrame::OnConfigGFX) EVT_MENU(IDM_CONFIG_DSP_EMULATOR, CFrame::OnConfigDSP) -EVT_MENU(IDM_CONFIG_PAD_PLUGIN, CFrame::OnConfigPAD) -EVT_MENU(IDM_CONFIG_WIIMOTE_PLUGIN, CFrame::OnConfigWiimote) +EVT_MENU(IDM_CONFIG_CONTROLLERS, CFrame::OnConfigControllers) EVT_MENU(IDM_CONFIG_HOTKEYS, CFrame::OnConfigHotkey) EVT_MENU(IDM_SAVE_PERSPECTIVE, CFrame::OnPerspectiveMenu) diff --git a/Source/Core/DolphinWX/Frame.h b/Source/Core/DolphinWX/Frame.h index 29b3eeb21d..4ce8e39fd2 100644 --- a/Source/Core/DolphinWX/Frame.h +++ b/Source/Core/DolphinWX/Frame.h @@ -190,8 +190,7 @@ private: Toolbar_ConfigMain, Toolbar_ConfigGFX, Toolbar_ConfigDSP, - Toolbar_ConfigPAD, - Toolbar_Wiimote, + Toolbar_Controller, EToolbar_Max }; @@ -293,8 +292,7 @@ private: void OnConfigMain(wxCommandEvent& event); // Options void OnConfigGFX(wxCommandEvent& event); void OnConfigDSP(wxCommandEvent& event); - void OnConfigPAD(wxCommandEvent& event); - void OnConfigWiimote(wxCommandEvent& event); + void OnConfigControllers(wxCommandEvent& event); void OnConfigHotkey(wxCommandEvent& event); void OnToggleFullscreen(wxCommandEvent& event); diff --git a/Source/Core/DolphinWX/FrameTools.cpp b/Source/Core/DolphinWX/FrameTools.cpp index b9aa252275..0f49aeab0e 100644 --- a/Source/Core/DolphinWX/FrameTools.cpp +++ b/Source/Core/DolphinWX/FrameTools.cpp @@ -236,8 +236,7 @@ wxMenuBar* CFrame::CreateMenu() pOptionsMenu->AppendSeparator(); pOptionsMenu->Append(IDM_CONFIG_GFX_BACKEND, _("&Graphics Settings")); pOptionsMenu->Append(IDM_CONFIG_DSP_EMULATOR, _("&DSP Settings")); - pOptionsMenu->Append(IDM_CONFIG_PAD_PLUGIN, _("GameCube &Pad Settings")); - pOptionsMenu->Append(IDM_CONFIG_WIIMOTE_PLUGIN, _("&Wiimote Settings")); + pOptionsMenu->Append(IDM_CONFIG_CONTROLLERS, _("&Controller Settings")); pOptionsMenu->Append(IDM_CONFIG_HOTKEYS, _("&Hotkey Settings")); if (g_pCodeWindow) { @@ -560,20 +559,19 @@ void CFrame::PopulateToolbar(wxToolBar* ToolBar) ToolBar->SetToolBitmapSize(wxSize(w, h)); - WxUtils::AddToolbarButton(ToolBar, wxID_OPEN, _("Open"), m_Bitmaps[Toolbar_FileOpen], _("Open file...")); - WxUtils::AddToolbarButton(ToolBar, wxID_REFRESH, _("Refresh"), m_Bitmaps[Toolbar_Refresh], _("Refresh game list")); - WxUtils::AddToolbarButton(ToolBar, IDM_BROWSE, _("Browse"), m_Bitmaps[Toolbar_Browse], _("Browse for an ISO directory...")); + WxUtils::AddToolbarButton(ToolBar, wxID_OPEN, _("Open"), m_Bitmaps[Toolbar_FileOpen], _("Open file...")); + WxUtils::AddToolbarButton(ToolBar, wxID_REFRESH, _("Refresh"), m_Bitmaps[Toolbar_Refresh], _("Refresh game list")); + WxUtils::AddToolbarButton(ToolBar, IDM_BROWSE, _("Browse"), m_Bitmaps[Toolbar_Browse], _("Browse for an ISO directory...")); ToolBar->AddSeparator(); - WxUtils::AddToolbarButton(ToolBar, IDM_PLAY, _("Play"), m_Bitmaps[Toolbar_Play], _("Play")); - WxUtils::AddToolbarButton(ToolBar, IDM_STOP, _("Stop"), m_Bitmaps[Toolbar_Stop], _("Stop")); - WxUtils::AddToolbarButton(ToolBar, IDM_TOGGLE_FULLSCREEN, _("FullScr"), m_Bitmaps[Toolbar_FullScreen], _("Toggle Fullscreen")); - WxUtils::AddToolbarButton(ToolBar, IDM_SCREENSHOT, _("ScrShot"), m_Bitmaps[Toolbar_Screenshot], _("Take Screenshot")); + WxUtils::AddToolbarButton(ToolBar, IDM_PLAY, _("Play"), m_Bitmaps[Toolbar_Play], _("Play")); + WxUtils::AddToolbarButton(ToolBar, IDM_STOP, _("Stop"), m_Bitmaps[Toolbar_Stop], _("Stop")); + WxUtils::AddToolbarButton(ToolBar, IDM_TOGGLE_FULLSCREEN, _("FullScr"), m_Bitmaps[Toolbar_FullScreen], _("Toggle Fullscreen")); + WxUtils::AddToolbarButton(ToolBar, IDM_SCREENSHOT, _("ScrShot"), m_Bitmaps[Toolbar_Screenshot], _("Take Screenshot")); ToolBar->AddSeparator(); - WxUtils::AddToolbarButton(ToolBar, wxID_PREFERENCES, _("Config"), m_Bitmaps[Toolbar_ConfigMain], _("Configure...")); - WxUtils::AddToolbarButton(ToolBar, IDM_CONFIG_GFX_BACKEND, _("Graphics"), m_Bitmaps[Toolbar_ConfigGFX], _("Graphics settings")); - WxUtils::AddToolbarButton(ToolBar, IDM_CONFIG_DSP_EMULATOR, _("DSP"), m_Bitmaps[Toolbar_ConfigDSP], _("DSP settings")); - WxUtils::AddToolbarButton(ToolBar, IDM_CONFIG_PAD_PLUGIN, _("GCPad"), m_Bitmaps[Toolbar_ConfigPAD], _("GameCube Pad settings")); - WxUtils::AddToolbarButton(ToolBar, IDM_CONFIG_WIIMOTE_PLUGIN, _("Wiimote"), m_Bitmaps[Toolbar_Wiimote], _("Wiimote settings")); + WxUtils::AddToolbarButton(ToolBar, wxID_PREFERENCES, _("Config"), m_Bitmaps[Toolbar_ConfigMain], _("Configure...")); + WxUtils::AddToolbarButton(ToolBar, IDM_CONFIG_GFX_BACKEND, _("Graphics"), m_Bitmaps[Toolbar_ConfigGFX], _("Graphics settings")); + WxUtils::AddToolbarButton(ToolBar, IDM_CONFIG_DSP_EMULATOR, _("DSP"), m_Bitmaps[Toolbar_ConfigDSP], _("DSP settings")); + WxUtils::AddToolbarButton(ToolBar, IDM_CONFIG_CONTROLLERS, _("Controllers"), m_Bitmaps[Toolbar_Controller], _("Controller settings")); } @@ -617,8 +615,7 @@ void CFrame::InitBitmaps() m_Bitmaps[Toolbar_ConfigMain].LoadFile(dir + "config.png", wxBITMAP_TYPE_PNG); m_Bitmaps[Toolbar_ConfigGFX ].LoadFile(dir + "graphics.png", wxBITMAP_TYPE_PNG); m_Bitmaps[Toolbar_ConfigDSP ].LoadFile(dir + "dsp.png", wxBITMAP_TYPE_PNG); - m_Bitmaps[Toolbar_ConfigPAD ].LoadFile(dir + "gcpad.png", wxBITMAP_TYPE_PNG); - m_Bitmaps[Toolbar_Wiimote ].LoadFile(dir + "wiimote.png", wxBITMAP_TYPE_PNG); + m_Bitmaps[Toolbar_Controller].LoadFile(dir + "wiimote.png", wxBITMAP_TYPE_PNG); m_Bitmaps[Toolbar_Screenshot].LoadFile(dir + "screenshot.png", wxBITMAP_TYPE_PNG); m_Bitmaps[Toolbar_FullScreen].LoadFile(dir + "fullscreen.png", wxBITMAP_TYPE_PNG); @@ -1346,56 +1343,11 @@ void CFrame::OnConfigDSP(wxCommandEvent& WXUNUSED (event)) m_GameListCtrl->Update(); } -void CFrame::OnConfigPAD(wxCommandEvent& WXUNUSED (event)) +void CFrame::OnConfigControllers(wxCommandEvent& WXUNUSED (event)) { - InputConfig* const pad_plugin = Pad::GetConfig(); - bool was_init = false; - if (g_controller_interface.IsInit()) // check if game is running - { - was_init = true; - } - else - { -#if defined(HAVE_X11) && HAVE_X11 - Window win = X11Utils::XWindowFromHandle(GetHandle()); - Pad::Initialize(reinterpret_cast(win)); -#else - Pad::Initialize(reinterpret_cast(GetHandle())); -#endif - } - InputConfigDialog m_ConfigFrame(this, *pad_plugin, _trans("Dolphin GCPad Configuration")); + WiimoteConfigDiag m_ConfigFrame(this); m_ConfigFrame.ShowModal(); m_ConfigFrame.Destroy(); - if (!was_init) // if game isn't running - { - Pad::Shutdown(); - } -} - -void CFrame::OnConfigWiimote(wxCommandEvent& WXUNUSED (event)) -{ - InputConfig* const wiimote_plugin = Wiimote::GetConfig(); - bool was_init = false; - if (g_controller_interface.IsInit()) // check if game is running - { - was_init = true; - } - else - { -#if defined(HAVE_X11) && HAVE_X11 - Window win = X11Utils::XWindowFromHandle(GetHandle()); - Wiimote::Initialize(reinterpret_cast(win)); -#else - Wiimote::Initialize(reinterpret_cast(GetHandle())); -#endif - } - WiimoteConfigDiag m_ConfigFrame(this, *wiimote_plugin); - m_ConfigFrame.ShowModal(); - m_ConfigFrame.Destroy(); - if (!was_init) // if game isn't running - { - Wiimote::Shutdown(); - } } void CFrame::OnConfigHotkey(wxCommandEvent& WXUNUSED (event)) @@ -1759,8 +1711,6 @@ void CFrame::UpdateGUI() m_ToolBar->EnableTool(IDM_STOP, Running || Paused); m_ToolBar->EnableTool(IDM_TOGGLE_FULLSCREEN, Running || Paused); m_ToolBar->EnableTool(IDM_SCREENSHOT, Running || Paused); - // Don't allow wiimote config while in GameCube mode - m_ToolBar->EnableTool(IDM_CONFIG_WIIMOTE_PLUGIN, !RunningGamecube); } // File @@ -1803,7 +1753,7 @@ void CFrame::UpdateGUI() GetMenuBar()->FindItem(IDM_CONNECT_WIIMOTE3)->Enable(RunningWii); GetMenuBar()->FindItem(IDM_CONNECT_WIIMOTE4)->Enable(RunningWii); GetMenuBar()->FindItem(IDM_CONNECT_BALANCEBOARD)->Enable(RunningWii); - GetMenuBar()->FindItem(IDM_CONFIG_WIIMOTE_PLUGIN)->Enable(!RunningGamecube); + GetMenuBar()->FindItem(IDM_CONFIG_CONTROLLERS)->Enable(!RunningGamecube); if (RunningWii) { GetMenuBar()->FindItem(IDM_CONNECT_WIIMOTE1)->Check(GetUsbPointer()-> diff --git a/Source/Core/DolphinWX/Globals.h b/Source/Core/DolphinWX/Globals.h index edbd89bf6a..42ae34b87a 100644 --- a/Source/Core/DolphinWX/Globals.h +++ b/Source/Core/DolphinWX/Globals.h @@ -147,8 +147,7 @@ enum IDM_CONFIG_GFX_BACKEND, IDM_CONFIG_DSP_EMULATOR, - IDM_CONFIG_PAD_PLUGIN, - IDM_CONFIG_WIIMOTE_PLUGIN, + IDM_CONFIG_CONTROLLERS, IDM_CONFIG_HOTKEYS, IDM_CONFIG_LOGGER, diff --git a/Source/Core/DolphinWX/WiimoteConfigDiag.cpp b/Source/Core/DolphinWX/WiimoteConfigDiag.cpp index 96e1e98017..9965444fd1 100644 --- a/Source/Core/DolphinWX/WiimoteConfigDiag.cpp +++ b/Source/Core/DolphinWX/WiimoteConfigDiag.cpp @@ -24,14 +24,29 @@ #include "Core/ConfigManager.h" #include "Core/Core.h" #include "Core/NetPlayProto.h" +#include "Core/HW/GCPad.h" +#include "Core/HW/SI.h" #include "Core/HW/Wiimote.h" #include "Core/HW/WiimoteReal/WiimoteReal.h" #include "DolphinWX/InputConfigDiag.h" #include "DolphinWX/WiimoteConfigDiag.h" -WiimoteConfigDiag::WiimoteConfigDiag(wxWindow* const parent, InputConfig& config) +#if defined(HAVE_XRANDR) && HAVE_XRANDR +#include "VideoBackends/OGL/GLInterface/X11Utils.h" +#endif + +const std::array WiimoteConfigDiag::m_gc_pad_type_strs = {{ + _("None"), + _("Standard Controller"), + _("Steering Wheel"), + _("Dance Mat"), + _("TaruKonga (Bongos)"), + _("GBA"), + _("AM-Baseboard") +}}; + +WiimoteConfigDiag::WiimoteConfigDiag(wxWindow* const parent) : wxDialog(parent, -1, _("Dolphin Wiimote Configuration")) - , m_config(config) { wxBoxSizer* const main_sizer = new wxBoxSizer(wxVERTICAL); @@ -55,16 +70,6 @@ wxStaticBoxSizer* WiimoteConfigDiag::CreateGamecubeSizer() wxStaticBoxSizer* const gamecube_static_sizer = new wxStaticBoxSizer(wxHORIZONTAL, this, _("GameCube Controllers")); wxFlexGridSizer* const gamecube_flex_sizer = new wxFlexGridSizer(3, 5, 5); - static const std::array pad_type_strs = {{ - _("None"), - _("Standard Controller"), - _("Steering Wheel"), - _("Dance Mat"), - _("TaruKonga (Bongos)"), - _("GBA"), - _("AM-Baseboard") - }}; - wxStaticText* pad_labels[4]; wxChoice* pad_type_choices[4]; wxButton* config_buttons[4]; @@ -72,15 +77,53 @@ wxStaticBoxSizer* WiimoteConfigDiag::CreateGamecubeSizer() for (int i = 0; i < 4; i++) { - config_buttons[i] = new wxButton(this, wxID_ANY, _("Configure"), wxDefaultPosition, wxSize(100, 25)); pad_labels[i] = new wxStaticText(this, wxID_ANY, wxString::Format(_("Port %i"), i + 1)); + // Create an ID for the config button. + const wxWindowID button_id = wxWindow::NewControlId(); + m_gc_port_config_ids.insert(std::make_pair(button_id, i)); + config_buttons[i] = new wxButton(this, button_id, _("Configure"), wxDefaultPosition, wxSize(100, 25)); + config_buttons[i]->Bind(wxEVT_BUTTON, &WiimoteConfigDiag::OnGameCubeConfigButton, this); + + // Create a control ID for the choice boxes on the fly. + const wxWindowID choice_id = wxWindow::NewControlId(); + m_gc_port_choice_ids.insert(std::make_pair(choice_id, i)); + // Only add AM-Baseboard to the first pad. if (i == 0) - pad_type_choices[i] = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, pad_type_strs.size(), pad_type_strs.data()); + pad_type_choices[i] = new wxChoice(this, choice_id, wxDefaultPosition, wxDefaultSize, m_gc_pad_type_strs.size(), m_gc_pad_type_strs.data()); else - pad_type_choices[i] = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, pad_type_strs.size() - 1, pad_type_strs.data()); + pad_type_choices[i] = new wxChoice(this, choice_id, wxDefaultPosition, wxDefaultSize, m_gc_pad_type_strs.size() - 1, m_gc_pad_type_strs.data()); + pad_type_choices[i]->Bind(wxEVT_CHOICE, &WiimoteConfigDiag::OnGameCubePortChanged, this); + + // Set the saved pad type as the default choice. + switch (SConfig::GetInstance().m_SIDevice[i]) + { + case SIDEVICE_GC_CONTROLLER: + pad_type_choices[i]->SetStringSelection(m_gc_pad_type_strs[1]); + break; + case SIDEVICE_GC_STEERING: + pad_type_choices[i]->SetStringSelection(m_gc_pad_type_strs[2]); + break; + case SIDEVICE_DANCEMAT: + pad_type_choices[i]->SetStringSelection(m_gc_pad_type_strs[3]); + break; + case SIDEVICE_GC_TARUKONGA: + pad_type_choices[i]->SetStringSelection(m_gc_pad_type_strs[4]); + break; + case SIDEVICE_GC_GBA: + pad_type_choices[i]->SetStringSelection(m_gc_pad_type_strs[5]); + break; + case SIDEVICE_AM_BASEBOARD: + pad_type_choices[i]->SetStringSelection(m_gc_pad_type_strs[6]); + break; + default: + pad_type_choices[i]->SetStringSelection(m_gc_pad_type_strs[0]); + break; + } + + // Add to the sizer gamecube_flex_sizer->Add(pad_labels[i], 0, wxALIGN_CENTER_VERTICAL); gamecube_flex_sizer->Add(pad_type_choices[i], 0, wxALIGN_CENTER_VERTICAL); gamecube_flex_sizer->Add(config_buttons[i], 1, wxEXPAND); @@ -298,9 +341,32 @@ wxStaticBoxSizer* WiimoteConfigDiag::CreateGeneralWiimoteSettingsSizer() void WiimoteConfigDiag::ConfigEmulatedWiimote(wxCommandEvent& ev) { - InputConfigDialog* const m_emu_config_diag = new InputConfigDialog(this, m_config, _trans("Dolphin Emulated Wiimote Configuration"), m_wiimote_index_from_conf_bt_id[ev.GetId()]); - m_emu_config_diag->ShowModal(); - m_emu_config_diag->Destroy(); + InputConfig* const wiimote_plugin = Wiimote::GetConfig(); + bool was_init = false; + if (g_controller_interface.IsInit()) // check if game is running + { + was_init = true; + } + else + { +#if defined(HAVE_X11) && HAVE_X11 + Window win = X11Utils::XWindowFromHandle(GetHandle()); + Wiimote::Initialize(reinterpret_cast(win)); +#else + Wiimote::Initialize(reinterpret_cast(GetHandle())); +#endif + } + InputConfigDialog m_ConfigFrame(this, *wiimote_plugin, _trans("Dolphin Emulated Wiimote Configuration"), m_wiimote_index_from_conf_bt_id[ev.GetId()]); + m_ConfigFrame.ShowModal(); + m_ConfigFrame.Destroy(); + if (!was_init) // if game isn't running + { + Wiimote::Shutdown(); + } + + //InputConfigDialog* const m_emu_config_diag = new InputConfigDialog(this, *Wiimote::GetConfig(), _trans("Dolphin Emulated Wiimote Configuration"), m_wiimote_index_from_conf_bt_id[ev.GetId()]); + //m_emu_config_diag->ShowModal(); + //m_emu_config_diag->Destroy(); } void WiimoteConfigDiag::RefreshRealWiimotes(wxCommandEvent&) @@ -364,3 +430,61 @@ void WiimoteConfigDiag::Cancel(wxCommandEvent& event) RevertSource(); event.Skip(); } + +void WiimoteConfigDiag::OnGameCubePortChanged(wxCommandEvent& event) +{ + const unsigned int device_num = m_gc_port_choice_ids[event.GetId()]; + const wxString device_name = event.GetString(); + + SIDevices tempType; + if (device_name == m_gc_pad_type_strs[1]) + tempType = SIDEVICE_GC_CONTROLLER; + else if (device_name == m_gc_pad_type_strs[2]) + tempType = SIDEVICE_GC_STEERING; + else if (device_name == m_gc_pad_type_strs[3]) + tempType = SIDEVICE_DANCEMAT; + else if (device_name == m_gc_pad_type_strs[4]) + tempType = SIDEVICE_GC_TARUKONGA; + else if (device_name == m_gc_pad_type_strs[5]) + tempType = SIDEVICE_GC_GBA; + else if (device_name == m_gc_pad_type_strs[6]) + tempType = SIDEVICE_AM_BASEBOARD; + else + tempType = SIDEVICE_NONE; + + SConfig::GetInstance().m_SIDevice[device_num] = tempType; + + if (Core::IsRunning()) + SerialInterface::ChangeDevice(tempType, device_num); +} + +void WiimoteConfigDiag::OnGameCubeConfigButton(wxCommandEvent& event) +{ + InputConfig* const pad_plugin = Pad::GetConfig(); + const int port_num = m_gc_port_config_ids[event.GetId()]; + + bool was_init = false; + + // check if game is running + if (g_controller_interface.IsInit()) + { + was_init = true; + } + else + { +#if defined(HAVE_X11) && HAVE_X11 + Window win = X11Utils::XWindowFromHandle(GetHandle()); + Pad::Initialize(reinterpret_cast(win)); +#else + Pad::Initialize(reinterpret_cast(GetHandle())); +#endif + } + + InputConfigDialog m_ConfigFrame(this, *pad_plugin, _trans("Dolphin GCPad Configuration"), port_num); + m_ConfigFrame.ShowModal(); + m_ConfigFrame.Destroy(); + + // if game isn't running + if (!was_init) + Pad::Shutdown(); +} diff --git a/Source/Core/DolphinWX/WiimoteConfigDiag.h b/Source/Core/DolphinWX/WiimoteConfigDiag.h index 5b6e9195ed..44d7d3dd04 100644 --- a/Source/Core/DolphinWX/WiimoteConfigDiag.h +++ b/Source/Core/DolphinWX/WiimoteConfigDiag.h @@ -1,5 +1,6 @@ #pragma once +#include #include #include #include @@ -17,7 +18,7 @@ class wxWindow; class WiimoteConfigDiag : public wxDialog { public: - WiimoteConfigDiag(wxWindow* const parent, InputConfig& config); + WiimoteConfigDiag(wxWindow* const parent); void RefreshRealWiimotes(wxCommandEvent& event); @@ -65,9 +66,14 @@ private: wxStaticBoxSizer* CreateBalanceBoardSizer(); wxStaticBoxSizer* CreateRealWiimoteSizer(); wxStaticBoxSizer* CreateGeneralWiimoteSettingsSizer(); - void Cancel(wxCommandEvent& event); - InputConfig& m_config; + void Cancel(wxCommandEvent& event); + void OnGameCubePortChanged(wxCommandEvent& event); + void OnGameCubeConfigButton(wxCommandEvent& event); + + std::map m_gc_port_choice_ids; + std::map m_gc_port_config_ids; + static const std::array m_gc_pad_type_strs; std::map m_wiimote_index_from_ctrl_id; unsigned int m_orig_wiimote_sources[MAX_BBMOTES]; From cad8ae3be1f020b21b18189c1fc32c693961fc20 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 22 Nov 2014 16:39:48 -0500 Subject: [PATCH 07/11] WiimoteConfigDiag: Rename to ControllerConfigDiag. --- Source/Core/DolphinWX/CMakeLists.txt | 2 +- ...onfigDiag.cpp => ControllerConfigDiag.cpp} | 62 +++++++++---------- ...oteConfigDiag.h => ControllerConfigDiag.h} | 4 +- Source/Core/DolphinWX/DolphinWX.vcxproj | 12 ++-- .../Core/DolphinWX/DolphinWX.vcxproj.filters | 14 ++--- Source/Core/DolphinWX/FrameTools.cpp | 8 +-- 6 files changed, 50 insertions(+), 52 deletions(-) rename Source/Core/DolphinWX/{WiimoteConfigDiag.cpp => ControllerConfigDiag.cpp} (87%) rename Source/Core/DolphinWX/{WiimoteConfigDiag.h => ControllerConfigDiag.h} (95%) diff --git a/Source/Core/DolphinWX/CMakeLists.txt b/Source/Core/DolphinWX/CMakeLists.txt index 495299ecc0..cdc503b8fc 100644 --- a/Source/Core/DolphinWX/CMakeLists.txt +++ b/Source/Core/DolphinWX/CMakeLists.txt @@ -2,6 +2,7 @@ set(GUI_SRCS ARCodeAddEdit.cpp AboutDolphin.cpp ConfigMain.cpp + ControllerConfigDiag.cpp Cheats/CheatSearchTab.cpp Cheats/CheatsWindow.cpp Cheats/CreateCodeDialog.cpp @@ -45,7 +46,6 @@ set(GUI_SRCS TASInputDlg.cpp VideoConfigDiag.cpp WXInputBase.cpp - WiimoteConfigDiag.cpp WxUtils.cpp) set(NOGUI_SRCS MainNoGUI.cpp) diff --git a/Source/Core/DolphinWX/WiimoteConfigDiag.cpp b/Source/Core/DolphinWX/ControllerConfigDiag.cpp similarity index 87% rename from Source/Core/DolphinWX/WiimoteConfigDiag.cpp rename to Source/Core/DolphinWX/ControllerConfigDiag.cpp index 9965444fd1..89456762de 100644 --- a/Source/Core/DolphinWX/WiimoteConfigDiag.cpp +++ b/Source/Core/DolphinWX/ControllerConfigDiag.cpp @@ -28,14 +28,14 @@ #include "Core/HW/SI.h" #include "Core/HW/Wiimote.h" #include "Core/HW/WiimoteReal/WiimoteReal.h" +#include "DolphinWX/ControllerConfigDiag.h" #include "DolphinWX/InputConfigDiag.h" -#include "DolphinWX/WiimoteConfigDiag.h" #if defined(HAVE_XRANDR) && HAVE_XRANDR #include "VideoBackends/OGL/GLInterface/X11Utils.h" #endif -const std::array WiimoteConfigDiag::m_gc_pad_type_strs = {{ +const std::array ControllerConfigDiag::m_gc_pad_type_strs = {{ _("None"), _("Standard Controller"), _("Steering Wheel"), @@ -45,8 +45,8 @@ const std::array WiimoteConfigDiag::m_gc_pad_type_strs = {{ _("AM-Baseboard") }}; -WiimoteConfigDiag::WiimoteConfigDiag(wxWindow* const parent) - : wxDialog(parent, -1, _("Dolphin Wiimote Configuration")) +ControllerConfigDiag::ControllerConfigDiag(wxWindow* const parent) + : wxDialog(parent, -1, _("Dolphin Controller Configuration")) { wxBoxSizer* const main_sizer = new wxBoxSizer(wxVERTICAL); @@ -58,14 +58,14 @@ WiimoteConfigDiag::WiimoteConfigDiag(wxWindow* const parent) main_sizer->Add(control_sizer, 0, wxEXPAND); main_sizer->Add(CreateButtonSizer(wxOK | wxCANCEL), 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5); - Bind(wxEVT_BUTTON, &WiimoteConfigDiag::Save, this, wxID_OK); - Bind(wxEVT_BUTTON, &WiimoteConfigDiag::Cancel, this, wxID_CANCEL); + Bind(wxEVT_BUTTON, &ControllerConfigDiag::Save, this, wxID_OK); + Bind(wxEVT_BUTTON, &ControllerConfigDiag::Cancel, this, wxID_CANCEL); SetSizerAndFit(main_sizer); Center(); } -wxStaticBoxSizer* WiimoteConfigDiag::CreateGamecubeSizer() +wxStaticBoxSizer* ControllerConfigDiag::CreateGamecubeSizer() { wxStaticBoxSizer* const gamecube_static_sizer = new wxStaticBoxSizer(wxHORIZONTAL, this, _("GameCube Controllers")); wxFlexGridSizer* const gamecube_flex_sizer = new wxFlexGridSizer(3, 5, 5); @@ -83,7 +83,7 @@ wxStaticBoxSizer* WiimoteConfigDiag::CreateGamecubeSizer() const wxWindowID button_id = wxWindow::NewControlId(); m_gc_port_config_ids.insert(std::make_pair(button_id, i)); config_buttons[i] = new wxButton(this, button_id, _("Configure"), wxDefaultPosition, wxSize(100, 25)); - config_buttons[i]->Bind(wxEVT_BUTTON, &WiimoteConfigDiag::OnGameCubeConfigButton, this); + config_buttons[i]->Bind(wxEVT_BUTTON, &ControllerConfigDiag::OnGameCubeConfigButton, this); // Create a control ID for the choice boxes on the fly. const wxWindowID choice_id = wxWindow::NewControlId(); @@ -95,7 +95,7 @@ wxStaticBoxSizer* WiimoteConfigDiag::CreateGamecubeSizer() else pad_type_choices[i] = new wxChoice(this, choice_id, wxDefaultPosition, wxDefaultSize, m_gc_pad_type_strs.size() - 1, m_gc_pad_type_strs.data()); - pad_type_choices[i]->Bind(wxEVT_CHOICE, &WiimoteConfigDiag::OnGameCubePortChanged, this); + pad_type_choices[i]->Bind(wxEVT_CHOICE, &ControllerConfigDiag::OnGameCubePortChanged, this); // Set the saved pad type as the default choice. switch (SConfig::GetInstance().m_SIDevice[i]) @@ -133,7 +133,7 @@ wxStaticBoxSizer* WiimoteConfigDiag::CreateGamecubeSizer() return gamecube_static_sizer; } -wxStaticBoxSizer* WiimoteConfigDiag::CreateWiimoteConfigSizer() +wxStaticBoxSizer* ControllerConfigDiag::CreateWiimoteConfigSizer() { wxStaticText* wiimote_label[4]; wxChoice* wiimote_source_ch[4]; @@ -156,9 +156,9 @@ wxStaticBoxSizer* WiimoteConfigDiag::CreateWiimoteConfigSizer() wiimote_label[i] = new wxStaticText(this, wxID_ANY, wiimote_str); wiimote_source_ch[i] = new wxChoice(this, source_ctrl_id, wxDefaultPosition, wxDefaultSize, src_choices.size(), src_choices.data()); - wiimote_source_ch[i]->Bind(wxEVT_CHOICE, &WiimoteConfigDiag::SelectSource, this); + wiimote_source_ch[i]->Bind(wxEVT_CHOICE, &ControllerConfigDiag::SelectSource, this); wiimote_configure_bt[i] = new wxButton(this, config_bt_id, _("Configure")); - wiimote_configure_bt[i]->Bind(wxEVT_BUTTON, &WiimoteConfigDiag::ConfigEmulatedWiimote, this); + wiimote_configure_bt[i]->Bind(wxEVT_BUTTON, &ControllerConfigDiag::ConfigEmulatedWiimote, this); m_orig_wiimote_sources[i] = g_wiimote_sources[i]; wiimote_source_ch[i]->Select(m_orig_wiimote_sources[i]); @@ -201,7 +201,7 @@ wxStaticBoxSizer* WiimoteConfigDiag::CreateWiimoteConfigSizer() return wiimote_group; } -wxStaticBoxSizer* WiimoteConfigDiag::CreateBalanceBoardSizer() +wxStaticBoxSizer* ControllerConfigDiag::CreateBalanceBoardSizer() { wxStaticBoxSizer* const bb_group = new wxStaticBoxSizer(wxHORIZONTAL, this, _("Balance Board")); wxFlexGridSizer* const bb_sizer = new wxFlexGridSizer(1, 5, 5); @@ -214,7 +214,7 @@ wxStaticBoxSizer* WiimoteConfigDiag::CreateBalanceBoardSizer() }}; wxChoice* const bb_source = new wxChoice(this, source_ctrl_id, wxDefaultPosition, wxDefaultSize, src_choices.size(), src_choices.data()); - bb_source->Bind(wxEVT_CHOICE, &WiimoteConfigDiag::SelectSource, this); + bb_source->Bind(wxEVT_CHOICE, &ControllerConfigDiag::SelectSource, this); m_orig_wiimote_sources[WIIMOTE_BALANCE_BOARD] = g_wiimote_sources[WIIMOTE_BALANCE_BOARD]; bb_source->Select(m_orig_wiimote_sources[WIIMOTE_BALANCE_BOARD] ? 1 : 0); @@ -230,11 +230,11 @@ wxStaticBoxSizer* WiimoteConfigDiag::CreateBalanceBoardSizer() return bb_group; } -wxStaticBoxSizer* WiimoteConfigDiag::CreateRealWiimoteSizer() +wxStaticBoxSizer* ControllerConfigDiag::CreateRealWiimoteSizer() { // "Real wiimotes" controls wxButton* const refresh_btn = new wxButton(this, -1, _("Refresh")); - refresh_btn->Bind(wxEVT_BUTTON, &WiimoteConfigDiag::RefreshRealWiimotes, this); + refresh_btn->Bind(wxEVT_BUTTON, &ControllerConfigDiag::RefreshRealWiimotes, this); wxStaticBoxSizer* const real_wiimotes_group = new wxStaticBoxSizer(wxVERTICAL, this, _("Real Wiimotes")); wxBoxSizer* const real_wiimotes_sizer = new wxBoxSizer(wxHORIZONTAL); @@ -244,7 +244,7 @@ wxStaticBoxSizer* WiimoteConfigDiag::CreateRealWiimoteSizer() "You must manually connect your wiimotes.")), 0, wxALIGN_CENTER | wxALL, 5); wxCheckBox* const continuous_scanning = new wxCheckBox(this, wxID_ANY, _("Continuous Scanning")); - continuous_scanning->Bind(wxEVT_CHECKBOX, &WiimoteConfigDiag::OnContinuousScanning, this); + continuous_scanning->Bind(wxEVT_CHECKBOX, &ControllerConfigDiag::OnContinuousScanning, this); continuous_scanning->SetValue(SConfig::GetInstance().m_WiimoteContinuousScanning); real_wiimotes_sizer->Add(continuous_scanning, 0, wxALIGN_CENTER_VERTICAL); @@ -256,7 +256,7 @@ wxStaticBoxSizer* WiimoteConfigDiag::CreateRealWiimoteSizer() return real_wiimotes_group; } -wxStaticBoxSizer* WiimoteConfigDiag::CreateGeneralWiimoteSettingsSizer() +wxStaticBoxSizer* ControllerConfigDiag::CreateGeneralWiimoteSettingsSizer() { const wxString str[] = { _("Bottom"), _("Top") }; wxChoice* const WiiSensBarPos = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 2, str); @@ -265,7 +265,7 @@ wxStaticBoxSizer* WiimoteConfigDiag::CreateGeneralWiimoteSettingsSizer() wxCheckBox* const WiimoteMotor = new wxCheckBox(this, wxID_ANY, _("Wiimote Motor")); auto wiimote_speaker = new wxCheckBox(this, wxID_ANY, _("Enable Speaker Data")); - wiimote_speaker->Bind(wxEVT_CHECKBOX, &WiimoteConfigDiag::OnEnableSpeaker, this); + wiimote_speaker->Bind(wxEVT_CHECKBOX, &ControllerConfigDiag::OnEnableSpeaker, this); wiimote_speaker->SetValue(SConfig::GetInstance().m_WiimoteEnableSpeaker); wxStaticText* const WiiSensBarPosText = new wxStaticText(this, wxID_ANY, _("Sensor Bar Position:")); @@ -302,10 +302,10 @@ wxStaticBoxSizer* WiimoteConfigDiag::CreateGeneralWiimoteSettingsSizer() WiimoteSpkVolume->SetValue(SConfig::GetInstance().m_SYSCONF->GetData("BT.SPKV")); WiimoteMotor->SetValue(SConfig::GetInstance().m_SYSCONF->GetData("BT.MOT")); - WiiSensBarPos->Bind(wxEVT_CHOICE, &WiimoteConfigDiag::OnSensorBarPos, this); - WiiSensBarSens->Bind(wxEVT_SLIDER, &WiimoteConfigDiag::OnSensorBarSensitivity, this); - WiimoteSpkVolume->Bind(wxEVT_SLIDER, &WiimoteConfigDiag::OnSpeakerVolume, this); - WiimoteMotor->Bind(wxEVT_CHECKBOX, &WiimoteConfigDiag::OnMotor, this); + WiiSensBarPos->Bind(wxEVT_CHOICE, &ControllerConfigDiag::OnSensorBarPos, this); + WiiSensBarSens->Bind(wxEVT_SLIDER, &ControllerConfigDiag::OnSensorBarSensitivity, this); + WiimoteSpkVolume->Bind(wxEVT_SLIDER, &ControllerConfigDiag::OnSpeakerVolume, this); + WiimoteMotor->Bind(wxEVT_CHECKBOX, &ControllerConfigDiag::OnMotor, this); // "General Settings" layout wxStaticBoxSizer* const general_sizer = new wxStaticBoxSizer(wxVERTICAL, this, _("General Settings")); @@ -339,7 +339,7 @@ wxStaticBoxSizer* WiimoteConfigDiag::CreateGeneralWiimoteSettingsSizer() } -void WiimoteConfigDiag::ConfigEmulatedWiimote(wxCommandEvent& ev) +void ControllerConfigDiag::ConfigEmulatedWiimote(wxCommandEvent& ev) { InputConfig* const wiimote_plugin = Wiimote::GetConfig(); bool was_init = false; @@ -369,12 +369,12 @@ void WiimoteConfigDiag::ConfigEmulatedWiimote(wxCommandEvent& ev) //m_emu_config_diag->Destroy(); } -void WiimoteConfigDiag::RefreshRealWiimotes(wxCommandEvent&) +void ControllerConfigDiag::RefreshRealWiimotes(wxCommandEvent&) { WiimoteReal::Refresh(); } -void WiimoteConfigDiag::SelectSource(wxCommandEvent& event) +void ControllerConfigDiag::SelectSource(wxCommandEvent& event) { // This needs to be changed now in order for refresh to work right. // Revert if the dialog is canceled. @@ -394,13 +394,13 @@ void WiimoteConfigDiag::SelectSource(wxCommandEvent& event) } } -void WiimoteConfigDiag::RevertSource() +void ControllerConfigDiag::RevertSource() { for (int i = 0; i < MAX_BBMOTES; ++i) g_wiimote_sources[i] = m_orig_wiimote_sources[i]; } -void WiimoteConfigDiag::Save(wxCommandEvent& event) +void ControllerConfigDiag::Save(wxCommandEvent& event) { std::string ini_filename = File::GetUserPath(D_CONFIG_IDX) + WIIMOTE_INI_NAME ".ini"; @@ -425,13 +425,13 @@ void WiimoteConfigDiag::Save(wxCommandEvent& event) event.Skip(); } -void WiimoteConfigDiag::Cancel(wxCommandEvent& event) +void ControllerConfigDiag::Cancel(wxCommandEvent& event) { RevertSource(); event.Skip(); } -void WiimoteConfigDiag::OnGameCubePortChanged(wxCommandEvent& event) +void ControllerConfigDiag::OnGameCubePortChanged(wxCommandEvent& event) { const unsigned int device_num = m_gc_port_choice_ids[event.GetId()]; const wxString device_name = event.GetString(); @@ -458,7 +458,7 @@ void WiimoteConfigDiag::OnGameCubePortChanged(wxCommandEvent& event) SerialInterface::ChangeDevice(tempType, device_num); } -void WiimoteConfigDiag::OnGameCubeConfigButton(wxCommandEvent& event) +void ControllerConfigDiag::OnGameCubeConfigButton(wxCommandEvent& event) { InputConfig* const pad_plugin = Pad::GetConfig(); const int port_num = m_gc_port_config_ids[event.GetId()]; diff --git a/Source/Core/DolphinWX/WiimoteConfigDiag.h b/Source/Core/DolphinWX/ControllerConfigDiag.h similarity index 95% rename from Source/Core/DolphinWX/WiimoteConfigDiag.h rename to Source/Core/DolphinWX/ControllerConfigDiag.h index 44d7d3dd04..3fbc56fb76 100644 --- a/Source/Core/DolphinWX/WiimoteConfigDiag.h +++ b/Source/Core/DolphinWX/ControllerConfigDiag.h @@ -15,10 +15,10 @@ class wxButton; class wxStaticBoxSizer; class wxWindow; -class WiimoteConfigDiag : public wxDialog +class ControllerConfigDiag : public wxDialog { public: - WiimoteConfigDiag(wxWindow* const parent); + ControllerConfigDiag(wxWindow* const parent); void RefreshRealWiimotes(wxCommandEvent& event); diff --git a/Source/Core/DolphinWX/DolphinWX.vcxproj b/Source/Core/DolphinWX/DolphinWX.vcxproj index 19adcf43ba..033c70e7d3 100644 --- a/Source/Core/DolphinWX/DolphinWX.vcxproj +++ b/Source/Core/DolphinWX/DolphinWX.vcxproj @@ -96,7 +96,7 @@ - + @@ -144,7 +144,7 @@ - + @@ -222,12 +222,10 @@ - + - + - + \ No newline at end of file diff --git a/Source/Core/DolphinWX/DolphinWX.vcxproj.filters b/Source/Core/DolphinWX/DolphinWX.vcxproj.filters index 1f41f1582f..7bfd1dbb8d 100644 --- a/Source/Core/DolphinWX/DolphinWX.vcxproj.filters +++ b/Source/Core/DolphinWX/DolphinWX.vcxproj.filters @@ -160,12 +160,12 @@ GUI - - GUI - GUI\Video + + GUI + @@ -294,12 +294,12 @@ GUI - - GUI - GUI\Video + + GUI + @@ -312,4 +312,4 @@ - + \ No newline at end of file diff --git a/Source/Core/DolphinWX/FrameTools.cpp b/Source/Core/DolphinWX/FrameTools.cpp index 0f49aeab0e..8976975fd3 100644 --- a/Source/Core/DolphinWX/FrameTools.cpp +++ b/Source/Core/DolphinWX/FrameTools.cpp @@ -64,6 +64,7 @@ #include "DolphinWX/AboutDolphin.h" #include "DolphinWX/ConfigMain.h" +#include "DolphinWX/ControllerConfigDiag.h" #include "DolphinWX/FifoPlayerDlg.h" #include "DolphinWX/Frame.h" #include "DolphinWX/GameListCtrl.h" @@ -75,7 +76,6 @@ #include "DolphinWX/MemcardManager.h" #include "DolphinWX/NetWindow.h" #include "DolphinWX/TASInputDlg.h" -#include "DolphinWX/WiimoteConfigDiag.h" #include "DolphinWX/WXInputBase.h" #include "DolphinWX/WxUtils.h" #include "DolphinWX/Cheats/CheatsWindow.h" @@ -1345,9 +1345,9 @@ void CFrame::OnConfigDSP(wxCommandEvent& WXUNUSED (event)) void CFrame::OnConfigControllers(wxCommandEvent& WXUNUSED (event)) { - WiimoteConfigDiag m_ConfigFrame(this); - m_ConfigFrame.ShowModal(); - m_ConfigFrame.Destroy(); + ControllerConfigDiag config_dlg(this); + config_dlg.ShowModal(); + config_dlg.Destroy(); } void CFrame::OnConfigHotkey(wxCommandEvent& WXUNUSED (event)) From 7b54d8ad10568d973471d3a025f5791fcf8ba108 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 23 Nov 2014 21:06:58 -0500 Subject: [PATCH 08/11] ControllerConfigDiag: Remove now obsolete TODOs --- Source/Core/DolphinWX/ControllerConfigDiag.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/Source/Core/DolphinWX/ControllerConfigDiag.cpp b/Source/Core/DolphinWX/ControllerConfigDiag.cpp index 89456762de..b0f6a1615f 100644 --- a/Source/Core/DolphinWX/ControllerConfigDiag.cpp +++ b/Source/Core/DolphinWX/ControllerConfigDiag.cpp @@ -73,7 +73,6 @@ wxStaticBoxSizer* ControllerConfigDiag::CreateGamecubeSizer() wxStaticText* pad_labels[4]; wxChoice* pad_type_choices[4]; wxButton* config_buttons[4]; - // TODO: Add bind call here for (int i = 0; i < 4; i++) { @@ -178,7 +177,6 @@ wxStaticBoxSizer* ControllerConfigDiag::CreateWiimoteConfigSizer() } wiimote_control_section->Add(wiimote_sizer, 1, wxEXPAND, 5 ); - // TODO: Move to wiimote sizer creation. // Disable some controls when emulation is running if (Core::GetState() != Core::CORE_UNINITIALIZED && NetPlay::IsNetPlayRunning()) { @@ -189,7 +187,6 @@ wxStaticBoxSizer* ControllerConfigDiag::CreateWiimoteConfigSizer() } } - // Combine all wiimote UI. wiimote_group->Add(wiimote_control_section, 0, wxEXPAND | wxALL); wiimote_group->AddSpacer(5); wiimote_group->Add(CreateBalanceBoardSizer(), 0, wxEXPAND | wxALL); From 896304fd072f42cba0423bbcacb9fe095f014aaa Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 23 Nov 2014 21:43:15 -0500 Subject: [PATCH 09/11] ControllerConfigDiag: Disable controller type changes if netplay or a movie is active. --- Source/Core/DolphinWX/ControllerConfigDiag.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Source/Core/DolphinWX/ControllerConfigDiag.cpp b/Source/Core/DolphinWX/ControllerConfigDiag.cpp index b0f6a1615f..9622e9be0b 100644 --- a/Source/Core/DolphinWX/ControllerConfigDiag.cpp +++ b/Source/Core/DolphinWX/ControllerConfigDiag.cpp @@ -23,6 +23,7 @@ #include "Common/SysConf.h" #include "Core/ConfigManager.h" #include "Core/Core.h" +#include "Core/Movie.h" #include "Core/NetPlayProto.h" #include "Core/HW/GCPad.h" #include "Core/HW/SI.h" @@ -96,6 +97,10 @@ wxStaticBoxSizer* ControllerConfigDiag::CreateGamecubeSizer() pad_type_choices[i]->Bind(wxEVT_CHOICE, &ControllerConfigDiag::OnGameCubePortChanged, this); + // Disable controller type selection for certain circumstances. + if (NetPlay::IsNetPlayRunning() || Movie::IsMovieActive()) + pad_type_choices[i]->Disable(); + // Set the saved pad type as the default choice. switch (SConfig::GetInstance().m_SIDevice[i]) { @@ -159,6 +164,10 @@ wxStaticBoxSizer* ControllerConfigDiag::CreateWiimoteConfigSizer() wiimote_configure_bt[i] = new wxButton(this, config_bt_id, _("Configure")); wiimote_configure_bt[i]->Bind(wxEVT_BUTTON, &ControllerConfigDiag::ConfigEmulatedWiimote, this); + // Disable controller type selection for certain circumstances. + if (NetPlay::IsNetPlayRunning() || Movie::IsMovieActive()) + wiimote_source_ch[i]->Disable(); + m_orig_wiimote_sources[i] = g_wiimote_sources[i]; wiimote_source_ch[i]->Select(m_orig_wiimote_sources[i]); if (m_orig_wiimote_sources[i] != WIIMOTE_SRC_EMU && m_orig_wiimote_sources[i] != WIIMOTE_SRC_HYBRID) From 5e2888bff69b57c7b7dae7de9fbf517944ecde26 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 1 Dec 2014 03:50:44 -0500 Subject: [PATCH 10/11] DolphinWX: Add new icon for the controller menu. --- Data/Sys/Themes/Clean Blue/classic.png | Bin 0 -> 1347 bytes Data/Sys/Themes/Clean Blue/classic@2x.png | Bin 0 -> 2948 bytes Data/Sys/Themes/Clean Lite/classic.png | Bin 0 -> 1466 bytes Data/Sys/Themes/Clean Lite/classic@2x.png | Bin 0 -> 3021 bytes Data/Sys/Themes/Clean Pink/classic.png | Bin 0 -> 1673 bytes Data/Sys/Themes/Clean Pink/classic@2x.png | Bin 0 -> 3859 bytes Data/Sys/Themes/Clean/classic.png | Bin 0 -> 1339 bytes Data/Sys/Themes/Clean/classic@2x.png | Bin 0 -> 2767 bytes Source/Core/DolphinWX/FrameTools.cpp | 2 +- 9 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 Data/Sys/Themes/Clean Blue/classic.png create mode 100644 Data/Sys/Themes/Clean Blue/classic@2x.png create mode 100644 Data/Sys/Themes/Clean Lite/classic.png create mode 100644 Data/Sys/Themes/Clean Lite/classic@2x.png create mode 100644 Data/Sys/Themes/Clean Pink/classic.png create mode 100644 Data/Sys/Themes/Clean Pink/classic@2x.png create mode 100644 Data/Sys/Themes/Clean/classic.png create mode 100644 Data/Sys/Themes/Clean/classic@2x.png diff --git a/Data/Sys/Themes/Clean Blue/classic.png b/Data/Sys/Themes/Clean Blue/classic.png new file mode 100644 index 0000000000000000000000000000000000000000..5c7a5a8f1b477c11ae2e429c76528c5eaa69db8a GIT binary patch literal 1347 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}k|nMYCBgY=CFO}lsSJ)O z`AMk?p1FzXsX?iUDV2pMQ*9U+Se|;iIEGZ*dNbWOBPLYj`1!ftC!M*`WFREqw7Ahj zK}aCF;G#zuqa$~nP@$rTd0oztZAk)LTuNa9-rS6eFPy}?b_9kWedNAXVWmhDbCZG5 zjt&-Q<;=-HE8hRy{rq0}=Vzvl0^Vk|ALjoqefM+M^EuVWPkapd_G$GAxq5Taj^A!> zhP?9_gBPgH>}jgJz_8!(;-b5Mjg6Sp4yaTJNBr_F;GFZVhU-bCfYkf`hq_@$8{b;0Z+O&te4pvOd++j_b$^EK`n07cGb-=3_e#|sfgh%P^Cw2nSX;&V zNne-KpUX>RulUp{D_C5kH4M56CT6cXV&rv4KYr%duJYfUTlcu#SNeV+fiZM{+D862 z`ib$0dtZIG;IDD4X19GFnf^e;D84u{V4~F_zgNq$I8LYPm_+PaGi}zSY<4fMXODN3 ze7hDL{_}0d>pg}dA~k+;r(PLKr_EfWxj3Rz@1dUh4yEai>@p#3x8vD&IcC&-I9U_% z+~xV3k82vr3qSL`tBbhygukMH!!Px>)(Nxz36`BX#&az6_lfKqQ=Jd6`uc3Jc)h79 zlrwv~;)C=LYr-EC7wFrp(^$@TQSPMXntxLYg}dEL@^7EtUiy#Y@5dRvznv|;rf4wR zD?YIkiE!%JY{$3FeU147TZXf*_szO6&W&1#=kf8x*YU!HwA(;lF7RiS2z!XG}) z;#Y+!#}!*QIqfRx?3QaX-WeLH=5_f=`5E`GjQ;;SxXwJkbl~`}m&T?#SHE%okWG8* zG^1Q{O2lrnuGWL;M=kby-1J4Rg%QPZt5SrHl^>P!@?aLhpIm@uGKwzdV`(UZjn#6|6>kT&HScp;ivG% z=+ON1ckZuJ2riOofUP4sfgyah(Vm(uPmdu!mABl>yE zvFuq6w?l7nMp^G`-@5VpqytHZ4!w8I`oAw96AjuUF@+XLLRp8)I_-|W58V5==UzkluTz^8lqZ@msFm^AurKS$)HnL)mcBc` zm-SxT4z`0jM=nQ%eooK1-uBWo;RZ`~!qw&P4OTQ8x=o(8@m}AeL*|zMxqHt4%>LOD z_wilPEd!(ZTLTj|d@uRU0Usnfi)o>{?oKxQa;_a#5yA(BT_x{uV^q_=GS0Q=nf*-EY zo5c?-yIwMH^Zggq|Nq8weKFZ)Hu2-4=egW>nkI@H{dU?J8}BB2DgU&+T($WF{sRFO z`FEc?9w;k>&490m;Ew#u1*3$9zo Qz`(%Z>FVdQ&MBb@0OQS$QUCw| literal 0 HcmV?d00001 diff --git a/Data/Sys/Themes/Clean Blue/classic@2x.png b/Data/Sys/Themes/Clean Blue/classic@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..c738c9c17e53ec5aa046f0bea9cb05442ff588ba GIT binary patch literal 2948 zcmeAS@N?(olHy`uVBq!ia0y~yU~m9o4mJh`hE{(JaZG%Q-e|yQz{EjrrIztaI1N`IEGZ*dJ~=45qey7Ugh__;@fp}JX%>2Qx7iU zSQf1l&7`R-&B4jploYukW1@plx8rKnEiJb$1)Z2b&4X!M>meaWDXnEJ&d$?yrh0jc zIp-{$#F`kLn3(udEOF(tx4X-Kot;_y{M?zj)%T+>ZaVt?$(u8Ct&7jiF-|{cS^P|E zYS5#^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FM|9bYB=Ra~y)%bnG4ul5KwBz_Wmdi``* z1?QzX+xFEfzyH5UR>0)@l()0_r_W3mb2t@wL*(6tgniE2SI2IQGE$R{W$t?NO6y}n z-$lLn_UvsS4|LhJ|`lJ7kr`HQitiOKan4_-XZ;ie4 zy5gJXXaD@p8&u={)AQ(&pJoYX1DBUHuiv*~$C=Eq4@dX#{@Z`Rfq|Kkhs8hu%J^{M e-#_gG443`8X0k5t-@?Gaz~JfX=d#Wzp$Pyg?3?5O literal 0 HcmV?d00001 diff --git a/Data/Sys/Themes/Clean Lite/classic.png b/Data/Sys/Themes/Clean Lite/classic.png new file mode 100644 index 0000000000000000000000000000000000000000..7cc53dd7e4b3fdda574842d5982d229f881ca4e1 GIT binary patch literal 1466 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}k|nMYCBgY=CFO}lsSJ)O z`AMk?p1FzXsX?iUDV2pMQ*9U+SYte0978H@y_p{G@g!8_c>U+&7cYLi-y(2=PqHn6 z!<$Voo0sK~Q_dIh#qF(2r@zWfENABITGY{!CC;iip=t%YbJfeWs;Rl!9Nd{14iN!M z*qvo$|M&LwU4H)i^}L5_w@<6RIUQ$l=f3UtKR@RcpWj)oW@KzEeCMnn@4HVs*cIOC zD^2XkP>|}~cj^wi>guamY*KbsR;P^bJLSy$Y0tapGUwNX#nXQ}dwf!T5uOv1eD3$J z!srv0UXHP`cYg<%iFLQyyj^S&wK9ZB@cwEewv!)LU4GkO6ku;=wM2W8ZN=VAg%uSy z>I(`kaP3{Q_2=4DhKJ`|ls<+gCnuZD^kJ)MXH)5z#M8pk!S_PPq3Q91vxPQt{GASm zY)`&>|DJtmP-aGX`S*WCJ8SG_pVe#Mb@}q;psuUeuh;88*VWZ!{Jftb;)@%T(qbic zI~7Y)0XL}=y37j94GG!V+6*pzUxgbq+9Vx5as{T(o;|yH*|KF0k`oN2#nxJG-8!G~ zbkjsx`M!Os!sj1+@od_oSox#&M#c2=-GMSorKP0q`7I4vSlqH?jYmvcHMiudGqF%7BAQ)|L+NiWIZOy*&uV? zIdw(6VCCYT7^a!>cLnDp+CSOp6uU6b?x+k9>?jQOCsl;I)j22E$z^ zy(@aD{fi{Tz3;CdaegP=W7jm7H|I!MS((~JNyS&|AL=i= zoVj&bSHUEno&feo^AD$)*FDy>oZb-B_EGEkS8fHl!#`!%exKdR_Iu;mvuAB4&Qsd; z{m9{)&L^I98i=I)Z(X`{sr&=phc*i~h)+D9laph!f5QfY?$3&{mc?3mN0VKby;x|{ z_iN+Ttn~FB5#^q2_cX6Fo{to)vbnj^!1tx}@nD9^&IRWlJXYHj9JXRo@XGw(SKs{F zE`4v#=`*E0Jlr$hY~1H{B$D~rE{%ds<|j_2_NlG%5&Y|Z`}S>KtvyZ)1J-!NsK*fSs}i_viKE$!@iSWRNXH+yPp;BK5D+x;4a9FKyPSOMGd}kfps({NZtdcgmX>UMUM3GENiRopUF5`wH6?$74g5 zpS+;9<;t~d*KXdsmuL32Y1V=7mjmah2TC|4`shBnpYvhYgO`dYcXMm3*K06Rd#w~+ zUXt1WRQLF~!YQG*els$(?9F#?+nar(s&!{*f8gp%{Y8yGglNA}J zi#48bSo~qir*_e)tM0$6&yMWAk>|cVx_Zf$ZBiSr3+%Oj@cmbQdyTd}XY!0ho~L&% zXYXgsdTA!GUHYGJZs`)~t9w-~S6r`CzjEu}jr9vJa9p)pxIFkGcf&-;9O z#WdEdj7KdF)*7U2UstWGt#xQoo(+G)t;|`owf_h{4B!3!hlRprdpj0~n0Rt~-{!0r`kP+# zM*PZu#hV5FbNWhTfR lmoM(sAGVgP=Qd#2I{m?n4^Q}P7#J8BJYD@<);T3K0RR&Uz7+rf literal 0 HcmV?d00001 diff --git a/Data/Sys/Themes/Clean Lite/classic@2x.png b/Data/Sys/Themes/Clean Lite/classic@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..ca754acd05495a10d8045ed8b6c667d1925fbf57 GIT binary patch literal 3021 zcmeAS@N?(olHy`uVBq!ia0y~yU~m9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9JpuK)l5 literal 0 HcmV?d00001 diff --git a/Data/Sys/Themes/Clean/classic.png b/Data/Sys/Themes/Clean/classic.png new file mode 100644 index 0000000000000000000000000000000000000000..fc3105c48de516460ddf1d9560498f5c2b9a2d30 GIT binary patch literal 1339 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}k|nMYCBgY=CFO}lsSJ)O z`AMk?p1FzXsX?iUDV2pMQ*9U+SnhhdIEGZ*dNVyXV|J>@@%t+Im)pd+rZxqHt?}WS zddT3=givm$L^`b?|Lc~>Pg|w_l%OY{Evl{m*o);L*I_`QFQvVZbx_StXJ_~+QfKeu^aZ#VDr9#2uO))#);N=n*q$1)UJ zcrFcEB>2L0+2Joc(>C8cU(vLWCpJB1>HY5xDZdstW^}x){_<$O^CX@bvJ?xM zd9POt5DMa(nZB0qY4oJM>o!05dG49}mSZ;AiqQ@~-7jdotIH}a{n}Q2j^qT zFRb0{dN>apbl4g5ZG!-}?V00eH!Vxua_#Cn$CLdRyu}vjFKB=8KUUB+Q*h?Vty{N# zmI!p*xNcce{F$dklb;-{{L#0uEWq-@Qs*Y0+@?3|Q)HeUSk3X=mS1O?B%j9OKMaqz zPhKr@oPR^ST94%1&HMKK)3Ld~XhDP1&OM8&Hf`Mak!Qiai@Oe~-QB3(oxa1t!8Tyt z)^`u0LM8Y++RF}1`j9#OYE(h6)P*??$tPqOjvKz>sGh#i^15dGD!w}M8(m6U6CTX0|Q{)zK~Q_cPweRj3pF@39CCC|m-fEN_Vn@@yV;958xBkr63W{7$8r0a?}uk(+wM6e*A*6bKmCvK-wDrW zZq-|wvhAzD3Xy$v4<8H5-MRJcQSpM7aPy24`F)>{JzOm&vRE>;Hsfy{SG3Np&#fWf zidoY=PB?X^OL-jY<+|We zUhR_?@7MnSJNwyzfIAE)EPwGg_0L)L>VW9~LykX{yzKex_UHXveO>t4x|b$@oj!z? zs-8V>5@OuO`C?ggo%KnZsAj*YgTaln`@Vi`oc-?lbiv1)>bYC)*KEJFXP4H-i@_-t z>wlb(QZ@?J$<1_lNO MPgg&ebxsLQ07ZX|asU7T literal 0 HcmV?d00001 diff --git a/Data/Sys/Themes/Clean/classic@2x.png b/Data/Sys/Themes/Clean/classic@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..f25885b8a350fdb7bc2e09ecbe049c1842bf6889 GIT binary patch literal 2767 zcmeAS@N?(olHy`uVBq!ia0y~yU~m9o4mJh`hE{(JaZG%Q-e|yQz{EjrrIzta20yGIEGZ*dJ|onF*Q|W|LwiIs~#RoFcDzuKBywN zrqxie`w5qzMlrVHdD_0sVIMtxV zyozT9h~Yki@n_Aye`?pRu>6)cbN>IfHu(Ey!~0Ladu>^L;Tm(J;Fjqf9q!NSCVoCL ztM>MVZHwm~yR|q&|99=$f{E$>r~xz_ADWmq`j zv(L2UqVHETs_b(7cIQlatak!S!Lx5~Zy(>09-|f#!l-IA)2EL6QE`TF#`9k{q84#D z98fxX|MDRYqZFPG-1nBJL^xY&(pR(QruD5tGZ`#M268~*SlP10uxW%iO z8Kc1Xl@0?VDk6TFuOaWYL*P=4bX`6xEJ->ltCTy>e^*G)&T-nF1av*1uQ1{$*t5;_;s&JfYm>^LkTgPp9KsfFsTT92b z2TR?qZ}XXKXlWvTV1jSLp{D}E&kPUbT;fRD$9U0K<<7jij*4ojIFsD!^*kSHpYCaX z_g1oXIqUs>j5fXdJkPg;JosW<^l9Re;~O`~ePsW@lv=wl@s;V!>ub!qcAVa>X0km0 z-kzOu_tW40iPC4Bv4fjs`|2CfhqOD(RWI_tta@-n=-gh{rdwhiKgtd~X1US$b`{@| zyDRdo>%Lc9UHS6WD=kSeo-C&8>lik9Pt);San*eCi%Wgnf^##ZPS3q^xTfc!G~*gY zG9~WnAKRrjS=Dvj0 z-v3>UPIq`*s^87+pYy9{SN2qve{BCEdu}&>>z(w_Bx&Zs1Mem*ynL49j*ofB{oe|! z3fC`4T3@}mR?H`2ZNWLTlvB6h;=&bv`X!&eB^JkD^kth9wX5Xie3|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mCwi%e?2n*HrVztZHkxVt6GTgIB!Zz00iU zrWs($z+A;RH?aQ9Qj=`g7nA%wc|RsMIIjNRJ+opmtI+d}0>0CpO)2525;ZvX&f|qz z#YQ_frVO6`2j3H4tMzi-SsG~-!DIWpR@K`hVvYVPmu)9_6P*g?f2g1D67@CCIF)U4 z(eJ%!Z9UsBZf7;veBN3;U*VbzP-PkN9x>oP!h4PKYhweq+uz$3nR literal 0 HcmV?d00001 diff --git a/Source/Core/DolphinWX/FrameTools.cpp b/Source/Core/DolphinWX/FrameTools.cpp index 8976975fd3..40f5ee358b 100644 --- a/Source/Core/DolphinWX/FrameTools.cpp +++ b/Source/Core/DolphinWX/FrameTools.cpp @@ -615,7 +615,7 @@ void CFrame::InitBitmaps() m_Bitmaps[Toolbar_ConfigMain].LoadFile(dir + "config.png", wxBITMAP_TYPE_PNG); m_Bitmaps[Toolbar_ConfigGFX ].LoadFile(dir + "graphics.png", wxBITMAP_TYPE_PNG); m_Bitmaps[Toolbar_ConfigDSP ].LoadFile(dir + "dsp.png", wxBITMAP_TYPE_PNG); - m_Bitmaps[Toolbar_Controller].LoadFile(dir + "wiimote.png", wxBITMAP_TYPE_PNG); + m_Bitmaps[Toolbar_Controller].LoadFile(dir + "classic.png", wxBITMAP_TYPE_PNG); m_Bitmaps[Toolbar_Screenshot].LoadFile(dir + "screenshot.png", wxBITMAP_TYPE_PNG); m_Bitmaps[Toolbar_FullScreen].LoadFile(dir + "fullscreen.png", wxBITMAP_TYPE_PNG); From 21d039059eed7dbd23dadb7080fbf0ff1cd14a91 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 1 Dec 2014 03:53:32 -0500 Subject: [PATCH 11/11] ControllerConfigDiag: Fix Linux builds --- Source/Core/DolphinWX/ControllerConfigDiag.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/DolphinWX/ControllerConfigDiag.cpp b/Source/Core/DolphinWX/ControllerConfigDiag.cpp index 9622e9be0b..bca01cc339 100644 --- a/Source/Core/DolphinWX/ControllerConfigDiag.cpp +++ b/Source/Core/DolphinWX/ControllerConfigDiag.cpp @@ -33,7 +33,7 @@ #include "DolphinWX/InputConfigDiag.h" #if defined(HAVE_XRANDR) && HAVE_XRANDR -#include "VideoBackends/OGL/GLInterface/X11Utils.h" +#include "DolphinWX/X11Utils.h" #endif const std::array ControllerConfigDiag::m_gc_pad_type_strs = {{