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
This commit is contained in:
Sam Lantinga
2026-03-09 09:59:02 -07:00
parent 101273f429
commit 25b62f01ed

View File

@@ -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