Hooked up the emulated Wiimote speaker.

The Wiimotes are positioned as follows:
Wiimote 0 = Center
Wiimote 1 = Left
Wiimote 2 = Right
Wiimote 3 = Center

The Wiimote speaker output can be disabled via the "Enable Speaker Data" checkbox in the Wiimote settings.
This commit is contained in:
skidau
2014-09-05 22:32:48 +10:00
parent b801c7f8f1
commit 3caab10df8
4 changed files with 48 additions and 5 deletions

View File

@ -113,15 +113,10 @@ WiimoteConfigDiag::WiimoteConfigDiag(wxWindow* const parent, InputConfig& config
continuous_scanning->Bind(wxEVT_CHECKBOX, &WiimoteConfigDiag::OnContinuousScanning, this);
continuous_scanning->SetValue(SConfig::GetInstance().m_WiimoteContinuousScanning);
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);
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(wiimote_speaker, 0);
real_wiimotes_group->Add(real_wiimotes_sizer, 0, wxEXPAND);
// "General Settings" controls
@ -131,6 +126,10 @@ WiimoteConfigDiag::WiimoteConfigDiag(wxWindow* const parent, InputConfig& config
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"));
@ -204,6 +203,7 @@ WiimoteConfigDiag::WiimoteConfigDiag(wxWindow* const parent, InputConfig& config
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);