Skip to content

Commit

Permalink
fix build in linux
Browse files Browse the repository at this point in the history
  • Loading branch information
super1207 committed Feb 22, 2024
1 parent c0af1cf commit 6752b7d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/redlang/exfun.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1620,6 +1620,8 @@ pub fn init_ex_fun_map() {
}
static START: std::sync::Once = std::sync::Once::new();
START.call_once(|| {

#[cfg(target_os = "windows")]
if let Ok(console_title) = winconsole::console::get_title() {
let mut lk = CMD_TITLE.write().unwrap();
*lk = console_title;
Expand All @@ -1633,6 +1635,7 @@ pub fn init_ex_fun_map() {
{
let lk = CMD_TITLE.read().unwrap();
if lk.len() != 0 {
#[cfg(target_os = "windows")]
let _ = winconsole::console::set_title(&lk);
}
}
Expand Down

0 comments on commit 6752b7d

Please sign in to comment.