mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-04 19:55:19 +00:00
xr: Add fallback for SDL_PROP_GPU_DEVICE_CREATE_XR_APPLICATION_NAME_STRING.
It'll use SDL_GetAppMetadataProperty(SDL_PROP_APP_METADATA_NAME_STRING) if necessary now.
This commit is contained in:
parent
a49ba90257
commit
59a302e601
1 changed files with 5 additions and 2 deletions
|
|
@ -157,8 +157,11 @@ XrResult SDL_OPENXR_INTERNAL_GPUInitOpenXR(
|
|||
xrInstanceCreateInfo.next = &instanceCreateInfoAndroid;
|
||||
#endif
|
||||
|
||||
const char *applicationName = SDL_GetStringProperty(props, SDL_PROP_GPU_DEVICE_CREATE_XR_APPLICATION_NAME_STRING, "SDL Application");
|
||||
Uint32 applicationVersion = (Uint32)SDL_GetNumberProperty(props, SDL_PROP_GPU_DEVICE_CREATE_XR_APPLICATION_VERSION_NUMBER, 0);
|
||||
const Uint32 applicationVersion = (Uint32)SDL_GetNumberProperty(props, SDL_PROP_GPU_DEVICE_CREATE_XR_APPLICATION_VERSION_NUMBER, 0);
|
||||
const char *applicationName = SDL_GetStringProperty(props, SDL_PROP_GPU_DEVICE_CREATE_XR_APPLICATION_NAME_STRING, NULL);
|
||||
if (!applicationName) {
|
||||
applicationName = SDL_GetAppMetadataProperty(SDL_PROP_APP_METADATA_NAME_STRING);
|
||||
}
|
||||
|
||||
SDL_strlcpy(xrInstanceCreateInfo.applicationInfo.applicationName, applicationName, XR_MAX_APPLICATION_NAME_SIZE);
|
||||
xrInstanceCreateInfo.applicationInfo.applicationVersion = applicationVersion;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue