From 21594063caae5a599edb45542668a96098016846 Mon Sep 17 00:00:00 2001 From: Adam Honse Date: Sun, 14 Sep 2025 13:41:44 -0500 Subject: [PATCH] More warning fixes --- .../RGBController_MSIMysticLightKB.cpp | 17 +++++++++-------- .../RGBController_PNYARGBEpicXGPU.cpp | 4 ++-- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/Controllers/MSIKeyboardController/MSIMysticLightKBController/RGBController_MSIMysticLightKB.cpp b/Controllers/MSIKeyboardController/MSIMysticLightKBController/RGBController_MSIMysticLightKB.cpp index 9536e6cdc..f4cd661c2 100644 --- a/Controllers/MSIKeyboardController/MSIMysticLightKBController/RGBController_MSIMysticLightKB.cpp +++ b/Controllers/MSIKeyboardController/MSIMysticLightKBController/RGBController_MSIMysticLightKB.cpp @@ -88,15 +88,16 @@ void RGBController_MSIKeyboard::DeviceUpdateLEDs() for(size_t idx = 0; idx < colors_size; idx++) { - ck[idx].time_frame = idx * 100 / colors_size; - ck[idx].color.R = RGBGetRValue(Mode.colors[idx]) * Mode.brightness / 100; - ck[idx].color.G = RGBGetGValue(Mode.colors[idx]) * Mode.brightness / 100; - ck[idx].color.B = RGBGetBValue(Mode.colors[idx]) * Mode.brightness / 100; + ck[idx].time_frame = (unsigned char)(idx * 100 / colors_size); + ck[idx].color.R = RGBGetRValue(Mode.colors[idx]) * Mode.brightness / 100; + ck[idx].color.G = RGBGetGValue(Mode.colors[idx]) * Mode.brightness / 100; + ck[idx].color.B = RGBGetBValue(Mode.colors[idx]) * Mode.brightness / 100; } - ck[colors_size].time_frame = 100; - ck[colors_size].color.R = RGBGetRValue(Mode.colors[0]) * Mode.brightness / 100; - ck[colors_size].color.G = RGBGetGValue(Mode.colors[0]) * Mode.brightness / 100; - ck[colors_size].color.B = RGBGetBValue(Mode.colors[0]) * Mode.brightness / 100; + + ck[colors_size].time_frame = 100; + ck[colors_size].color.R = RGBGetRValue(Mode.colors[0]) * Mode.brightness / 100; + ck[colors_size].color.G = RGBGetGValue(Mode.colors[0]) * Mode.brightness / 100; + ck[colors_size].color.B = RGBGetBValue(Mode.colors[0]) * Mode.brightness / 100; controller->SetMode(msi_mode, speed1, speed2, wave_direction, zone, ck); } diff --git a/Controllers/PNYARGBEpicXGPUController/RGBController_PNYARGBEpicXGPU.cpp b/Controllers/PNYARGBEpicXGPUController/RGBController_PNYARGBEpicXGPU.cpp index 0cb81fb4f..7d741427a 100644 --- a/Controllers/PNYARGBEpicXGPUController/RGBController_PNYARGBEpicXGPU.cpp +++ b/Controllers/PNYARGBEpicXGPUController/RGBController_PNYARGBEpicXGPU.cpp @@ -143,7 +143,7 @@ void RGBController_PNYARGBEpicXGPU::DeviceUpdateLEDs() { for(std::size_t i = 0; i < leds.size(); i++) { - UpdateSingleLED(i); + UpdateSingleLED((int)i); } } @@ -173,4 +173,4 @@ void RGBController_PNYARGBEpicXGPU::DeviceUpdateMode() controller->SetZoneMode(PNY_GPU_REG_ZONE_ARROW, modes[active_mode].value, 0, 0xFF, 0, 0); DeviceUpdateLEDs(); } -} \ No newline at end of file +}