From 95fd2e0f9964a070042362fa7dc0137fae1d5502 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Mon, 11 Mar 2019 03:13:18 +1100 Subject: [PATCH] fix not compiling with some mingw32 --- src/Platform.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Platform.c b/src/Platform.c index 9925ecf78..ad74195bb 100644 --- a/src/Platform.c +++ b/src/Platform.c @@ -2040,7 +2040,8 @@ void Platform_Init(void) { /* For when user runs from command prompt */ /* NOTE: Need to dynamically load, not supported on Windows 2000 */ 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); if (conHandle == INVALID_HANDLE_VALUE) conHandle = NULL;