1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-31 18:41:20 +00:00

OpenXR: only obtain xrCreateSwapchainAndroidSurfaceKHR pointer if extension is available

This commit is contained in:
Bastiaan Olij
2025-12-09 15:51:56 +11:00
parent 757bba192e
commit 9f4db24ef4

View File

@@ -72,7 +72,9 @@ HashMap<String, bool *> OpenXRCompositionLayerExtension::get_requested_extension
void OpenXRCompositionLayerExtension::on_instance_created(const XrInstance p_instance) {
#ifdef ANDROID_ENABLED
EXT_INIT_XR_FUNC(xrDestroySwapchain);
EXT_INIT_XR_FUNC(xrCreateSwapchainAndroidSurfaceKHR);
if (android_surface_ext_available) {
EXT_INIT_XR_FUNC(xrCreateSwapchainAndroidSurfaceKHR);
}
#endif
}