You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Merge pull request #106030 from raulsntos/gdextension/main-loop-callbacks
[GDExtension] Add function to register main loop callbacks
This commit is contained in:
@@ -4583,6 +4583,8 @@ int Main::start() {
|
||||
movie_writer->begin(DisplayServer::get_singleton()->window_get_size(), fixed_fps, Engine::get_singleton()->get_write_movie_path());
|
||||
}
|
||||
|
||||
GDExtensionManager::get_singleton()->startup();
|
||||
|
||||
if (minimum_time_msec) {
|
||||
uint64_t minimum_time = 1000 * minimum_time_msec;
|
||||
uint64_t elapsed_time = OS::get_singleton()->get_ticks_usec();
|
||||
@@ -4788,6 +4790,8 @@ bool Main::iteration() {
|
||||
process_max = MAX(process_ticks, process_max);
|
||||
uint64_t frame_time = OS::get_singleton()->get_ticks_usec() - ticks;
|
||||
|
||||
GDExtensionManager::get_singleton()->frame();
|
||||
|
||||
for (int i = 0; i < ScriptServer::get_language_count(); i++) {
|
||||
ScriptServer::get_language(i)->frame();
|
||||
}
|
||||
@@ -4906,6 +4910,8 @@ void Main::cleanup(bool p_force) {
|
||||
}
|
||||
#endif
|
||||
|
||||
GDExtensionManager::get_singleton()->shutdown();
|
||||
|
||||
for (int i = 0; i < TextServerManager::get_singleton()->get_interface_count(); i++) {
|
||||
TextServerManager::get_singleton()->get_interface(i)->cleanup();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user