Skip to content

Commit 3692c70

Browse files
committed
fix format string on haiku building
1 parent d6cc30f commit 3692c70

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/haptic/hidapi/SDL_hidapihaptic_lg4ff.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ static Uint16 to_linux_direction(SDL_HapticDirection *src)
191191
} else if (!src->dir[0]) {
192192
return (Uint16) (src->dir[1] >= 0 ? 0x8000 : 0);
193193
} else {
194-
float f = SDL_atan2(src->dir[1], src->dir[0]); /* Ideally we'd use fixed point math instead of floats... */
194+
float f = (float)SDL_atan2(src->dir[1], src->dir[0]); /* Ideally we'd use fixed point math instead of floats... */
195195
/*
196196
SDL_atan2 takes the parameters: Y-axis-value and X-axis-value (in that order)
197197
- Y-axis-value is the second coordinate (from center to SOUTH)
@@ -838,7 +838,7 @@ static void *SDL_HIDAPI_HapticDriverLg4ff_Open(SDL_Joystick *joystick)
838838

839839
ctx->product_id = SDL_GetJoystickProduct(joystick);
840840

841-
sprintf(ctx->thread_name_buf, "SDL_hidapihaptic_lg4ff 0x%16llx %04x:%04x", (Uint64)joystick, USB_VENDOR_ID_LOGITECH, ctx->product_id);
841+
sprintf(ctx->thread_name_buf, "SDL_hidapihaptic_lg4ff %d %04x:%04x", SDL_GetJoystickID(joystick), USB_VENDOR_ID_LOGITECH, ctx->product_id);
842842
ctx->stop_thread = false;
843843
ctx->thread = SDL_CreateThread(SDL_HIDAPI_HapticDriverLg4ff_ThreadFunction, ctx->thread_name_buf, ctx);
844844

0 commit comments

Comments
 (0)