From 9bbe7a9e1af8f0aa8d89c4d8b0182c0a52d1983a Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Wed, 22 Dec 2010 05:59:58 +0000 Subject: [PATCH] Allow control of BT.SENS and BT.MOT sysconf values. Thought BT.SENS would fix issue 3362, I don't think it did though... Feel free to revert if the options seem unneeded. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6642 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DolphinWX/Src/ConfigMain.cpp | 18 ++++++++++++++++++ Source/Core/DolphinWX/Src/ConfigMain.h | 5 +++++ Source/Core/DolphinWX/Src/Frame.cpp | 2 ++ 3 files changed, 25 insertions(+) diff --git a/Source/Core/DolphinWX/Src/ConfigMain.cpp b/Source/Core/DolphinWX/Src/ConfigMain.cpp index 3faf16045e..0483ef03f4 100644 --- a/Source/Core/DolphinWX/Src/ConfigMain.cpp +++ b/Source/Core/DolphinWX/Src/ConfigMain.cpp @@ -100,6 +100,8 @@ EVT_CHOICE(ID_GC_SIDEVICE3, CConfigMain::GCSettingsChanged) EVT_CHOICE(ID_WII_BT_BAR, CConfigMain::WiiSettingsChanged) +EVT_SLIDER(ID_WII_BT_SENS, CConfigMain::WiiSettingsChanged) +EVT_CHECKBOX(ID_WII_BT_MOT, CConfigMain::WiiSettingsChanged) EVT_CHECKBOX(ID_WII_IPL_SSV, CConfigMain::WiiSettingsChanged) EVT_CHECKBOX(ID_WII_IPL_E60, CConfigMain::WiiSettingsChanged) @@ -177,6 +179,8 @@ void CConfigMain::UpdateGUI() // Disable stuff on WiiPage WiiSensBarPos->Disable(); + WiiSensBarSens->Disable(); + WiimoteMotor->Disable(); WiiScreenSaver->Disable(); WiiEuRGB60->Disable(); WiiAspectRatio->Disable(); @@ -300,6 +304,8 @@ void CConfigMain::InitializeGUIValues() // Wii - Wiimote WiiSensBarPos->SetSelection(SConfig::GetInstance().m_SYSCONF->GetData("BT.BAR")); + WiiSensBarSens->SetValue(SConfig::GetInstance().m_SYSCONF->GetData("BT.SENS")); + WiimoteMotor->SetValue(SConfig::GetInstance().m_SYSCONF->GetData("BT.MOT")); // Wii - Misc WiiScreenSaver->SetValue(!!SConfig::GetInstance().m_SYSCONF->GetData("IPL.SSV")); @@ -624,6 +630,9 @@ void CConfigMain::CreateGUIControls() sbWiimoteSettings = new wxStaticBoxSizer(wxHORIZONTAL, WiiPage, wxT("Wiimote Settings")); wxStaticText* WiiSensBarPosText = new wxStaticText(WiiPage, ID_WII_BT_BAR_TEXT, wxT("Sensor Bar Position:"), wxDefaultPosition, wxDefaultSize); WiiSensBarPos = new wxChoice(WiiPage, ID_WII_BT_BAR, wxDefaultPosition, wxDefaultSize, arrayStringFor_WiiSensBarPos, 0, wxDefaultValidator); + wxStaticText* WiiSensBarSensText = new wxStaticText(WiiPage, ID_WII_BT_SENS_TEXT, wxT("IR Sensitivity:"), wxDefaultPosition, wxDefaultSize); + WiiSensBarSens = new wxSlider(WiiPage, ID_WII_BT_SENS, 0, 0, 4); + WiimoteMotor = new wxCheckBox(WiiPage, ID_WII_BT_MOT, wxT("Wiimote Motor"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator); // Misc Settings sbWiiIPLSettings = new wxStaticBoxSizer(wxVERTICAL, WiiPage, wxT("Misc Settings")); @@ -643,6 +652,9 @@ void CConfigMain::CreateGUIControls() sWiimoteSettings = new wxGridBagSizer(); sWiimoteSettings->Add(WiiSensBarPosText, wxGBPosition(0, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL|wxALL, 5); sWiimoteSettings->Add(WiiSensBarPos, wxGBPosition(0, 1), wxDefaultSpan, wxALL, 5); + sWiimoteSettings->Add(WiiSensBarSensText, wxGBPosition(1, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL|wxALL, 5); + sWiimoteSettings->Add(WiiSensBarSens, wxGBPosition(1, 1), wxDefaultSpan, wxALL, 5); + sWiimoteSettings->Add(WiimoteMotor, wxGBPosition(2, 0), wxGBSpan(1, 2), wxALL, 5); sbWiimoteSettings->Add(sWiimoteSettings); sWiiIPLSettings = new wxGridBagSizer(); @@ -1015,6 +1027,12 @@ void CConfigMain::WiiSettingsChanged(wxCommandEvent& event) case ID_WII_BT_BAR: SConfig::GetInstance().m_SYSCONF->SetData("BT.BAR", WiiSensBarPos->GetSelection()); break; + case ID_WII_BT_SENS: + SConfig::GetInstance().m_SYSCONF->SetData("BT.SENS", WiiSensBarSens->GetValue()); + break; + case ID_WII_BT_MOT: + SConfig::GetInstance().m_SYSCONF->SetData("BT.MOT", WiimoteMotor->IsChecked()); + break; // SYSCONF settings case ID_WII_IPL_SSV: SConfig::GetInstance().m_SYSCONF->SetData("IPL.SSV", WiiScreenSaver->IsChecked()); diff --git a/Source/Core/DolphinWX/Src/ConfigMain.h b/Source/Core/DolphinWX/Src/ConfigMain.h index 6e8f4b418d..04007517a5 100644 --- a/Source/Core/DolphinWX/Src/ConfigMain.h +++ b/Source/Core/DolphinWX/Src/ConfigMain.h @@ -112,6 +112,8 @@ private: // Wiimote wxChoice* WiiSensBarPos; + wxSlider* WiiSensBarSens; + wxCheckBox* WiimoteMotor; // Misc wxCheckBox* WiiScreenSaver; @@ -226,6 +228,9 @@ private: ID_WII_BT_BAR_TEXT, ID_WII_BT_BAR, + ID_WII_BT_SENS_TEXT, + ID_WII_BT_SENS, + ID_WII_BT_MOT, ID_WII_IPL_SSV, ID_WII_IPL_E60, diff --git a/Source/Core/DolphinWX/Src/Frame.cpp b/Source/Core/DolphinWX/Src/Frame.cpp index 78e343e3d0..0481914127 100644 --- a/Source/Core/DolphinWX/Src/Frame.cpp +++ b/Source/Core/DolphinWX/Src/Frame.cpp @@ -873,6 +873,8 @@ void CFrame::OnMouse(wxMouseEvent& event) X11Utils::SendButtonEvent(X11Utils::XDisplayFromHandle(GetHandle()), event.GetButton(), event.GetPosition().x, event.GetPosition().y, event.ButtonDown()); } +#else + (void)event; #endif }