Skip to content

Commit a6dfa10

Browse files
committed
OpenXR loader: Require disable_sys_prop on implicit layers on Android
1 parent 5f8d58f commit a6dfa10

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/loader/manifest_file.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,15 @@ void ApiLayerManifestFile::CreateIfValid(ManifestFileType type, const std::strin
831831
}
832832

833833
#if defined(XR_OS_ANDROID)
834+
835+
// Implicit layers require the disable system property on Android.
834836
auto &disable_prop_node = layer_root_node["disable_sys_prop"];
837+
if (disable_prop_node.isNull() || !disable_prop_node.isString()) {
838+
error_ss << "Implicit layer " << filename << " is missing \"disable_sys_prop\"";
839+
LoaderLogger::LogErrorMessage("", error_ss.str());
840+
return;
841+
}
842+
835843
// Check if there's an system property to enable this API layer
836844
auto &enable_prop_node = layer_root_node["enable_sys_prop"];
837845
if (!enable_prop_node.isNull() && enable_prop_node.isString()) {

0 commit comments

Comments
 (0)