1
0
Fork 0

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
1 changed files with 3 additions and 1 deletions

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
}