Skip to content

Commit 973f7f8

Browse files
committed
fix windows build
1 parent 670b692 commit 973f7f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/joystick/hidapi/SDL_hidapi_lg4ff.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -649,8 +649,8 @@ static SDL_bool HIDAPI_DriverLg4ff_HandleState(SDL_HIDAPI_Device *device,
649649

650650
for (i = 0;i < num_buttons;i++) {
651651
int bit_num = bit_offset + i;
652-
SDL_bool button_on = HIDAPI_DriverLg4ff_GetBit(report_buf, bit_num, report_size);
653-
SDL_bool button_was_on = HIDAPI_DriverLg4ff_GetBit(ctx->last_report_buf, bit_num, report_size);
652+
SDL_bool button_on = HIDAPI_DriverLg4ff_GetBit(report_buf, bit_num, (size_t)report_size);
653+
SDL_bool button_was_on = HIDAPI_DriverLg4ff_GetBit(ctx->last_report_buf, bit_num, (size_t)report_size);
654654
if(button_on != button_was_on){
655655
state_changed = SDL_TRUE;
656656
SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_A + i, button_on ? SDL_PRESSED : SDL_RELEASED);

0 commit comments

Comments
 (0)