Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change logic to disable OpenXR for iOS #781

Merged
merged 1 commit into from
Jun 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions godot-codegen/src/special_cases/special_cases.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,16 @@ pub fn is_godot_type_deleted(godot_ty: &str) -> bool {
// See e.g. https://github.com/GodotVR/godot-xr-tools/issues/479.
// OpenXR is also not available on iOS: https://github.com/godotengine/godot/blob/13ba673c42951fd7cfa6fd8a7f25ede7e9ad92bb/modules/openxr/config.py#L2
// Do not hardcode a list of OpenXR classes, as more may be added in future Godot versions; instead use prefix.
#[cfg(any(all(before_api = "4.2", target_os = "macos"), target_os = "ios"))]
if godot_ty.starts_with("OpenXR") {
return true;
let target_os = std::env::var("CARGO_CFG_TARGET_OS");
match target_os.as_deref() {
Ok("ios") => return true,
Ok("macos") => {
#[cfg(before_api = "4.2")]
return true;
}
_ => {}
}
}

// ThemeDB was previously loaded lazily
Expand Down
Loading