Skip to content
Permalink
Browse files

Fix game not compiling with i586-mingw32msvc-gcc

  • Loading branch information...
UnknownShadow200 committed Jun 10, 2019
1 parent 814b224 commit 8621e723224344155b987d28cb3b6d5eb7d7f9bc
Showing with 7 additions and 1 deletion.
  1. +1 −1 src/Platform.c
  2. +6 −0 src/Window.c
@@ -1768,7 +1768,7 @@ void Platform_Init(void) {
/* For when user runs from command prompt */
/* NOTE: Need to dynamically load, not supported on Windows 2000 */
attach = (AttachConsoleFunc)DynamicLib_GetFrom("KERNEL32.DLL", "AttachConsole");
if (attach) attach(ATTACH_PARENT_PROCESS);
if (attach) attach((DWORD)-1); /* ATTACH_PARENT_PROCESS */

conHandle = GetStdHandle(STD_OUTPUT_HANDLE);
if (conHandle == INVALID_HANDLE_VALUE) conHandle = NULL;
@@ -102,6 +102,12 @@ void GraphicsMode_MakeDefault(struct GraphicsMode* m) {
#define UNICODE
#define _UNICODE
#endif

#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0501 /* Windows XP */
/* NOTE: Functions that are not present on Windows 2000 are dynamically loaded. */
/* Hence the actual minimum supported OS is Windows 2000. This just avoids redeclaring structs. */
#endif
#include <windows.h>

#define CC_WIN_STYLE WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN

0 comments on commit 8621e72

Please sign in to comment.
You can’t perform that action at this time.