mirror of
https://github.com/ndeadly/MissionControl
synced 2024-11-22 20:33:07 +00:00
mc.mitm: shift the battery level mapping for sony controllers to avoid reporting critical battery levels too early
This commit is contained in:
parent
4f5cb51c1e
commit
d38ca828dd
2 changed files with 2 additions and 2 deletions
|
@ -131,7 +131,7 @@ namespace ams::controller {
|
|||
if (battery_level > 10)
|
||||
battery_level = 10;
|
||||
|
||||
m_battery = static_cast<uint8_t>(8 * (battery_level + 1) / 10) & 0x0e;
|
||||
m_battery = static_cast<uint8_t>(8 * (battery_level + 2) / 10) & 0x0e;
|
||||
|
||||
m_left_stick.SetData(
|
||||
static_cast<uint16_t>(stick_scale_factor * src->input0x31.left_stick.x) & 0xfff,
|
||||
|
|
|
@ -119,7 +119,7 @@ namespace ams::controller {
|
|||
if (battery_level > 10)
|
||||
battery_level = 10;
|
||||
|
||||
m_battery = static_cast<uint8_t>(8 * (battery_level + 1) / 10) & 0x0e;
|
||||
m_battery = static_cast<uint8_t>(8 * (battery_level + 2) / 10) & 0x0e;
|
||||
|
||||
m_left_stick.SetData(
|
||||
static_cast<uint16_t>(stick_scale_factor * src->input0x11.left_stick.x) & 0xfff,
|
||||
|
|
Loading…
Reference in a new issue