mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 15:21:56 -05:00
Fix bug with OpenXR composition layers added after OpenXR is running
(cherry picked from commit e2386de505)
This commit is contained in:
@@ -53,6 +53,10 @@ OpenXRCompositionLayer::OpenXRCompositionLayer() {
|
||||
openxr_api = OpenXRAPI::get_singleton();
|
||||
composition_layer_extension = OpenXRCompositionLayerExtension::get_singleton();
|
||||
|
||||
if (openxr_api) {
|
||||
openxr_session_running = openxr_api->is_running();
|
||||
}
|
||||
|
||||
Ref<OpenXRInterface> openxr_interface = XRServer::get_singleton()->find_interface("OpenXR");
|
||||
if (openxr_interface.is_valid()) {
|
||||
openxr_interface->connect("session_begun", callable_mp(this, &OpenXRCompositionLayer::_on_openxr_session_begun));
|
||||
|
||||
Reference in New Issue
Block a user