Skip to content

Commit

Permalink
Add event loop to avoid busy cursor
Browse files Browse the repository at this point in the history
  • Loading branch information
MolotovCherry committed Nov 19, 2024
1 parent f5b76ad commit ae27dda
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/yabg3nml/src/autostart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use std::{
os::windows::process::{CommandExt as _, ExitCodeExt as _},
path::Path,
process::{Command, ExitCode},
thread,
};

use eyre::{eyre, Result};
Expand All @@ -21,6 +22,7 @@ use crate::{
paths::{get_game_binary_for, Bg3Exe},
setup::init,
single_instance::SingleInstance,
wapi::event_loop::EventLoop,
};

pub fn autostart() -> Result<ExitCode> {
Expand Down Expand Up @@ -95,6 +97,9 @@ pub fn autostart() -> Result<ExitCode> {
);
}

// just put something here to stop the needless busy cursor
thread::spawn(|| EventLoop::new().run(|_, _| ()));

match child.wait() {
Ok(status) => {
trace!(code = status.code(), "original child exit code");
Expand Down

0 comments on commit ae27dda

Please sign in to comment.