Skip to content

Commit 8dd50f4

Browse files
Fix error
1 parent 9fe664e commit 8dd50f4

File tree

4 files changed

+15
-13
lines changed

4 files changed

+15
-13
lines changed

Controllers/ASRockPolychromeUSBController/ASRockPolychromeUSBController.cpp

+12
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,18 @@
2020
#define POLYCHROME_USB_INIT 0xA4
2121
#define POLYCHROME_USB_COMMIT 0x12
2222

23+
const char* polychrome_USB_zone_names[] =
24+
{
25+
"RGB LED 1 Header",
26+
"RGB LED 2 Header",
27+
"Addressable Header 1",
28+
"Addressable Header 2",
29+
"PCH",
30+
"IO Cover",
31+
"PCB",
32+
"Audio",
33+
};
34+
2335
PolychromeUSBController::PolychromeUSBController(hid_device* dev_handle, const char* path)
2436
{
2537
DMIInfo dmi;

Controllers/ASRockPolychromeUSBController/ASRockPolychromeUSBController.h

+1-11
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,7 @@ enum
5858
POLYCHROME_USB_ZONE_UNAVAILABLE = 0x1E, // Value from LEDCOUNT CFG if zone not present
5959
};
6060

61-
const char* polychrome_USB_zone_names[] =
62-
{
63-
"RGB LED 1 Header",
64-
"RGB LED 2 Header",
65-
"Addressable Header 1",
66-
"Addressable Header 2",
67-
"PCH",
68-
"IO Cover",
69-
"PCB",
70-
"Audio",
71-
};
61+
extern const char* polychrome_USB_zone_names[];
7262

7363
enum
7464
{

Controllers/AlienwareKeyboardController/RGBController_AlienwareAW510K.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ void RGBController_AlienwareAW510K::DeviceUpdateLEDs()
395395

396396
void RGBController_AlienwareAW510K::UpdateZoneLEDs(int zone)
397397
{
398-
controller->SetDirect( RGBGetRValue(zones[zone].colors[0]), RGBGetGValue(zones[zone].colors[0]), RGBGetBValue(zones[zone].colors[0]));
398+
controller->SetDirect((unsigned char) zone, RGBGetRValue(zones[zone].colors[0]), RGBGetGValue(zones[zone].colors[0]), RGBGetBValue(zones[zone].colors[0]));
399399
}
400400

401401
void RGBController_AlienwareAW510K::UpdateSingleLED(int led)

super_io/super_io.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ int superio_inb(int ioreg, int reg)
113113
lseek(dev_port_fd, ioreg, SEEK_SET);
114114
if(write(dev_port_fd, &reg, 1) == -1)
115115
{
116-
return;
116+
return -1;
117117
}
118118

119119
if(read(dev_port_fd, &temp, 1) == -1)

0 commit comments

Comments
 (0)