virtualx-engine/platform/javascript/js/libs
Jamie Pate 562d7c616d Improve performance of screen_get_dpi() in Javascript
Replace a bisect with a single multiplication when calling
screen_get_dpi() in Javascript

Tested the value of
window.matchMedia(`(resolution:${(window.devicePixelRatio*96).toFixed(100)}dpi)`).matches
which is true except for values that cause a lot of rounding errors
(e.g. dpr : 0.3  => resolution: 28.799999999999997dpi)

Even in these cases the value matches the result of the previous
`findDPI()` method.

See also:

6cff589b5b (r81273660)
(cherry picked from commit c2e3971013)
2022-08-24 17:16:33 +02:00
..
audio.worklet.js Update copyright statements to 2022 2022-01-13 15:54:13 +01:00
library_godot_audio.js Update copyright statements to 2022 2022-01-13 15:54:13 +01:00
library_godot_display.js Improve performance of screen_get_dpi() in Javascript 2022-08-24 17:16:33 +02:00
library_godot_fetch.js Revert "[HTML5] Fetch API now passes credentials." 2022-03-09 09:53:26 +01:00
library_godot_input.js [3.x] HTML5: Add support for Input.vibrate_handheld() 2022-07-28 13:20:05 +03:00
library_godot_javascript_singleton.js Update copyright statements to 2022 2022-01-13 15:54:13 +01:00
library_godot_os.js [HTML5] Implement JavaScript PWA update callbacks. 2022-02-06 18:33:13 +01:00
library_godot_runtime.js Update copyright statements to 2022 2022-01-13 15:54:13 +01:00