File tree Expand file tree Collapse file tree 4 files changed +22
-3
lines changed Expand file tree Collapse file tree 4 files changed +22
-3
lines changed Original file line number Diff line number Diff line change 1616#include < json/value.h>
1717#include < android/asset_manager_jni.h>
1818#include " android_utilities.h"
19+ #include " manifest_file.hpp"
1920#endif // XR_USE_PLATFORM_ANDROID
2021
2122#ifdef XR_KHR_LOADER_INIT_SUPPORT
@@ -84,7 +85,9 @@ class LoaderInitData {
8485XrResult InitializeLoaderInitData (const XrLoaderInitInfoBaseHeaderKHR* loaderInitInfo);
8586
8687#ifdef XR_USE_PLATFORM_ANDROID
87- XrResult GetPlatformRuntimeVirtualManifest (Json::Value& out_manifest);
88+
89+ // ! Modifies @p out_manifest and @p out_runtime_source only if returning successfully
90+ XrResult GetPlatformRuntimeVirtualManifest (Json::Value& out_manifest, ManifestFileSource& out_runtime_source);
8891std::string GetAndroidNativeLibraryDir ();
8992void * Android_Get_Asset_Manager ();
9093#endif // XR_USE_PLATFORM_ANDROID
Original file line number Diff line number Diff line change @@ -682,7 +682,8 @@ XrResult RuntimeManifestFile::FindManifestFiles(const std::string &openxr_comman
682682
683683#if defined(XR_KHR_LOADER_INIT_SUPPORT) && defined(XR_USE_PLATFORM_ANDROID)
684684 Json::Value virtualManifest;
685- result = GetPlatformRuntimeVirtualManifest (virtualManifest);
685+ ManifestFileSource runtimeSource = ManifestFileSource::FROM_JSON_MANIFEST;
686+ result = GetPlatformRuntimeVirtualManifest (virtualManifest, runtimeSource);
686687 if (XR_SUCCESS == result) {
687688 RuntimeManifestFile::CreateIfValid (virtualManifest, " " , manifest_files);
688689 return result;
Original file line number Diff line number Diff line change @@ -28,6 +28,16 @@ enum ManifestFileType {
2828 MANIFEST_TYPE_EXPLICIT_API_LAYER,
2929};
3030
31+ // ! Where did the data for this manifest file (may be virtual) come from?
32+ enum ManifestFileSource {
33+ // ! An actual json file on a file system
34+ FROM_JSON_MANIFEST = 0 ,
35+ // ! The installable runtime broker on Android
36+ FROM_INSTALLABLE_BROKER,
37+ // ! The system runtime broker on Android
38+ FROM_SYSTEM_BROKER,
39+ };
40+
3141struct JsonVersion {
3242 uint32_t major;
3343 uint32_t minor;
Original file line number Diff line number Diff line change 3535#endif // XR_USE_PLATFORM_ANDROID
3636
3737#if defined(XR_KHR_LOADER_INIT_SUPPORT) && defined(XR_USE_PLATFORM_ANDROID)
38- XrResult GetPlatformRuntimeVirtualManifest (Json::Value& out_manifest) {
38+ XrResult GetPlatformRuntimeVirtualManifest (Json::Value& out_manifest, ManifestFileSource& out_runtime_source ) {
3939 using wrap::android::content::Context;
4040 auto & initData = LoaderInitData::instance ();
4141 if (!initData.initialized ()) {
@@ -50,6 +50,11 @@ XrResult GetPlatformRuntimeVirtualManifest(Json::Value& out_manifest) {
5050 if (0 != openxr_android::getActiveRuntimeVirtualManifest (context, virtualManifest, systemBroker)) {
5151 return XR_ERROR_INITIALIZATION_FAILED;
5252 }
53+ if (systemBroker) {
54+ out_runtime_source = ManifestFileSource::FROM_SYSTEM_BROKER;
55+ } else {
56+ out_runtime_source = ManifestFileSource::FROM_INSTALLABLE_BROKER;
57+ }
5358 out_manifest = virtualManifest;
5459 return XR_SUCCESS;
5560}
You can’t perform that action at this time.
0 commit comments