From 2dcccc7cdaa8929770f072c8f71c272bd9bf61ba Mon Sep 17 00:00:00 2001 From: Themaister Date: Fri, 10 Jun 2011 17:55:40 +0200 Subject: [PATCH] Fix some includes and stuff. --- Makefile.win64 | 8 ++++++++ input/dinput.c | 2 +- input/ssnes_dinput.h | 3 +++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Makefile.win64 b/Makefile.win64 index 05f5398fd1..b2df1a6b3a 100644 --- a/Makefile.win64 +++ b/Makefile.win64 @@ -6,6 +6,7 @@ JOBJ = conf/config_file.o tools/main-stub.o tools/ssnes-joyconfig.o CC = gcc CXX = g++ +HAVE_DINPUT = 1 HAVE_SRC = 0 HAVE_SDL = 1 HAVE_XML = 1 @@ -105,6 +106,13 @@ ifeq ($(HAVE_PYTHON), 1) OBJ += gfx/py_state/py_state.o endif +ifeq ($(HAVE_DINPUT), 1) + LIBS += -ldinput8 -ldxguid -lole32 + DEFINES += -DHAVE_DINPUT + OBJ += input/dinput.o +endif + + ifneq ($(V),1) Q := @ endif diff --git a/input/dinput.c b/input/dinput.c index a618adfd1e..92b25df7f5 100644 --- a/input/dinput.c +++ b/input/dinput.c @@ -109,7 +109,7 @@ sdl_dinput_t* sdl_dinput_init(void) di->hWnd = info.window; if (FAILED(DirectInput8Create( - GetModuleHandle(NULL), 0x0800, &IID_IDirectInput8, + GetModuleHandle(NULL), DIRECTINPUT_VERSION, &IID_IDirectInput8, (void**)&di->ctx, NULL))) { SSNES_ERR("Failed to init DirectInput.\n"); diff --git a/input/ssnes_dinput.h b/input/ssnes_dinput.h index fd2cdaee97..57411bffff 100644 --- a/input/ssnes_dinput.h +++ b/input/ssnes_dinput.h @@ -18,6 +18,9 @@ #ifndef __SSNES_DINPUT_H #define __SSNES_DINPUT_H +#undef DIRECTINPUT_VERSION +#define DIRECTINPUT_VERSION 0x0800 + #include #include #include "general.h"