Commit ea7d5307acfb1daf9af6104b60b75114b15bcd27

Ryan C. Gordon 2022-03-31T14:11:52

emscripten: Proxy SDL_GetUsableDisplayBounds to the main thread.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/src/video/emscripten/SDL_emscriptenvideo.c b/src/video/emscripten/SDL_emscriptenvideo.c
index f6ee1e7..4c6038f 100644
--- a/src/video/emscripten/SDL_emscriptenvideo.c
+++ b/src/video/emscripten/SDL_emscriptenvideo.c
@@ -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;
         });
     }