diff --git a/Source/Core/Core/HW/WiimoteEmu/WiimoteEmu.cpp b/Source/Core/Core/HW/WiimoteEmu/WiimoteEmu.cpp index b16dbce963..892f4a5e2c 100644 --- a/Source/Core/Core/HW/WiimoteEmu/WiimoteEmu.cpp +++ b/Source/Core/Core/HW/WiimoteEmu/WiimoteEmu.cpp @@ -231,7 +231,7 @@ void Wiimote::Reset() // 0x33 - 0x43: level 2 // 0x33 - 0x54: level 3 // 0x55 - 0xff: level 4 - m_status.battery = 0x5f; + m_status.battery = (u8)(m_options->settings[5]->GetValue() * 100); memset(m_shake_step, 0, sizeof(m_shake_step)); @@ -302,6 +302,7 @@ Wiimote::Wiimote( const unsigned int index ) m_options->settings.emplace_back(new ControlGroup::Setting(_trans("Upright Wiimote"), false)); m_options->settings.emplace_back(new ControlGroup::IterateUI(_trans("Iterative Input"))); m_options->settings.emplace_back(new ControlGroup::Setting(_trans("Speaker Pan"), 0, -127, 127)); + m_options->settings.emplace_back(new ControlGroup::Setting(_trans("Battery"), 95, 0, 255)); // TODO: This value should probably be re-read if SYSCONF gets changed m_sensor_bar_on_top = SConfig::GetInstance().m_SYSCONF->GetData("BT.BAR") != 0; @@ -641,6 +642,8 @@ void Wiimote::Update() Movie::SetPolledDevice(); + m_status.battery = (u8)(m_options->settings[5]->GetValue() * 100); + const ReportFeatures& rptf = reporting_mode_features[m_reporting_mode - WM_REPORT_CORE]; s8 rptf_size = rptf.size; if (Movie::IsPlayingInput() && Movie::PlayWiimote(m_index, data, rptf, m_extension->active_extension, m_ext_key)) diff --git a/Source/Core/InputCommon/ControllerEmu.cpp b/Source/Core/InputCommon/ControllerEmu.cpp index df82bc0970..17e7a6d7cc 100644 --- a/Source/Core/InputCommon/ControllerEmu.cpp +++ b/Source/Core/InputCommon/ControllerEmu.cpp @@ -219,7 +219,6 @@ ControllerEmu::Cursor::Cursor(const std::string& _name) settings.emplace_back(new Setting(_trans("Center"), 0.5)); settings.emplace_back(new Setting(_trans("Width"), 0.5)); settings.emplace_back(new Setting(_trans("Height"), 0.5)); - } void ControllerEmu::LoadDefaults(const ControllerInterface &ciface)