mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-10-20 07:35:03 -04:00
Fix possible loss of data, switch double to float in NvidiaESAController.cpp
This commit is contained in:
1 parent
3b9aa16ce6
commit
ab0dfb0f6a
1 file changed
+3
-3
@@ -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