From 7524130b7adb02a32c731639a2b16f030c44cae6 Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Fri, 15 Nov 2024 19:03:00 -0800 Subject: [PATCH] use bswap correctly --- lib/gamepad/audio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/gamepad/audio.c b/lib/gamepad/audio.c index 0acc01d..530cc37 100644 --- a/lib/gamepad/audio.c +++ b/lib/gamepad/audio.c @@ -1,6 +1,7 @@ #include "audio.h" #include +#include #include #include @@ -47,7 +48,7 @@ void handle_audio_packet(gamepad_context_t *ctx, unsigned char *data, size_t len // ap->format = reverse_bits(ap->format, 3); // ap->seq_id = reverse_bits(ap->seq_id, 10); - ap->payload_size = __bswap_16(ap->payload_size); + ap->payload_size = bswap_16(ap->payload_size); // ap->timestamp = reverse_bits(ap->timestamp, 32); if (ap->type == TYPE_VIDEO) {