Adds support for LTO on macOS and Android.
Disable LTO by default on iOS even if `production=yes` is set.
Also add `linker` option to `server` platform missed in #63283.
Refactor code handling old arguments to make it simpler (breaks compat,
but is explicit enough about it and scripts are easy to fix).
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)
Increases the size of the wasm by around 3% (~300-350 KiB).
This enables using the Crypto object for hashing, signing and encryption,
and therefore reduces the gap between the features of the HTML5 platform
and other platforms.
Closes https://github.com/godotengine/godot-proposals/issues/3574.
(cherry picked from commit 3ff6d794c0)
Adds the is_process_running function to the native OS class and exposes it to script.
This is implemented on Windows and Unix platforms. A stub is provided for other platforms that do not support this function.
Documentation is updated to reflect new API function.
(cherry picked from commit f3c1232c59)
Used default value before, i.e. "same-origin", now uses "include" (i.e.
include for cross-origin if cross-origin is allowed).
(cherry picked from commit ffe248cbdf)
Allows detecting when a new version of the progressive web app service
worker is waiting (i.e. an update is pending), along a function to force
the update and reload all clients.
Use an offline first approach, where we prefer the cached version over
the network one.
This forces games using PWA to always re-export the project and not just
the PCK, so that the service worker version gets updated correctly, and
the end-user cache is correctly cleared on update.
Running `npm run serve` in `platform/javascript/` will start
a web server that uses `bin/` as its root folder. This means you
can extract a compiled web editor ZIP in this folder and immediately
be able to test the web editor.
Headers required for the use of SharedArrayBuffer are automatically
added to every response.
(cherry picked from commit 9ef9bfb12c)
I don't see any reference to gzip/svgz supported in the nanosvg library,
and the handful of test gzip compressed svgz files I tried failed loading.
Also cleaning a couple missing includes in platform export code.
Always build with the GUI subsystem.
Redirect stdout and stderr output to the parent process console.
Use CreateProcessW for blocking `execute` calls with piped stdout and stderr (prevent console windows for popping up when used with the GUI subsystem build, and have more consistent behavior with non-blocking calls).
Add `open_console` argument to the `execute` to open a new console window (for both blocking and non-blocking calls).
Remove `interface/editor/hide_console_window` editor setting.
Remove `Toggle System Console` menu option.
Remove `set_console_visible` and `is_console_visible` functions.
The code to populate the input data for WebAssembly was incorrectly
overriding values when multiple touches were present due to wrong
indexing.
(cherry picked from commit 470496d8d4)
Ensure better compatibility when emcc which may run some tools from
different paths (e.g. closure compiler).
This fixes externs include issues with modern emcc using the closure
compiler.
(cherry picked from commit eaedc92c61)
The "webgl/webgl2.h" include provides that function, but it's not
available in emscripten versions < 2.0.17 .
Since we need to support emscripten 1.39.9 (mono builds), this commit
adds a JS function in library_godot_display.js as a compatibility layer
for it, and implement glGetBufferSubData by funneling the call to that
function (so we don't have name collisions JS-side with recent emcc).
All those hacks are now moved to the platform directory instead of being
ifdefs inside the drivers implementations.