fix not compiling with some mingw32

This commit is contained in:
UnknownShadow200 2019-03-11 03:13:18 +11:00
parent 49f847a984
commit 95fd2e0f99

View File

@ -2040,7 +2040,8 @@ void Platform_Init(void) {
/* For when user runs from command prompt */ /* For when user runs from command prompt */
/* NOTE: Need to dynamically load, not supported on Windows 2000 */ /* NOTE: Need to dynamically load, not supported on Windows 2000 */
AttachConsoleFunc attach = DynamicLib_GetFrom("KERNEL32.DLL", "AttachConsole"); AttachConsoleFunc attach = DynamicLib_GetFrom("KERNEL32.DLL", "AttachConsole");
if (attach) attach(ATTACH_PARENT_PROCESS); /* -1 is ATTACH_PARENT_PROCESS (define doesn't exist when compiling for win2000) */
if (attach) attach((DWORD)(-1));
conHandle = GetStdHandle(STD_OUTPUT_HANDLE); conHandle = GetStdHandle(STD_OUTPUT_HANDLE);
if (conHandle == INVALID_HANDLE_VALUE) conHandle = NULL; if (conHandle == INVALID_HANDLE_VALUE) conHandle = NULL;