We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e8c15ea commit a659367Copy full SHA for a659367
1 file changed
src/platform/sdl/sdl2_ui.cpp
@@ -375,6 +375,11 @@ bool Sdl2Ui::RefreshDisplayMode() {
375
}
376
377
SDL_GetWindowSize(sdl_window, &window.width, &window.height);
378
+ #ifdef __EMSCRIPTEN__
379
+ double display_ratio = emscripten_get_device_pixel_ratio();
380
+ window.width = static_cast<int>(window.width * display_ratio);
381
+ window.height = static_cast<int>(window.height * display_ratio);
382
+ #endif
383
window.size_changed = true;
384
385
auto window_sg = lcf::makeScopeGuard([&]() {
0 commit comments