From 889a78891307c0655e2e4282e889569590d17764 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Wed, 7 Aug 2024 17:14:22 -0700
Subject: [PATCH] Fixed build warnings
---
src/joystick/gdk/SDL_gameinputjoystick.c | 4 ++--
src/video/windows/SDL_windowsgameinput.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/joystick/gdk/SDL_gameinputjoystick.c b/src/joystick/gdk/SDL_gameinputjoystick.c
index 60b70a1764060..16e05cc3cff1a 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 e36eb7efd2f8d..6441d100175da 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]);
}