From d8baad7e483ff04c0bbd7fa8d6d49dce243376df Mon Sep 17 00:00:00 2001 From: Joseph Kogut Date: Wed, 27 Feb 2019 14:15:40 -0800 Subject: [PATCH] emscripten: use emscripten_get_screen_size api --- src/video/emscripten/SDL_emscriptenvideo.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/video/emscripten/SDL_emscriptenvideo.c b/src/video/emscripten/SDL_emscriptenvideo.c index b38862ec7..a376b5009 100644 --- a/src/video/emscripten/SDL_emscriptenvideo.c +++ b/src/video/emscripten/SDL_emscriptenvideo.c @@ -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;