Improve OpenXR loader error messages

When the OpenXR loader library fails to load, provide a detailed error
message explaining:
- On Windows: need openxr_loader.dll in app directory or PATH
- On Linux: install libopenxr-loader package or set LD_LIBRARY_PATH
- Can use SDL_HINT_OPENXR_LIBRARY hint to specify path

Also update D3D12 backend to include the error in its warning log,
and remove redundant SDL_SetError in Vulkan backend that was
overwriting the detailed message.
This commit is contained in:
Aaron Benjamin
2026-02-01 14:57:32 -05:00
committed by Ethan Lee
parent 5640647e14
commit 1f7db1ebcf
3 changed files with 6 additions and 3 deletions

View File

@@ -12738,7 +12738,7 @@ static bool VULKAN_PrepareDriver(SDL_VideoDevice *_this, SDL_PropertiesID props)
if (xr) {
if (!SDL_OpenXR_LoadLibrary()) {
SDL_SetError("Failed to load OpenXR loader or a required symbol");
/* SDL_GetError() already has the detailed message from SDL_OpenXR_LoadLibrary() */
SDL_Vulkan_UnloadLibrary();
return false;
}