1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-30 16:26:50 +00:00

openxr: Sync with upstream 1.0.28

This commit is contained in:
Rémi Verschelde
2023-07-11 09:13:16 +02:00
parent ef155c1aeb
commit d756169881
45 changed files with 2942 additions and 151 deletions

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2017-2022, The Khronos Group Inc.
// Copyright (c) 2017-2023, The Khronos Group Inc.
// Copyright (c) 2017-2019 Valve Corporation
// Copyright (c) 2017-2019 LunarG, Inc.
//
@@ -27,13 +27,13 @@
#include <openxr/openxr.h>
#include <algorithm>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <memory>
#include <sstream>
#include <stdexcept>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <unordered_map>
#include <utility>
@@ -233,6 +233,12 @@ static void ReadDataFilesInSearchPaths(const std::string &override_env_var, cons
relative_home_path += relative_path;
CopyIncludedPaths(true, home, relative_home_path, search_path);
}
#elif defined(XR_OS_ANDROID)
CopyIncludedPaths(true, "/product/etc", relative_path, search_path);
CopyIncludedPaths(true, "/odm/etc", relative_path, search_path);
CopyIncludedPaths(true, "/oem/etc", relative_path, search_path);
CopyIncludedPaths(true, "/vendor/etc", relative_path, search_path);
CopyIncludedPaths(true, "/system/etc", relative_path, search_path);
#else
(void)relative_path;
#endif
@@ -447,9 +453,8 @@ static void GetExtensionProperties(const std::vector<ExtensionListing> &extensio
if (it != props.end()) {
it->extensionVersion = std::max(it->extensionVersion, ext.extension_version);
} else {
XrExtensionProperties prop = {};
XrExtensionProperties prop{};
prop.type = XR_TYPE_EXTENSION_PROPERTIES;
prop.next = nullptr;
strncpy(prop.extensionName, ext.name.c_str(), XR_MAX_EXTENSION_NAME_SIZE - 1);
prop.extensionName[XR_MAX_EXTENSION_NAME_SIZE - 1] = '\0';
prop.extensionVersion = ext.extension_version;