src/video/emscripten/SDL_emscriptenvideo.c
changeset 10333 a0495857c42f
parent 10332 359290a75710
child 10334 0494a8336c48
     1.1 --- a/src/video/emscripten/SDL_emscriptenvideo.c	Tue Sep 13 00:03:54 2016 -0700
     1.2 +++ b/src/video/emscripten/SDL_emscriptenvideo.c	Tue Sep 13 00:03:55 2016 -0700
     1.3 @@ -134,15 +134,17 @@
     1.4  Emscripten_VideoInit(_THIS)
     1.5  {
     1.6      SDL_DisplayMode mode;
     1.7 -    double css_w, css_h;
     1.8  
     1.9      /* Use a fake 32-bpp desktop mode */
    1.10      mode.format = SDL_PIXELFORMAT_RGB888;
    1.11  
    1.12 -    emscripten_get_element_css_size(NULL, &css_w, &css_h);
    1.13 +    mode.w = EM_ASM_INT_V({
    1.14 +        return screen.width;
    1.15 +    });
    1.16  
    1.17 -    mode.w = css_w;
    1.18 -    mode.h = css_h;
    1.19 +    mode.h = EM_ASM_INT_V({
    1.20 +        return screen.height;
    1.21 +    });
    1.22  
    1.23      mode.refresh_rate = 0;
    1.24      mode.driverdata = NULL;