From 16da7ae944377c94cfc908f7690667381bdd752a Mon Sep 17 00:00:00 2001 From: Andreas Rossberg Date: Tue, 25 Nov 2025 08:21:31 +0100 Subject: [PATCH] Add fix for Raylib FLAC bug to enable_formats.patch See https://github.com/raysan5/raylib/pull/5133/files --- src/c/enable_formats.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/c/enable_formats.patch b/src/c/enable_formats.patch index be4481e..a7b6c09 100644 --- a/src/c/enable_formats.patch +++ b/src/c/enable_formats.patch @@ -22,3 +22,15 @@ diff --git a/vendor/raylib/src/config.h b/vendor/raylib/src/config.h #define SUPPORT_FILEFORMAT_XM 1 #define SUPPORT_FILEFORMAT_MOD 1 +diff --git a/vendor/raylib/src/raudio.c b/vendor/raylib/src/raudio.c +--- a/vendor/raylib/src/raudio.c ++++ b/vendor/raylib/src/raudio.c +@@ -1757,7 +1757,7 @@ + else if (music.ctxType == MUSIC_AUDIO_QOA) qoaplay_close((qoaplay_desc *)music.ctxData); + #endif + #if defined(SUPPORT_FILEFORMAT_FLAC) +- else if (music.ctxType == MUSIC_AUDIO_FLAC) drflac_free((drflac *)music.ctxData, NULL); ++ else if (music.ctxType == MUSIC_AUDIO_FLAC) { drflac_close((drflac *)music.ctxData); drflac_free((drflac *)music.ctxData, NULL); } // Raylib fix #5133 + #endif + #if defined(SUPPORT_FILEFORMAT_XM) + else if (music.ctxType == MUSIC_MODULE_XM) jar_xm_free_context((jar_xm_context_t *)music.ctxData);