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 3deb07ea39.)
This commit is contained in:
Ryan C. Gordon 2024-10-08 17:41:18 -04:00
parent c34790f9f1
commit 02434cd293
No known key found for this signature in database
GPG key ID: FA148B892AB48044
4 changed files with 12 additions and 5 deletions

View file

@ -88,7 +88,7 @@ bool Emscripten_UpdateWindowFramebuffer(SDL_VideoDevice *_this, SDL_Window *wind
SDL3.imageCtx = SDL3.ctx;
}
var data = SDL3.image.data;
var src = pixels >> 2;
var src = pixels / 4;
var dst = 0;
var num;