mirror of
https://github.com/godotengine/godot.git
synced 2024-12-03 09:52:18 +08:00
178546ac3e
This was caused by the devicePixelRatio being applied twice, once by the HTML code, once by the OS code. More specifically, OS.get_window_size() would return the canvas element size, while OS.set_window_size() would set the element size to the specified value times the devicePixelRatio. Calling OS.set_window_size(OS.get_window_size()) would reapply the devicePixelRatio every time. This commit changes the behaviour so that OS.set_window_size() do not apply the devicePixelRatio to the canvas element size, by it divides the CSS size instead. |
||
---|---|---|
.. | ||
api | ||
export | ||
js | ||
.eslintrc.engine.js | ||
.eslintrc.js | ||
.eslintrc.libs.js | ||
audio_driver_javascript.cpp | ||
audio_driver_javascript.h | ||
detect.py | ||
display_server_javascript.cpp | ||
display_server_javascript.h | ||
dom_keys.inc | ||
emscripten_helpers.py | ||
godot_audio.h | ||
godot_js.h | ||
http_client_javascript.cpp | ||
http_client.h.inc | ||
http_request.h | ||
javascript_eval.cpp | ||
javascript_main.cpp | ||
logo.png | ||
os_javascript.cpp | ||
os_javascript.h | ||
package-lock.json | ||
package.json | ||
platform_config.h | ||
run_icon.png | ||
SCsub |