fix(linux/input): battery values conversion (#2715)
This commit is contained in:
parent
0c02f8b2a4
commit
fb18b38f68
2 changed files with 4 additions and 2 deletions
|
|
@ -258,7 +258,9 @@ namespace platf::gamepad {
|
||||||
state = inputtino::PS5Joypad::BATTERY_FULL;
|
state = inputtino::PS5Joypad::BATTERY_FULL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
std::get<inputtino::PS5Joypad>(*gamepad->joypad).set_battery(state, battery.percentage);
|
// Battery values in Moonlight are in the range [0, 0xFF (255)]
|
||||||
|
// Inputtino expects them as a percentage [0, 100]
|
||||||
|
std::get<inputtino::PS5Joypad>(*gamepad->joypad).set_battery(state, battery.percentage / 2.55);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
2
third-party/inputtino
vendored
2
third-party/inputtino
vendored
|
|
@ -1 +1 @@
|
||||||
Subproject commit 2739465690c7bbd1a27cb4e285ff08f486a208e3
|
Subproject commit 8a33706a146787a1ed3666ce52888634dd16cb86
|
||||||
Loading…
Add table
Add a link
Reference in a new issue