Reorder native extension initialization steps

pull/715/head
Gilles Roudière 2022-02-28 15:44:54 +01:00
parent 1cbf121b08
commit a94148ca4c
2 changed files with 10 additions and 10 deletions

View File

@ -68,14 +68,14 @@ public:
void register_core_initializer(Callback p_core_init) const; void register_core_initializer(Callback p_core_init) const;
void register_server_initializer(Callback p_server_init) const; void register_server_initializer(Callback p_server_init) const;
void register_driver_initializer(Callback p_driver_init) const;
void register_scene_initializer(Callback p_scene_init) const; void register_scene_initializer(Callback p_scene_init) const;
void register_editor_initializer(Callback p_editor_init) const; void register_editor_initializer(Callback p_editor_init) const;
void register_driver_initializer(Callback p_driver_init) const;
void register_core_terminator(Callback p_core_terminate) const; void register_core_terminator(Callback p_core_terminate) const;
void register_server_terminator(Callback p_server_terminate) const; void register_server_terminator(Callback p_server_terminate) const;
void register_scene_terminator(Callback p_scene_terminate) const; void register_scene_terminator(Callback p_scene_terminate) const;
void register_editor_terminator(Callback p_editor_terminate) const;
void register_driver_terminator(Callback p_driver_terminate) const; void register_driver_terminator(Callback p_driver_terminate) const;
void register_editor_terminator(Callback p_editor_terminate) const;
GDNativeBool init() const; GDNativeBool init() const;
}; };

View File

@ -103,14 +103,14 @@ void GDExtensionBinding::InitObject::register_scene_initializer(Callback p_scene
GDExtensionBinding::init_callbacks[GDNATIVE_INITIALIZATION_SCENE] = p_scene_init; GDExtensionBinding::init_callbacks[GDNATIVE_INITIALIZATION_SCENE] = p_scene_init;
} }
void GDExtensionBinding::InitObject::register_editor_initializer(Callback p_editor_init) const {
GDExtensionBinding::init_callbacks[GDNATIVE_INITIALIZATION_EDITOR] = p_editor_init;
}
void GDExtensionBinding::InitObject::register_driver_initializer(Callback p_driver_init) const { void GDExtensionBinding::InitObject::register_driver_initializer(Callback p_driver_init) const {
GDExtensionBinding::init_callbacks[GDNATIVE_INITIALIZATION_DRIVER] = p_driver_init; GDExtensionBinding::init_callbacks[GDNATIVE_INITIALIZATION_DRIVER] = p_driver_init;
} }
void GDExtensionBinding::InitObject::register_editor_initializer(Callback p_editor_init) const {
GDExtensionBinding::init_callbacks[GDNATIVE_INITIALIZATION_EDITOR] = p_editor_init;
}
void GDExtensionBinding::InitObject::register_core_terminator(Callback p_core_terminate) const { void GDExtensionBinding::InitObject::register_core_terminator(Callback p_core_terminate) const {
GDExtensionBinding::terminate_callbacks[GDNATIVE_INITIALIZATION_CORE] = p_core_terminate; GDExtensionBinding::terminate_callbacks[GDNATIVE_INITIALIZATION_CORE] = p_core_terminate;
} }
@ -123,14 +123,14 @@ void GDExtensionBinding::InitObject::register_scene_terminator(Callback p_scene_
GDExtensionBinding::terminate_callbacks[GDNATIVE_INITIALIZATION_SCENE] = p_scene_terminate; GDExtensionBinding::terminate_callbacks[GDNATIVE_INITIALIZATION_SCENE] = p_scene_terminate;
} }
void GDExtensionBinding::InitObject::register_editor_terminator(Callback p_editor_terminate) const {
GDExtensionBinding::terminate_callbacks[GDNATIVE_INITIALIZATION_EDITOR] = p_editor_terminate;
}
void GDExtensionBinding::InitObject::register_driver_terminator(Callback p_driver_terminate) const { void GDExtensionBinding::InitObject::register_driver_terminator(Callback p_driver_terminate) const {
GDExtensionBinding::terminate_callbacks[GDNATIVE_INITIALIZATION_DRIVER] = p_driver_terminate; GDExtensionBinding::terminate_callbacks[GDNATIVE_INITIALIZATION_DRIVER] = p_driver_terminate;
} }
void GDExtensionBinding::InitObject::register_editor_terminator(Callback p_editor_terminate) const {
GDExtensionBinding::terminate_callbacks[GDNATIVE_INITIALIZATION_EDITOR] = p_editor_terminate;
}
GDNativeBool GDExtensionBinding::InitObject::init() const { GDNativeBool GDExtensionBinding::InitObject::init() const {
return GDExtensionBinding::init(gdn_interface, library, initialization); return GDExtensionBinding::init(gdn_interface, library, initialization);
} }