Skip to content

Commit

Permalink
make things work against SDL-2.0.9 at run time.
Browse files Browse the repository at this point in the history
  • Loading branch information
sezero committed Oct 15, 2021
1 parent c6cfc8f commit aba4b03
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
10 changes: 10 additions & 0 deletions src/SDL12_compat.c
Expand Up @@ -6383,6 +6383,16 @@ SDL_LoadWAV_RW(SDL12_RWops *rwops12, int freerwops12,

#include "dr_mp3.h"

static SDL_INLINE Sint64 SDLCALL SDL20_RWseek(SDL_RWops *ctx, Sint64 ofs, int whence) {
return ctx->seek(ctx, ofs, whence);
}
static SDL_INLINE size_t SDLCALL SDL20_RWread(SDL_RWops *ctx, void *ptr, size_t size, size_t n) {
return ctx->read(ctx, ptr, size, n);
}
static SDL_INLINE int SDLCALL SDL20_RWclose(SDL_RWops *ctx) {
return ctx->close(ctx);
}

static size_t
mp3_sdlrwops_read(void *data, void *buf, size_t bytesToRead)
{
Expand Down
6 changes: 0 additions & 6 deletions src/SDL20_syms.h
Expand Up @@ -253,12 +253,6 @@ SDL20_SYM(SDL_RWops *,RWFromMem,(void *a, int b),(a,b),return)
SDL20_SYM(SDL_RWops *,RWFromConstMem,(const void *a, int b),(a,b),return)
SDL20_SYM(SDL_RWops *,AllocRW,(void),(),return)
SDL20_SYM(void,FreeRW,(SDL_RWops *a),(a),)
SDL20_SYM(Sint64,RWsize,(SDL_RWops *a),(a),return)
SDL20_SYM(Sint64,RWseek,(SDL_RWops *a, Sint64 b, int c),(a,b,c),return)
SDL20_SYM(Sint64,RWtell,(SDL_RWops *a),(a),return)
SDL20_SYM(size_t,RWread,(SDL_RWops *a, void *b, size_t c, size_t d),(a,b,c,d),return)
SDL20_SYM(size_t,RWwrite,(SDL_RWops *a, const void *b, size_t c, size_t d),(a,b,c,d),return)
SDL20_SYM(int,RWclose,(SDL_RWops *a),(a),return)

SDL20_SYM_PASSTHROUGH(void *,malloc,(size_t a),(a),return)
SDL20_SYM_PASSTHROUGH(void *,calloc,(size_t a, size_t b),(a,b),return)
Expand Down

0 comments on commit aba4b03

Please sign in to comment.