emscripten: Proxy SDL_GetUsableDisplayBounds to the main thread.

main
Ryan C. Gordon 2022-03-31 14:11:52 -04:00
parent fe79eb2fbb
commit ea7d5307ac
No known key found for this signature in database
GPG Key ID: FA148B892AB48044
1 changed files with 2 additions and 2 deletions

View File

@ -174,10 +174,10 @@ Emscripten_GetDisplayUsableBounds(_THIS, SDL_VideoDisplay * display, SDL_Rect *
if (rect) {
rect->x = 0;
rect->y = 0;
rect->w = EM_ASM_INT_V({
rect->w = MAIN_THREAD_EM_ASM_INT({
return window.innerWidth;
});
rect->h = EM_ASM_INT_V({
rect->h = MAIN_THREAD_EM_ASM_INT({
return window.innerHeight;
});
}