Skip to content
This repository has been archived by the owner on Feb 17, 2022. It is now read-only.

Commit

Permalink
emscripten: use emscripten_get_screen_size api
Browse files Browse the repository at this point in the history
  • Loading branch information
jakogut authored and Daft-Freak committed Aug 14, 2021
1 parent 0a089e5 commit e47dd15
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/video/emscripten/SDL_emscriptenvideo.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,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;
Expand Down

0 comments on commit e47dd15

Please sign in to comment.