From 25b62f01edefb047352beabcd74f99fe2c09e65a Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Mon, 9 Mar 2026 09:59:02 -0700
Subject: [PATCH] Don't load libopenxr_loader.so
We are locked to version 1 of the ABI, so don't load what might be a symlink to a newer and incompatible version.
Platforms like OpenBSD that only have .so versions of libraries can add a special case here like Android in the future.
Fixes https://github.com/libsdl-org/SDL/issues/15172
---
src/gpu/xr/SDL_openxrdyn.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gpu/xr/SDL_openxrdyn.c b/src/gpu/xr/SDL_openxrdyn.c
index dac9dd76e7ba4..f1a7a299afde5 100644
--- a/src/gpu/xr/SDL_openxrdyn.c
+++ b/src/gpu/xr/SDL_openxrdyn.c
@@ -44,12 +44,12 @@ static const char *openxr_library_names[] = { "openxr_loader.dll", NULL };
* negotiation crashes on pre-instance calls (e.g., xrEnumerateApiLayerProperties). */
static const char *openxr_library_names[] = { "libopenxr_loader.so", NULL };
#else
-static const char *openxr_library_names[] = { "libopenxr_loader.so.1", "libopenxr_loader.so", NULL };
+static const char *openxr_library_names[] = { "libopenxr_loader.so.1", NULL };
SDL_ELF_NOTE_DLOPEN(
"gpu-openxr",
"Support for OpenXR with SDL_GPU rendering",
SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
- "libopenxr_loader.so.1", "libopenxr_loader.so"
+ "libopenxr_loader.so.1"
)
#endif