Skip to content

Commit

Permalink
use screen resolution instead of canvas size
Browse files Browse the repository at this point in the history
  • Loading branch information
Daft-Freak committed Sep 13, 2016
1 parent 791b946 commit c68cac8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/video/emscripten/SDL_emscriptenvideo.c
Expand Up @@ -134,15 +134,17 @@ int
Emscripten_VideoInit(_THIS)
{
SDL_DisplayMode mode;
double css_w, css_h;

/* Use a fake 32-bpp desktop mode */
mode.format = SDL_PIXELFORMAT_RGB888;

emscripten_get_element_css_size(NULL, &css_w, &css_h);
mode.w = EM_ASM_INT_V({
return screen.width;
});

mode.w = css_w;
mode.h = css_h;
mode.h = EM_ASM_INT_V({
return screen.height;
});

mode.refresh_rate = 0;
mode.driverdata = NULL;
Expand Down

0 comments on commit c68cac8

Please sign in to comment.