Fix possible loss of data, switch double to float in NvidiaESAController.cpp
This commit is contained in:
parent
3b9aa16ce6
commit
ab0dfb0f6a
1 changed files with 3 additions and 3 deletions
|
|
@ -50,9 +50,9 @@ std::string NvidiaESAController::GetFirmwareVersion()
|
|||
|
||||
void NvidiaESAController::SetZoneColor(unsigned int zone_idx, RGBColor color)
|
||||
{
|
||||
unsigned char red = 0x0F - 0x0F * RGBGetRValue(color) / 255.0;
|
||||
unsigned char grn = 0x0F - 0x0F * RGBGetGValue(color) / 255.0;
|
||||
unsigned char blu = 0x0F - 0x0F * RGBGetBValue(color) / 255.0;
|
||||
unsigned char red = (unsigned char)(0x0F - 0x0F * RGBGetRValue(color) / 255.0f);
|
||||
unsigned char grn = (unsigned char)(0x0F - 0x0F * RGBGetGValue(color) / 255.0f);
|
||||
unsigned char blu = (unsigned char)(0x0F - 0x0F * RGBGetBValue(color) / 255.0f);
|
||||
|
||||
unsigned char usb_buf[4];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue