Commits

Bart van Strien committed 31fa48f

Backed out changeset 7e5b88e76bda

  • Participants
  • Parent commits 7e5b88e

Comments (0)

Files changed (1)

 	}
 
 	lua_setfield(L, -2, "_version_compat");
-
+	
 #ifdef LOVE_WINDOWS
 	lua_pushstring(L, "Windows");
 #elif defined(LOVE_MACOSX)
 	if (is_open)
 		return 0;
 
-	is_open = true;
-
 	static const int MAX_CONSOLE_LINES = 5000;
 	long std_handle;
 	int console_handle;
 	CONSOLE_SCREEN_BUFFER_INFO console_info;
 	FILE *fp;
 
-	/* Legendary AttachConsole bug workaround.
-	 * AttachConsole breaks console allocation completely if it fails.
-	 * Let's check through the environment variable PROMPT if love was
-	 * started with cmd.exe.
-	*/
-	if (GetEnvironmentVariable(TEXT("PROMPT"), NULL, 0) != 0)
-	{
-		if (AttachConsole(ATTACH_PARENT_PROCESS) == 0)
-			return 0;
-	}
-	else
-	{
-		if (AllocConsole() == 0)
-			return 0;
-	}
+	AllocConsole();
 
 	// Set size.
 	GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &console_info);
 	// Sync std::cout, std::cerr, etc.
 	std::ios::sync_with_stdio();
 
+	is_open = true;
+
 	return 0;
 }
 
 	// Oh, you just want the version? Okay!
 	if (argc > 1 && strcmp(argv[1],"--version") == 0)
 	{
-#ifdef LOVE_LEGENDARY_CONSOLE_IO_HACK
-		w__openConsole(NULL);
-#endif // LOVE_LEGENDARY_CONSOLE_IO_HACK
 		printf("LOVE %s (%s)\n", love::VERSION, love::VERSION_CODENAME);
 		return 0;
 	}