An NVIDIA profile is applied to the current executable to disable
threaded OpenGL optimizations on Windows (see #71472). But because the
application is only added to the profile upon the profile creation,
newer executables won't be added to the profile (e.g. if the profile is
created on first launch of Godot_v4.1-stable_win64.exe, when users
update the editor and launch Godot_v4.2-stable_win64.exe, the profile
will never be applied to this new executable).
This patch fixes that scenario by splitting creating the profile (if it
doesn't exist) and adding the application (if it doesn't have a profile
applied) into two separate steps.
Applications that have been manually added to a different profile aren't
overriden to avoid confusing users who know what they're doing.
This means no CPU occlusion culling (and not compiling Embree), unless
you compile custom export templates with `module_raycast_enabled=yes`.
This reduces the memory footprint significantly, and binary size.
Fixes#70621.
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
The UWP platform port was never ported to the Godot 4.0+ API,
and it's now accumulating bitrot as it doesn't compile, and thus
we no longer propagate platform changes in it.
So we finally remove to acknowledge this state. There's still some
interest in reviving the UWP port eventually, especially as support
for Direct3D 12 will soon be merged, but when that happens it will
be easiest to redo it from scratch.
This allows to include script_instance.h directly in the
generated gdvirtual.gen.inc, and remove excessive includes
from the codebase.
This should also allow Resource to use GDVIRTUAL macros,
which wasn't possible previously due to a circular dependency.
Code now always double quotes the filename to use as command line
argument when calling explorer.exe. In particular, commas in a filename
would be interpreted by explorer.exe as separators for commands.
Similarly a trim_suffix for "file://" is assumed to be a mistake, this
could potentially be a PREfix that we want to strip, but never a suffix.
Since it didn't seem needed in the end, we removed it.
It wrongly returned 20 on array buffers, which used to be the enumerator
value of Godot 3.x's type PoolByteArray, and now is the value of type Color,
while it should return 29 which is the enumerator value for PackedByteArray.
When a hardware keyboard is connected, all key events come through so we can route them directly to the engine.
This is not the case for soft keyboards, for which the current logic was designed as it requires extra processing.