From 4b11f56f90cb76021ecf7d2fcaed39e442d08f8f Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Thu, 12 Sep 2024 23:20:48 +0200 Subject: [PATCH] chore: Make macOS specific things also work on iOS --- core/src/avm2/globals/flash/system/capabilities.rs | 4 ++-- render/wgpu/src/backend.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/avm2/globals/flash/system/capabilities.rs b/core/src/avm2/globals/flash/system/capabilities.rs index 4cd926b1eaa7..7a8addc63782 100644 --- a/core/src/avm2/globals/flash/system/capabilities.rs +++ b/core/src/avm2/globals/flash/system/capabilities.rs @@ -16,7 +16,7 @@ pub fn get_os<'gc>( PlayerRuntime::AIR => { if cfg!(windows) { "Windows 10" - } else if cfg!(target_os = "macos") { + } else if cfg!(target_vendor = "apple") { "Mac OS 10.5.2" } else { "Linux 5.10.49" @@ -37,7 +37,7 @@ pub fn get_version<'gc>( PlayerRuntime::AIR => { if cfg!(windows) { "WIN" - } else if cfg!(target_os = "macos") { + } else if cfg!(target_vendor = "apple") { "MAC" } else { "LNX" diff --git a/render/wgpu/src/backend.rs b/render/wgpu/src/backend.rs index 854a3e034016..9308e248f91f 100644 --- a/render/wgpu/src/backend.rs +++ b/render/wgpu/src/backend.rs @@ -1105,8 +1105,8 @@ pub async fn request_adapter_and_device( let names = get_backend_names(backend); if names.is_empty() { "Ruffle requires hardware acceleration, but no compatible graphics device was found (no backend provided?)".to_string() - } else if cfg!(target_os = "macos") { - "Ruffle does not support OpenGL on macOS.".to_string() + } else if cfg!(target_vendor = "apple") { + "Ruffle does not support OpenGL on macOS/iOS.".to_string() } else { format!("Ruffle requires hardware acceleration, but no compatible graphics device was found supporting {}", format_list(&names, "or")) }