From 10c958eed9533cdd73fe9cc228d41419abaf357a Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Sat, 12 Dec 2020 20:56:25 +1100 Subject: [PATCH] Webclient: Make /client res [width] [height] actually wok properly --- src/Window.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Window.c b/src/Window.c index 08c0c012e..d22a45b01 100644 --- a/src/Window.c +++ b/src/Window.c @@ -3599,6 +3599,8 @@ cc_result Window_ExitFullscreen(void) { void Window_SetSize(int width, int height) { emscripten_set_canvas_element_size("#canvas", width, height); + /* CSS size is in CSS units not pixel units */ + emscripten_set_element_css_size("#canvas", width / DisplayInfo.ScaleX, height / DisplayInfo.ScaleY); UpdateWindowBounds(); }