From 0bdf0fcfd3b444bab7cd12454ac86367ab62d208 Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Wed, 25 Nov 2020 10:13:17 -0600 Subject: [PATCH] Account for macOS 11. --- src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index d305d3b..782f25f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -225,8 +225,9 @@ impl TTS { let version: Vec<&str> = str.split(" ").collect(); let version = version[1]; let version_parts: Vec<&str> = version.split(".").collect(); + let major_version: i8 = version_parts[0].parse().unwrap(); let minor_version: i8 = version_parts[1].parse().unwrap(); - if minor_version >= 14 { + if major_version >= 11 || minor_version >= 14 { TTS::new(Backends::AvFoundation) } else { TTS::new(Backends::AppKit)