Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added rudimentary support for HiDPI on WASM
Due to a bug in SDL2 (emscripten-ports/SDL2#109), HiDPI mode forces the canvas to be larger on HiDPI monitors. To work around this, use the following CSS rules on the canvas: ``` @media (min-resolution: 144dpi) and (max-resolution: 240dpi) { canvas.emscripten { clip-path: polygon(0% 0%, 0% 50%, 50% 50%, 50% 0%); margin-left: 620px; margin-top: 350px; } } @media (min-resolution: 240dpi) and (max-resolution: 336dpi) { canvas.emscripten { clip-path: polygon(0% 0%, 0% 33.33333333%, 33.33333333% 33.33333333%, 33.33333333% 0%); margin-left: 1240px; margin-top: 700px; } } ``` HiDPI can be disabled by adding `-DNO_EMSCRIPTEN_HIDPI` to CPPFLAGS.
- Loading branch information