mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-17 05:58:44 +02:00
Fixed signed/unsigned warnings
Fixes https://github.com/libsdl-org/SDL/issues/7424
This commit is contained in:
@@ -113,7 +113,7 @@ static SDL_bool SetSlotLED(SDL_hid_device *dev, Uint8 slot, SDL_bool on)
|
||||
|
||||
static void UpdateSlotLED(SDL_DriverXbox360_Context *ctx)
|
||||
{
|
||||
if (ctx->player_lights && ctx->player_lights >= 0) {
|
||||
if (ctx->player_lights) {
|
||||
SetSlotLED(ctx->device->dev, (ctx->player_index % 4), SDL_TRUE);
|
||||
} else {
|
||||
SetSlotLED(ctx->device->dev, 0, SDL_FALSE);
|
||||
@@ -307,7 +307,7 @@ static void HIDAPI_DriverXbox360_HandleStatePacket(SDL_Joystick *joystick, SDL_D
|
||||
}
|
||||
SDL_SendJoystickAxis(timestamp, joystick, SDL_GAMEPAD_AXIS_RIGHTY, axis);
|
||||
|
||||
SDL_memcpy(ctx->last_state, data, SDL_min(size, sizeof(ctx->last_state)));
|
||||
SDL_memcpy(ctx->last_state, data, SDL_min((size_t)size, sizeof(ctx->last_state)));
|
||||
}
|
||||
|
||||
static SDL_bool HIDAPI_DriverXbox360_UpdateDevice(SDL_HIDAPI_Device *device)
|
||||
|
||||
@@ -87,7 +87,7 @@ static SDL_bool SetSlotLED(SDL_hid_device *dev, Uint8 slot, SDL_bool on)
|
||||
|
||||
static void UpdateSlotLED(SDL_DriverXbox360W_Context *ctx)
|
||||
{
|
||||
if (ctx->player_lights && ctx->player_lights >= 0) {
|
||||
if (ctx->player_lights) {
|
||||
SetSlotLED(ctx->device->dev, (ctx->player_index % 4), SDL_TRUE);
|
||||
} else {
|
||||
SetSlotLED(ctx->device->dev, 0, SDL_FALSE);
|
||||
|
||||
Reference in New Issue
Block a user