Skip to content

Commit 304e489

Browse files
authored
ANDROID: Fix broken LoadMusicStream due to missing fopen redirect in raudio.c (#5589)
* ANDROID: Fix broken LoadMusicStream due to missing fopen macro override in raudio * ANDROID: Add missing forward declaration before fopen macro override in raudio
1 parent b57526d commit 304e489

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/raudio.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,11 @@ typedef struct tagBITMAPINFOHEADER {
180180
#include <stdio.h> // Required for: FILE, fopen(), fclose(), fread()
181181
#include <string.h> // Required for: strcmp() [Used in IsFileExtension(), LoadWaveFromMemory(), LoadMusicStreamFromMemory()]
182182

183+
#if defined(PLATFORM_ANDROID)
184+
FILE *android_fopen(const char *fileName, const char *mode);
185+
#define fopen(name, mode) android_fopen(name, mode)
186+
#endif
187+
183188
#if defined(RAUDIO_STANDALONE)
184189
#ifndef TRACELOG
185190
#define TRACELOG(level, ...) printf(__VA_ARGS__)

0 commit comments

Comments
 (0)