mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-03-24 17:01:05 -04:00
Fix possible loss of data, switch double to float in NvidiaESAController.cpp
This commit is contained in:
@@ -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];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user