Skip to content

Commit

Permalink
osx bug fixes pt.2
Browse files Browse the repository at this point in the history
  • Loading branch information
callmeclover committed May 31, 2024
1 parent b906750 commit cac7d96
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/func.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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> = 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> = Screen::all().unwrap();

for screen in screens {
let time: String = convert_to_human_readable(Local::now().to_string().as_str());
Expand Down

0 comments on commit cac7d96

Please sign in to comment.