From 6df50e55d8cdb1a9e124307ece186098a8b9c350 Mon Sep 17 00:00:00 2001 From: Fedor Korotkov Date: Fri, 22 Sep 2023 07:38:13 -0400 Subject: [PATCH] `--suspendable` devices fallback on Ventura host (#605) Fixes #604 --- Sources/tart/Platform/Darwin.swift | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Sources/tart/Platform/Darwin.swift b/Sources/tart/Platform/Darwin.swift index bcb9739..7600359 100644 --- a/Sources/tart/Platform/Darwin.swift +++ b/Sources/tart/Platform/Darwin.swift @@ -111,7 +111,8 @@ struct Darwin: PlatformSuspendable { if #available(macOS 14, *) { return [VZMacKeyboardConfiguration()] } else { - return [] + // fallback to the regular configuration + return keyboards() } } @@ -121,6 +122,11 @@ struct Darwin: PlatformSuspendable { } func pointingDevicesSuspendable() -> [VZPointingDeviceConfiguration] { - [VZMacTrackpadConfiguration()] + if #available(macOS 14, *) { + return [VZMacTrackpadConfiguration()] + } else { + // fallback to the regular configuration + return pointingDevices() + } } }