From 8abe9622fd125f86e95d1ba62f6f2b16ff93791f Mon Sep 17 00:00:00 2001 From: skidau Date: Sat, 6 Sep 2014 01:23:54 +1000 Subject: Route the wiimote speaker to the sound mixer (the host system's speakers). Emulated Wiimote speaker sounds will go to the host system's speakers. Real Wiimotes will continue to use their own speaker for Wiimote speaker sounds. All Wiimote speaker sound can be disabled by unchecking the "Enable Speaker Data" option. Each emulated Wiimote can have its speaker routed from left to right via the "Speaker Pan" setting in the emulated wiimote settings dialog. Use any value from -127 for leftmost to 127 for rightmost with 0 being the centre. Added code in the InputConfig to use a spin control for non-boolean values. Defaulted the setting of "Enable Speaker Data" to disabled. --- Source/Core/DolphinWX/InputConfigDiag.cpp | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) (limited to 'Source/Core/DolphinWX/InputConfigDiag.cpp') diff --git a/Source/Core/DolphinWX/InputConfigDiag.cpp b/Source/Core/DolphinWX/InputConfigDiag.cpp index 378b8729a0..010732eb79 100644 --- a/Source/Core/DolphinWX/InputConfigDiag.cpp +++ b/Source/Core/DolphinWX/InputConfigDiag.cpp @@ -911,19 +911,31 @@ ControlGroupBox::ControlGroupBox(ControllerEmu::ControlGroup* const group, wxWin //options for (auto& groupSetting : group->settings) { - PadSettingCheckBox* setting_cbox = new PadSettingCheckBox(parent, groupSetting.get()); - if (groupSetting.get()->is_iterate == true) + if (groupSetting.get()->high == 100) { - setting_cbox->wxcontrol->Bind(wxEVT_CHECKBOX, &GamepadPage::AdjustSettingUI, eventsink); - groupSetting.get()->value = 0; + PadSettingCheckBox* setting_cbox = new PadSettingCheckBox(parent, groupSetting.get()); + if (groupSetting.get()->is_iterate == true) + { + setting_cbox->wxcontrol->Bind(wxEVT_CHECKBOX, &GamepadPage::AdjustSettingUI, eventsink); + groupSetting.get()->value = 0; + } + else + { + setting_cbox->wxcontrol->Bind(wxEVT_CHECKBOX, &GamepadPage::AdjustSetting, eventsink); + } + options.push_back(setting_cbox); + Add(setting_cbox->wxcontrol, 0, wxALL | wxLEFT, 5); } else { - setting_cbox->wxcontrol->Bind(wxEVT_CHECKBOX, &GamepadPage::AdjustSetting, eventsink); + PadSettingSpin* setting = new PadSettingSpin(parent, groupSetting.get()); + setting->wxcontrol->Bind(wxEVT_SPINCTRL, &GamepadPage::AdjustSetting, eventsink); + options.push_back(setting); + wxBoxSizer* const szr = new wxBoxSizer(wxHORIZONTAL); + szr->Add(new wxStaticText(parent, -1, wxGetTranslation(StrToWxStr(groupSetting->name))), 0, wxCENTER | wxRIGHT, 3); + szr->Add(setting->wxcontrol, 0, wxRIGHT, 3); + Add(szr, 0, wxALL | wxCENTER, 3); } - options.push_back(setting_cbox); - - Add(setting_cbox->wxcontrol, 0, wxALL|wxLEFT, 5); } } break; -- cgit v1.2.3 From 786329555517c832f7883ed67583b95b1474fdc3 Mon Sep 17 00:00:00 2001 From: skidau Date: Sun, 7 Sep 2014 14:25:06 +1000 Subject: Used a constant for the default high value. --- Source/Core/DolphinWX/InputConfigDiag.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/DolphinWX/InputConfigDiag.cpp') diff --git a/Source/Core/DolphinWX/InputConfigDiag.cpp b/Source/Core/DolphinWX/InputConfigDiag.cpp index 010732eb79..388801a226 100644 --- a/Source/Core/DolphinWX/InputConfigDiag.cpp +++ b/Source/Core/DolphinWX/InputConfigDiag.cpp @@ -911,7 +911,7 @@ ControlGroupBox::ControlGroupBox(ControllerEmu::ControlGroup* const group, wxWin //options for (auto& groupSetting : group->settings) { - if (groupSetting.get()->high == 100) + if (groupSetting.get()->high == DEFAULT_HIGH_VALUE) { PadSettingCheckBox* setting_cbox = new PadSettingCheckBox(parent, groupSetting.get()); if (groupSetting.get()->is_iterate == true) -- cgit v1.2.3