mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-13 09:35:23 -04:00
Webclient: Make /client res [width] [height] actually wok properly
This commit is contained in:
parent
2fd1e0538a
commit
10c958eed9
@ -3599,6 +3599,8 @@ cc_result Window_ExitFullscreen(void) {
|
|||||||
|
|
||||||
void Window_SetSize(int width, int height) {
|
void Window_SetSize(int width, int height) {
|
||||||
emscripten_set_canvas_element_size("#canvas", width, 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();
|
UpdateWindowBounds();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user