`GDExtension::open_library` has a check in it to see if the library was loaded
from a temp file, and if it was to restore the original name as that is the one
we actually care about. This check is breaking extension reloading on Mac when
the library path is to a framework folder, as the file inside the framework
will not generally be the same name as the folder.
This check also shouldn't be necessary even on Windows, which is the only
platform that uses `generate_temp_files`, since disposal of the created temp
file is handled within `OS_Windows::open_dynamic_library`, and
`GDExtension::open_library` (which is the only function to call
`open_dynamic_library` with a `p_data` argument) only cares about the original
library file path and has to do extra work to remove the name of the temp file.
Instead, I have removed that check and set `OS_Windows::open_dynamic_library`
to return the name of the original file and not the name of the copy.
This fixes GDExtension reloading on macOS. I do not have a Windows machine
available to test that it still works properly on Windows, so someone should
check that before merging this.
(cherry picked from commit f44d6a235f)
Using the member initialization encouraged in NVAPI documentation for
NVDRS_SETTING results in builds enabling `dev_mode` breaking. Default
aggregate initialization results in a clean build though.
On Windows this allows to avoid having to change the owner of the window
after it has been created, which in rare circumstances may cause the
window to bug out.
ANGLE needs to be told to resize the DXGI swap chain using
`eglWaitNative`. Otherwise the resize will only happen in
`eglSwapBuffers`, which causes some janky stretching during window
resize.
`WM_WINDOWPOSCHANGED` may be received before `CreateWindowExW` has even
returned, when the window's rendering context or OpenGL context hasn't
been created yet.
G-SYNC (NVIDIA's VRR) is known to be buggy on windowed mode in Windows.
While the driver only enables G-SYNC for full screen mode by default,
users can toggle it on for windowed mode too, resulting in unstable
refresh rates during Editor usage.
This patch extends Godot's NVIDIA profile to force the default full
screen mode only G-SYNC with Godot.
If window was maximized before minimizing, restoring the window
afterwards using SW_RESTORE seems to cause the window to forget its
original size and position before being maximized, causing the window to
fill the screen instead.