1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-21 18:22:33 +01:00

Input: change brightness data type in hid to u32

This commit is contained in:
Megamouse 2022-10-21 22:50:08 +02:00
parent a16d18d83c
commit 6c0bc43776
2 changed files with 3 additions and 3 deletions

View File

@ -240,9 +240,9 @@ std::shared_ptr<PadDevice> hid_pad_handler<Device>::get_device(const std::string
}
template <class Device>
u32 hid_pad_handler<Device>::get_battery_color(u8 battery_level, int brightness)
u32 hid_pad_handler<Device>::get_battery_color(u8 battery_level, u32 brightness)
{
static const std::array<u32, 12> battery_level_clr = {0xff00, 0xff33, 0xff66, 0xff99, 0xffcc, 0xffff, 0xccff, 0x99ff, 0x66ff, 0x33ff, 0x00ff, 0x00ff};
static constexpr std::array<u32, 12> battery_level_clr = {0xff00, 0xff33, 0xff66, 0xff99, 0xffcc, 0xffff, 0xccff, 0x99ff, 0x66ff, 0x33ff, 0x00ff, 0x00ff};
const u32 combined_color = battery_level_clr[battery_level < battery_level_clr.size() ? battery_level : 0];

View File

@ -110,7 +110,7 @@ protected:
return *static_cast<const u32*>(buf);
}
static u32 get_battery_color(u8 battery_level, int brightness);
static u32 get_battery_color(u8 battery_level, u32 brightness);
private:
std::shared_ptr<PadDevice> get_device(const std::string& device) override;