diff options
author | Ozkan Sezer <sezeroz@gmail.com> | 2021-02-08 00:20:56 +0300 |
---|---|---|
committer | Ozkan Sezer <sezeroz@gmail.com> | 2021-02-08 00:20:56 +0300 |
commit | 8e15287c317857aea28f46fa98b3cc39c4e49c07 (patch) | |
tree | f445f6c03622e598343afe814a405ab8795cce47 /src/joystick/hidapi/SDL_hidapi_xbox360.c | |
parent | 476ae52b27255f8c558220bf5d7739585a0f5e86 (diff) | |
download | sdl-8e15287c317857aea28f46fa98b3cc39c4e49c07.tar.gz |
avoid some pedantic warnings in array initializers
Diffstat (limited to 'src/joystick/hidapi/SDL_hidapi_xbox360.c')
-rw-r--r-- | src/joystick/hidapi/SDL_hidapi_xbox360.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/joystick/hidapi/SDL_hidapi_xbox360.c b/src/joystick/hidapi/SDL_hidapi_xbox360.c index 08f23eb73..f6c5cbe26 100644 --- a/src/joystick/hidapi/SDL_hidapi_xbox360.c +++ b/src/joystick/hidapi/SDL_hidapi_xbox360.c @@ -92,8 +92,9 @@ static SDL_bool SetSlotLED(hid_device *dev, Uint8 slot) { const SDL_bool blink = SDL_FALSE; Uint8 mode = (blink ? 0x02 : 0x06) + slot; - const Uint8 led_packet[] = { 0x01, 0x03, mode }; + Uint8 led_packet[] = { 0x01, 0x03, 0x00 }; + led_packet[2] = mode; if (hid_write(dev, led_packet, sizeof(led_packet)) != sizeof(led_packet)) { return SDL_FALSE; } |