godot/platform
Joel Croteau 6e78eec37f
Fix reload of GDExtension libraries in framework package on macos
`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)
2024-09-16 16:55:39 +02:00
..
android Update the Android `fileLastModified` method to return values in seconds instead of milliseconds 2024-09-16 16:46:41 +02:00
ios [iOS] Fix dylib GDExtension convertion. 2024-08-09 12:44:48 +03:00
linuxbsd Wayland: Avoid recreating input objects on capability change 2024-08-09 15:42:23 +02:00
macos [macOS] Fix wrong object type in joypad queue. 2024-08-12 14:09:18 +03:00
web Fix AudioStreamPlayer get_playback_position() for web build 2024-09-16 16:41:06 +02:00
windows Fix reload of GDExtension libraries in framework package on macos 2024-09-16 16:55:39 +02:00
SCsub Update pre-commit hooks configuration to use `ruff` instead of `black` 2024-05-21 18:02:29 -05:00
register_platform_apis.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00