This is important for some GDNative bindings and probably for Mono. They
may keep references to audio objects which are freed when they are
unregistered. If AudioServer is already deleted at that point, it causes
segfaults.
Using `misc/scripts/fix_headers.py` on all Godot files.
Some missing header guards were added, and the header inclusion order
was fixed in the Bullet module.
If a scene is modified and a user closes the editor and selects the "Save
and exit" option in the modal dialog -- the editor crashes. This appears
to be a result of the message queue being memdeleted AFTER visual servers
have been destroyed. Remnant textures handled by the message queue throw a
NRE when their own ~Texture destructors reference the visual servers.
This fixes bugs: #12946 and #12813.
Setting the vsync in the main thread, after the rendering thread starts
and takes the OpenGL context fails, so we need to do that before.
Also, for some reason, the main thread cannot make current the context
anymore.
Fixes#13447
Removes the need for _MKSTR all over the place which has the drawback of
converting _MKSTR(UNKNOWN_DEFINE) to "UKNOWN_DEFINE" instead of throwing
a compilation error.
This makes the interfaces available, without implementation, in other
platforms and the editor, which facilitates documenting platform-exclusive
classes.
Platform-exclusive APIs must be set up in platform/<platform>/api/api.cpp.
Provide noop method-implementations where necessary.
Also setup and document the HTML5 platform's JavaScript singleton.
This field represents if the class is exposed to the scripting API.
The value is 'true' if the class was registered manually ('ClassDB::register_*class()'), otherwise it's false (registered on '_post_initialize').
- Added missing registration of classes that are meant to be exposed.
Previously logging logic was scattered over OS class implementations
with plenty of duplication. Major changes in this commit:
- Extracted logging logic into a separate Logger hierarchy. It allows
easy configuration of logging mechanism depending on compile-time or
run-time configuration.
- Implemented RotatedFileLogger which is usually used with StdLogger,
providing persistency of logs. It is often important to be able to
obtain logs of the game even in production to be able to understand
what happened prior to some problem. On mobile there previously was
no way to obtain the logs aside from having the device connected to
your machine.
- flush() is not performed in release mode for every logged line. It
is only performed for errors.