mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
[GDExtension] Add function to register main loop callbacks
This commit is contained in:
parent
19bb18716e
commit
73488f5afd
6 changed files with 105 additions and 0 deletions
|
|
@ -4562,6 +4562,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();
|
||||
|
|
@ -4767,6 +4769,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();
|
||||
}
|
||||
|
|
@ -4887,6 +4891,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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue