emscripten: use emscripten_get_screen_size api

This commit is contained in:
Joseph Kogut authored and Charlie Birks committed 2021-08-14 17:04:46 +01:00
1 parent abc04270b7
commit d8baad7e48
1 file changed
+1 -8
+1 -8
View File
@@ -137,14 +137,7 @@ Emscripten_VideoInit(_THIS)
/* Use a fake 32-bpp desktop mode */
mode.format = SDL_PIXELFORMAT_RGB888;
mode.w = EM_ASM_INT_V({
return screen.width;
});
mode.h = EM_ASM_INT_V({
return screen.height;
});
emscripten_get_screen_size(&mode.w, &mode.h);
mode.refresh_rate = 0;
mode.driverdata = NULL;