From 70d3935bf951c3e081faca02dd56d4f53d0c0a4f Mon Sep 17 00:00:00 2001 From: Bastiaan Olij Date: Wed, 14 Sep 2022 11:20:54 +1000 Subject: Update OpenXR to 1.0.25 --- thirdparty/openxr/src/loader/manifest_file.hpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'thirdparty/openxr/src/loader/manifest_file.hpp') diff --git a/thirdparty/openxr/src/loader/manifest_file.hpp b/thirdparty/openxr/src/loader/manifest_file.hpp index 0d04886d84..de0aab65c2 100644 --- a/thirdparty/openxr/src/loader/manifest_file.hpp +++ b/thirdparty/openxr/src/loader/manifest_file.hpp @@ -14,6 +14,7 @@ #include #include #include +#include #include namespace Json { @@ -79,6 +80,8 @@ class RuntimeManifestFile : public ManifestFile { std::vector> &manifest_files); }; +using LibraryLocator = bool (*)(const std::string &json_filename, const std::string &library_path, std::string &out_combined_path); + // ApiLayerManifestFile class - // Responsible for finding and parsing API Layer-specific manifest files. class ApiLayerManifestFile : public ManifestFile { @@ -93,8 +96,19 @@ class ApiLayerManifestFile : public ManifestFile { ApiLayerManifestFile(ManifestFileType type, const std::string &filename, const std::string &layer_name, const std::string &description, const JsonVersion &api_version, const uint32_t &implementation_version, const std::string &library_path); + + static void CreateIfValid(ManifestFileType type, const std::string &filename, std::istream &json_stream, + LibraryLocator locate_library, std::vector> &manifest_files); static void CreateIfValid(ManifestFileType type, const std::string &filename, std::vector> &manifest_files); + /// @return false if we could not find the library. + static bool LocateLibraryRelativeToJson(const std::string &json_filename, const std::string &library_path, + std::string &out_combined_path); +#ifdef XR_USE_PLATFORM_ANDROID + static bool LocateLibraryInAssets(const std::string &json_filename, const std::string &library_path, + std::string &out_combined_path); + static void AddManifestFilesAndroid(ManifestFileType type, std::vector> &manifest_files); +#endif JsonVersion _api_version; std::string _layer_name; -- cgit v1.2.3