Minor fix in joystick support for simulation

Don't use channels variable as it breaks code isolation
This commit is contained in:
Oleg Kalachev 2025-02-15 03:29:09 +03:00
parent fafe630e4c
commit 67e4a95697

View File

@ -49,7 +49,7 @@ bool joystickInit() {
bool joystickGet(int16_t ch[16]) { bool joystickGet(int16_t ch[16]) {
SDL_JoystickUpdate(); SDL_JoystickUpdate();
for (uint8_t i = 0; i < sizeof(channels) / sizeof(channels[0]); i++) { for (uint8_t i = 0; i < 16; i++) {
ch[i] = SDL_JoystickGetAxis(joystick, i); ch[i] = SDL_JoystickGetAxis(joystick, i);
} }
return true; return true;