mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-20 11:35:54 +00:00
Use ConvertToKilograms for balance board input display
This commit is contained in:
parent
5331a48b0c
commit
590f42dce4
1 changed files with 7 additions and 4 deletions
|
@ -810,10 +810,13 @@ static std::string GenerateWiiInputDisplayString(int remoteID, const DataReportB
|
|||
memcpy(&bb, extData, sizeof(bb));
|
||||
key.Decrypt((u8*)&bb, 0, sizeof(bb));
|
||||
|
||||
display_str += Analog1DToString(Common::swap16(bb.top_right), " TR", -1);
|
||||
display_str += Analog1DToString(Common::swap16(bb.bottom_right), " BR", -1);
|
||||
display_str += Analog1DToString(Common::swap16(bb.top_left), " TL", -1);
|
||||
display_str += Analog1DToString(Common::swap16(bb.bottom_left), " BL", -1);
|
||||
double top_right = BalanceBoardExt::ConvertToKilograms(Common::swap16(bb.top_right));
|
||||
double bottom_right = BalanceBoardExt::ConvertToKilograms(Common::swap16(bb.bottom_right));
|
||||
double top_left = BalanceBoardExt::ConvertToKilograms(Common::swap16(bb.top_left));
|
||||
double bottom_left = BalanceBoardExt::ConvertToKilograms(Common::swap16(bb.bottom_left));
|
||||
|
||||
display_str += fmt::format(" TR:{:5.2f}kg BR:{:5.2f}kg TL:{:5.2f}kg BL:{:5.2f}kg", top_right,
|
||||
bottom_right, top_left, bottom_left);
|
||||
}
|
||||
|
||||
return display_str;
|
||||
|
|
Loading…
Add table
Reference in a new issue