emscripten: Fixes for data addresses above 2gb

This includes both wasm64 and wasm32 when addressing more than 2gb of memory.

Fixes: #9052

(Manually cherry-picked from 3deb07ea395373204462130c1e062bc1f71fe060.)
This commit is contained in:
Ryan C. Gordon
2024-10-08 17:41:18 -04:00
parent c34790f9f1
commit 02434cd293
4 changed files with 12 additions and 5 deletions

View File

@@ -428,7 +428,7 @@ typedef Sint64 SDL_Time;
#define SDL_PRIs64 "I64d"
#elif defined(PRIs64)
#define SDL_PRIs64 PRIs64
#elif defined(__LP64__) && !defined(SDL_PLATFORM_APPLE)
#elif defined(__LP64__) && !defined(SDL_PLATFORM_APPLE) && !defined(__EMSCRIPTEN__)
#define SDL_PRIs64 "ld"
#else
#define SDL_PRIs64 "lld"
@@ -439,7 +439,7 @@ typedef Sint64 SDL_Time;
#define SDL_PRIu64 "I64u"
#elif defined(PRIu64)
#define SDL_PRIu64 PRIu64
#elif defined(__LP64__) && !defined(SDL_PLATFORM_APPLE)
#elif defined(__LP64__) && !defined(SDL_PLATFORM_APPLE) && !defined(__EMSCRIPTEN__)
#define SDL_PRIu64 "lu"
#else
#define SDL_PRIu64 "llu"