Skip to content

Commit b975f07

Browse files
committed
OpenXR loader: Better placeholder filenames for API layer virtual manifests
1 parent 041c45b commit b975f07

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

src/loader/manifest_file.cpp

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,8 +1083,24 @@ XrResult ApiLayerManifestFile::FindManifestFiles(const std::string &openxr_comma
10831083
result = GetPlatformApiLayerVirtualManifests(type == ManifestFileType::MANIFEST_TYPE_IMPLICIT_API_LAYER, system_broker,
10841084
virtual_manifests);
10851085
if (XR_SUCCESS == result) {
1086-
for (const auto &virtual_manifest : virtual_manifests) {
1087-
ApiLayerManifestFile::CreateIfValid(type, "virtual manifest", virtual_manifest,
1086+
std::string fnBase;
1087+
{
1088+
std::ostringstream oss{"_virtualManifest_"};
1089+
if (system_broker) {
1090+
oss << "systemBroker_";
1091+
} else {
1092+
oss << "installableBroker_";
1093+
}
1094+
if (type == ManifestFileType::MANIFEST_TYPE_IMPLICIT_API_LAYER) {
1095+
oss << "implicit.json";
1096+
} else {
1097+
oss << "explicit.json";
1098+
}
1099+
fnBase = oss.str();
1100+
}
1101+
const size_t n = virtual_manifests.size();
1102+
for (size_t i = 0; i < n; ++i) {
1103+
ApiLayerManifestFile::CreateIfValid(type, std::to_string(i) + fnBase, virtual_manifests[i],
10881104
&ApiLayerManifestFile::LocateLibraryInAssets, manifest_files);
10891105
}
10901106
} else {

0 commit comments

Comments
 (0)