From 87d34deb0cc1bfe1c0faa1d5b4018ef89ca06750 Mon Sep 17 00:00:00 2001 From: Themaister Date: Tue, 13 Sep 2011 14:57:01 +0200 Subject: [PATCH] Can build with SDL 1.3 on Win32. --- input/dinput.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/input/dinput.c b/input/dinput.c index 4370ce6e66..5adbd98860 100644 --- a/input/dinput.c +++ b/input/dinput.c @@ -22,6 +22,7 @@ #include #include #include +#include "../gfx/sdlwrap.h" void sdl_dinput_free(sdl_dinput_t *di) { @@ -103,12 +104,18 @@ sdl_dinput_t* sdl_dinput_init(void) CoInitialize(NULL); SDL_SysWMinfo info; + SDL_VERSION(&info.version); if (!SDL_GetWMInfo(&info)) { SSNES_ERR("Failed to get SysWM info.\n"); goto error; } + +#if SDL_MODERN + di->hWnd = info.info.win.window; +#else di->hWnd = info.window; +#endif if (FAILED(DirectInput8Create( GetModuleHandle(NULL), DIRECTINPUT_VERSION, &IID_IDirectInput8,