diff options
author | Jan <sentrycraft123@gmail.com> | 2024-06-28 00:37:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-28 00:37:26 +0200 |
commit | f29823a0d3d934c90569e668785cd8965df7ffa4 (patch) | |
tree | e4e302a3fe647ba90936bc5ce188d8334e7cbdad /primedev | |
parent | d52aaadc9ab0bd80ccd2a64818e64934adeefbf4 (diff) | |
download | NorthstarLauncher-f29823a0d3d934c90569e668785cd8965df7ffa4.tar.gz NorthstarLauncher-f29823a0d3d934c90569e668785cd8965df7ffa4.zip |
Check for Console Window before allocating one (#741)
Check for Console Window before allocating one and remove "console already exists" from error message, we know it doesn't
Diffstat (limited to 'primedev')
-rw-r--r-- | primedev/logging/logging.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/primedev/logging/logging.cpp b/primedev/logging/logging.cpp index 72171e25..4367b384 100644 --- a/primedev/logging/logging.cpp +++ b/primedev/logging/logging.cpp @@ -124,9 +124,9 @@ void CustomSink::custom_log(const custom_log_msg& msg) void InitialiseConsole() { - if (AllocConsole() == FALSE) + if (GetConsoleWindow() == NULL && AllocConsole() == FALSE) { - std::cout << "[*] Failed to create a console window, maybe a console already exists?" << std::endl; + std::cout << "[*] Failed to create a console window" << std::endl; } else { |