alroyso 1 year ago
parent
commit
5b9bc9e6e3
1 changed files with 7 additions and 4 deletions
  1. 7 4
      windows/runner/main.cpp

+ 7 - 4
windows/runner/main.cpp

@@ -15,16 +15,19 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
     ::SetForegroundWindow(hwnd);
     return EXIT_FAILURE;
   }
-
+/*
+ *
+  else {
+    AllocConsole();
+    ShowWindow(GetConsoleWindow(), SW_HIDE);
+  }
+ * */
 // https://github.com/flutter/flutter/issues/47891#issuecomment-708850435
 // https://github.com/flutter/flutter/issues/47891#issuecomment-869729956
 // https://github.com/dart-lang/sdk/issues/39945#issuecomment-870428151
   if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) {
     CreateAndAttachConsole();
 
-  } else {
-    AllocConsole();
-    ShowWindow(GetConsoleWindow(), SW_HIDE);
   }
   // Initialize COM, so that it is available for use in the library and/or
   // plugins.