Skip to content

Commit

Permalink
Merge pull request #872 from jrb0001/openxr-web
Browse files Browse the repository at this point in the history
OpenXR is not available on Web
  • Loading branch information
Bromeon authored Sep 2, 2024
2 parents 7634fe7 + 28f4282 commit 68bcda7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions godot-codegen/src/special_cases/special_cases.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ pub fn is_godot_type_deleted(godot_ty: &str) -> bool {

// OpenXR has not been available for macOS before 4.2.
// 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
// OpenXR is also not available on iOS and Web: 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.
if godot_ty.starts_with("OpenXR") {
let target_os = std::env::var("CARGO_CFG_TARGET_OS");
match target_os.as_deref() {
Ok("ios") => return true,
Ok("ios") | Ok("emscripten") => return true,
Ok("macos") => {
#[cfg(before_api = "4.2")]
return true;
Expand Down

0 comments on commit 68bcda7

Please sign in to comment.