From 68526e3ceafb88a65741df163a3a4849795a646b Mon Sep 17 00:00:00 2001 From: Raymond Date: Thu, 16 Sep 2021 08:59:46 -0400 Subject: [PATCH 1/2] close streams before freeconsole, dialog doesnt hang --- Dalamud.Boot/dllmain.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dalamud.Boot/dllmain.cpp b/Dalamud.Boot/dllmain.cpp index b0c0b27cd..b9c27ff16 100644 --- a/Dalamud.Boot/dllmain.cpp +++ b/Dalamud.Boot/dllmain.cpp @@ -47,6 +47,9 @@ DllExport DWORD WINAPI Initialize(LPVOID lpParam) // =========================================================================== // #ifndef NDEBUG + fclose(stdin); + fclose(stdout); + fclose(stderr); FreeConsole(); #endif From e32c08d8770d64161d9e6b69be052340fe582639 Mon Sep 17 00:00:00 2001 From: Raymond Date: Thu, 16 Sep 2021 09:03:29 -0400 Subject: [PATCH 2/2] close injector streams, dont leave them open. --- Dalamud.Injector.Boot/main.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dalamud.Injector.Boot/main.cpp b/Dalamud.Injector.Boot/main.cpp index 096d9fb33..d3deb051b 100644 --- a/Dalamud.Injector.Boot/main.cpp +++ b/Dalamud.Injector.Boot/main.cpp @@ -49,6 +49,9 @@ int wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LP // =========================================================================== // #ifndef NDEBUG + fclose(stdin); + fclose(stdout); + fclose(stderr); FreeConsole(); #endif