From cac7d96cb1c78b43fe7523c6f80d121af80a538b Mon Sep 17 00:00:00 2001 From: Clover Johnson <95094165+callmeclover@users.noreply.github.com> Date: Thu, 30 May 2024 22:22:56 -0400 Subject: [PATCH] osx bug fixes pt.2 --- src/func.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/func.rs b/src/func.rs index 6d25b9e..7f1a7ef 100644 --- a/src/func.rs +++ b/src/func.rs @@ -378,15 +378,15 @@ async fn quote_gen_ext(tts: &mut Tts) { fn screenshot(tts: &mut Tts) { println!("hahahahah i am going to screenshot everything"); let _ = tts.speak("hahahahah i am going to screenshot everything", true); -#[cfg(target_os = "macos")] - { - let run_loop: id = unsafe { NSRunLoop::currentRunLoop() }; - unsafe { - let date: id = msg_send![class!(NSDate), distantFuture]; - let _: () = msg_send![run_loop, runMode:NSDefaultRunLoopMode beforeDate:date]; - } - } -let screens: Vec = Screen::all().unwrap(); + #[cfg(target_os = "macos")] + { + let run_loop: id = unsafe { NSRunLoop::currentRunLoop() }; + unsafe { + let date: id = msg_send![class!(NSDate), distantFuture]; + let _: () = msg_send![run_loop, runMode:NSDefaultRunLoopMode beforeDate:date]; + } + } + let screens: Vec = Screen::all().unwrap(); for screen in screens { let time: String = convert_to_human_readable(Local::now().to_string().as_str());