Browse Source

Fix some issues with console initialization

pull/97/head
Meivyn 1 year ago
parent
commit
6968ca9783
No known key found for this signature in database GPG Key ID: 8BDD3E48158B2F71
1 changed files with 2 additions and 4 deletions
  1. +2
    -4
      IPA.Loader/Logging/ConsoleWindow.cs

+ 2
- 4
IPA.Loader/Logging/ConsoleWindow.cs View File

@ -24,10 +24,8 @@ namespace IPA.Logging
public static void Initialize(bool alwaysCreateNewConsole = false) public static void Initialize(bool alwaysCreateNewConsole = false)
{ {
bool consoleAttached = true;
if (alwaysCreateNewConsole
|| (AttachConsole(AttachParent)
&& Marshal.GetLastWin32Error() != ErrorAccessDenied))
bool consoleAttached;
if (alwaysCreateNewConsole || !(consoleAttached = AttachConsole(AttachParent)))
{ {
consoleAttached = AllocConsole(); consoleAttached = AllocConsole();
} }


Loading…
Cancel
Save