sdl2-compat: SDL_ConvertAudio: Fix source/destination format confusion

From 8fe042f77e125d67a103d6e6ac3635dcbe68065c Mon Sep 17 00:00:00 2001
From: David Gow <[EMAIL REDACTED]>
Date: Fri, 19 May 2023 13:49:28 +0800
Subject: [PATCH] SDL_ConvertAudio: Fix source/destination format confusion

The SDL_ConvertAudio() function accidentally uses the destination format
as the source format, breaking (presumably amongst other things) 8-bit
WAV playback in Uplink under sdl12-compat.
---
 src/sdl2_compat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/sdl2_compat.c b/src/sdl2_compat.c
index 8f693c7..2ea3d3e 100644
--- a/src/sdl2_compat.c
+++ b/src/sdl2_compat.c
@@ -5503,7 +5503,7 @@ SDL_ConvertAudio(SDL_AudioCVT *cvt)
             (Uint8 *)&cvt->filters[SDL_AUDIOCVT_MAX_FILTERS + 1] - (sizeof(AudioParam) & ~3),
             sizeof(ap));
 
-        src_format = ap.dst_format;
+        src_format = ap.src_format;
         src_channels = ap.src_channels;
         src_rate = ap.src_rate;
         dst_format = ap.dst_format;