mirror of
https://github.com/IntQuant/noita_entangled_worlds.git
synced 2025-10-19 07:03:16 +00:00
attach to console on windows if availbalbe
This commit is contained in:
parent
b5bafc6bfd
commit
812f3cc7de
3 changed files with 11 additions and 0 deletions
1
noita-proxy/Cargo.lock
generated
1
noita-proxy/Cargo.lock
generated
|
@ -2903,6 +2903,7 @@ dependencies = [
|
|||
"tracing-subscriber",
|
||||
"unic-langid",
|
||||
"wide",
|
||||
"winapi",
|
||||
"winresource",
|
||||
"zip",
|
||||
]
|
||||
|
|
|
@ -56,6 +56,9 @@ rubato = "0.16.1"
|
|||
directories = "6.0.0"
|
||||
#fundsp = {version = "0.20.0", default-features = false, features = ["std"]}
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
winapi="0.3.9"
|
||||
|
||||
[dev-dependencies]
|
||||
serial_test = "3.2.0"
|
||||
|
||||
|
|
|
@ -18,6 +18,13 @@ use tracing_subscriber::EnvFilter;
|
|||
#[allow(clippy::needless_return)]
|
||||
#[tokio::main(worker_threads = 2)]
|
||||
async fn main() {
|
||||
#[cfg(target_os = "windows")]
|
||||
{
|
||||
use winapi::um::wincon::{ATTACH_PARENT_PROCESS, AttachConsole};
|
||||
unsafe {
|
||||
AttachConsole(ATTACH_PARENT_PROCESS);
|
||||
}
|
||||
}
|
||||
let log = if let Ok(path) = std::env::current_exe() {
|
||||
path.parent().unwrap().join("ew_log.txt")
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue