mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-05-13 00:54:36 -04:00
Fix warning in LogitechProtocolCommon.h
This commit is contained in:
@@ -9,6 +9,17 @@
|
||||
|
||||
#include <LogitechProtocolCommon.h>
|
||||
|
||||
const char* logitech_led_locations[] =
|
||||
{
|
||||
"Unknown",
|
||||
"Primary",
|
||||
"Logo",
|
||||
"Left",
|
||||
"Right"
|
||||
};
|
||||
|
||||
const int NUM_LOGITECH_LED_LOCATIONS = sizeof(logitech_led_locations);
|
||||
|
||||
static std::vector<uint16_t> logitech_RGB_pages =
|
||||
{
|
||||
LOGITECH_HIDPP_PAGE_RGB_EFFECTS1,
|
||||
|
||||
@@ -77,13 +77,8 @@ enum LOGITECH_DEVICE_MODE
|
||||
LOGITECH_DEVICE_LED_CUSTOM = 0x000C
|
||||
};
|
||||
|
||||
static const char* logitech_led_locations[] = {
|
||||
"Unknown",
|
||||
"Primary",
|
||||
"Logo",
|
||||
"Left",
|
||||
"Right"
|
||||
};
|
||||
extern const char* logitech_led_locations[];
|
||||
extern const int NUM_LOGITECH_LED_LOCATIONS;
|
||||
|
||||
// Used for: {GET,SET}_REGISTER_{REQ,RSP}, SET_LONG_REGISTER_RSP, GET_LONG_REGISTER_REQ
|
||||
struct message_short
|
||||
|
||||
@@ -139,7 +139,7 @@ void RGBController_LogitechLightspeed::SetupZones()
|
||||
led Lightspeed_logo_led;
|
||||
logitech_led new_led = controller->lightspeed->getLED_info(i);
|
||||
|
||||
if(new_led.location < sizeof(logitech_led_locations) )
|
||||
if(new_led.location < NUM_LOGITECH_LED_LOCATIONS )
|
||||
{
|
||||
Lightspeed_logo_zone.name = logitech_led_locations[new_led.location];
|
||||
Lightspeed_logo_zone.name.append(" ");
|
||||
|
||||
Reference in New Issue
Block a user