diff --git a/src/joystick/gdk/SDL_gameinputjoystick.c b/src/joystick/gdk/SDL_gameinputjoystick.c index 60b70a1764..16e05cc3cf 100644 --- a/src/joystick/gdk/SDL_gameinputjoystick.c +++ b/src/joystick/gdk/SDL_gameinputjoystick.c @@ -603,7 +603,7 @@ static void GAMEINPUT_JoystickUpdate(SDL_Joystick *joystick) uint32_t i; uint32_t button_count = IGameInputReading_GetControllerButtonState(reading, info->controllerButtonCount, button_state); for (i = 0; i < button_count; ++i) { - SDL_SendJoystickButton(timestamp, joystick, i, button_state[i]); + SDL_SendJoystickButton(timestamp, joystick, (Uint8)i, button_state[i]); } SDL_stack_free(button_state); } @@ -613,7 +613,7 @@ static void GAMEINPUT_JoystickUpdate(SDL_Joystick *joystick) uint32_t i; uint32_t axis_count = IGameInputReading_GetControllerAxisState(reading, info->controllerAxisCount, axis_state); for (i = 0; i < axis_count; ++i) { - SDL_SendJoystickAxis(timestamp, joystick, i, CONVERT_AXIS(axis_state[i])); + SDL_SendJoystickAxis(timestamp, joystick, (Uint8)i, CONVERT_AXIS(axis_state[i])); } SDL_stack_free(axis_state); } diff --git a/src/video/windows/SDL_windowsgameinput.c b/src/video/windows/SDL_windowsgameinput.c index e36eb7efd2..6441d10017 100644 --- a/src/video/windows/SDL_windowsgameinput.c +++ b/src/video/windows/SDL_windowsgameinput.c @@ -313,7 +313,7 @@ static void GAMEINPUT_HandleMouseDelta(WIN_GameInputData *data, SDL_Window *wind } if (delta.buttons) { for (int i = 0; i < MAX_GAMEINPUT_BUTTONS; ++i) { - const GameInputMouseButtons mask = (1 << i); + const GameInputMouseButtons mask = (1 << i); if (delta.buttons & mask) { SDL_SendMouseButton(timestamp, window, mouseID, (state.buttons & mask) ? SDL_PRESSED : SDL_RELEASED, GAMEINPUT_button_map[i]); }