hacks to fix MinGW builds

This commit is contained in:
jeblanchard 2008-05-31 02:58:43 +00:00
parent 12531d470e
commit 38eb679ebc
2 changed files with 21 additions and 2 deletions

View File

@ -39,12 +39,13 @@ if env['PLATFORM'] == 'cygwin':
conf = Configure(env)
if env['PLATFORM'] == 'win32':
conf.env.Append(CPPPATH = [".", "drivers/win/", "drivers/common/", "drivers/", "drivers/win/zlib", "drivers/win/directx"])
conf.env.Append(CPPDEFINES = ["PSS_STYLE=2", "WIN32", "_USE_SHARED_MEMORY_", "NETWORK", "FCEUDEF_DEBUGGER", "NOMINMAX", "_WIN32_IE=0x0300"])
conf.env.Append(CPPDEFINES = ["PSS_STYLE=2", "WIN32", "_USE_SHARED_MEMORY_", "NETWORK", "FCEUDEF_DEBUGGER", "NOMINMAX", "NEED_MINGW_HACKS", "_WIN32_IE=0x0600"])
conf.env.Append(LIBS = ["rpcrt4", "comctl32", "vfw32", "winmm", "ws2_32", "comdlg32", "ole32", "gdi32"])
if env.has_key('DEBUG'):
if env['DEBUG']:
conf.env.Append(CCFLAGS = " -g")
conf.env.Append(CPPDEFINES = ["_DEBUG"])
conf.env.Append(CCFLAGS = " -O3 -Wall")
else: # Should we do this?
conf.env.Append(CCFLAGS = " -O3 -fomit-frame-pointer")
else:

View File

@ -1,3 +1,6 @@
#ifndef WIN_COMMON_H
#define WIN_COMMON_H
#include <stdio.h>
#include <windows.h>
#include <windowsx.h>
@ -12,6 +15,20 @@
#define DIRECTSOUND_VERSION 0x0700
#define DIRECTDRAW_VERSION 0x0700
#define DIRECTINPUT_VERSION 0x700
#ifdef NEED_MINGW_HACKS
typedef struct _HD_HITTESTINFO HDHITTESTINFO;
// Pulled from wine's commctrl.h:
typedef struct tagNMLVODSTATECHANGE
{
NMHDR hdr;
int iFrom;
int iTo;
UINT uNewState;
UINT uOldState;
} NMLVODSTATECHANGE, *LPNMLVODSTATECHANGE;
#endif
//#define FCEUDEF_DEBUGGER //mbg merge 7/17/06 removing conditional compiles
#include "../../types.h"
#include "../../file.h"
@ -44,4 +61,5 @@ extern int eoptions;
#define EO_FORCEISCALE 16384
#define EO_NOFOURSCORE 32768
bool directoryExists(const char* dirname);
bool directoryExists(const char* dirname);
#endif