From 03ae792df35a15e80e16a41ea2cf19971fc8d8f6 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Tue, 17 Sep 2024 11:36:55 -0700
Subject: [PATCH] Fixed the recording field in audio device events
Fixes https://github.com/libsdl-org/SDL/issues/10885
---
src/audio/SDL_audio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/audio/SDL_audio.c b/src/audio/SDL_audio.c
index ba37fcb17b4ef..eb20ed6905dbe 100644
--- a/src/audio/SDL_audio.c
+++ b/src/audio/SDL_audio.c
@@ -2474,7 +2474,7 @@ void SDL_UpdateAudio(void)
SDL_zero(event);
event.type = i->type;
event.adevice.which = (Uint32) i->devid;
- event.adevice.recording = ((i->devid & (1<<0)) != 0); // bit #0 of devid is set for playback devices and unset for recording.
+ event.adevice.recording = ((i->devid & (1<<0)) == 0); // bit #0 of devid is set for playback devices and unset for recording.
SDL_PushEvent(&event);
}
SDL_free(i);