Fix some includes and stuff.

This commit is contained in:
Themaister 2011-06-10 17:55:40 +02:00
parent d03855c655
commit 2dcccc7cda
3 changed files with 12 additions and 1 deletions

View File

@ -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

View File

@ -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");

View File

@ -18,6 +18,9 @@
#ifndef __SSNES_DINPUT_H
#define __SSNES_DINPUT_H
#undef DIRECTINPUT_VERSION
#define DIRECTINPUT_VERSION 0x0800
#include <dinput.h>
#include <stdbool.h>
#include "general.h"