diff --git a/Controllers/ASRockPolychromeUSBController/ASRockPolychromeUSBController.cpp b/Controllers/ASRockPolychromeUSBController/ASRockPolychromeUSBController.cpp index 39e1f897a..9918b81da 100755 --- a/Controllers/ASRockPolychromeUSBController/ASRockPolychromeUSBController.cpp +++ b/Controllers/ASRockPolychromeUSBController/ASRockPolychromeUSBController.cpp @@ -20,6 +20,18 @@ #define POLYCHROME_USB_INIT 0xA4 #define POLYCHROME_USB_COMMIT 0x12 +const char* polychrome_USB_zone_names[] = +{ + "RGB LED 1 Header", + "RGB LED 2 Header", + "Addressable Header 1", + "Addressable Header 2", + "PCH", + "IO Cover", + "PCB", + "Audio", +}; + PolychromeUSBController::PolychromeUSBController(hid_device* dev_handle, const char* path) { DMIInfo dmi; diff --git a/Controllers/ASRockPolychromeUSBController/ASRockPolychromeUSBController.h b/Controllers/ASRockPolychromeUSBController/ASRockPolychromeUSBController.h index 381b127b8..02988f016 100755 --- a/Controllers/ASRockPolychromeUSBController/ASRockPolychromeUSBController.h +++ b/Controllers/ASRockPolychromeUSBController/ASRockPolychromeUSBController.h @@ -58,17 +58,7 @@ enum POLYCHROME_USB_ZONE_UNAVAILABLE = 0x1E, // Value from LEDCOUNT CFG if zone not present }; -const char* polychrome_USB_zone_names[] = -{ - "RGB LED 1 Header", - "RGB LED 2 Header", - "Addressable Header 1", - "Addressable Header 2", - "PCH", - "IO Cover", - "PCB", - "Audio", -}; +extern const char* polychrome_USB_zone_names[]; enum { diff --git a/Controllers/AlienwareKeyboardController/RGBController_AlienwareAW510K.cpp b/Controllers/AlienwareKeyboardController/RGBController_AlienwareAW510K.cpp index fb83d1345..1477e4228 100644 --- a/Controllers/AlienwareKeyboardController/RGBController_AlienwareAW510K.cpp +++ b/Controllers/AlienwareKeyboardController/RGBController_AlienwareAW510K.cpp @@ -395,7 +395,7 @@ void RGBController_AlienwareAW510K::DeviceUpdateLEDs() void RGBController_AlienwareAW510K::UpdateZoneLEDs(int zone) { - controller->SetDirect( RGBGetRValue(zones[zone].colors[0]), RGBGetGValue(zones[zone].colors[0]), RGBGetBValue(zones[zone].colors[0])); + controller->SetDirect((unsigned char) zone, RGBGetRValue(zones[zone].colors[0]), RGBGetGValue(zones[zone].colors[0]), RGBGetBValue(zones[zone].colors[0])); } void RGBController_AlienwareAW510K::UpdateSingleLED(int led) diff --git a/super_io/super_io.cpp b/super_io/super_io.cpp index e5b70edd2..926a960a3 100644 --- a/super_io/super_io.cpp +++ b/super_io/super_io.cpp @@ -113,7 +113,7 @@ int superio_inb(int ioreg, int reg) lseek(dev_port_fd, ioreg, SEEK_SET); if(write(dev_port_fd, ®, 1) == -1) { - return; + return -1; } if(read(dev_port_fd, &temp, 1) == -1)