Mercurial > sdl-ios-xcode
comparison src/joystick/win32/SDL_dxjoystick.c @ 2761:0c544c2eff77
Almost got this compiling on Cygwin32, just needs DirectInput 7
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 15 Sep 2008 08:41:03 +0000 |
parents | 02aa80d7905f |
children | c3ff3d5d16f0 |
comparison
equal
deleted
inserted
replaced
2760:02aa80d7905f | 2761:0c544c2eff77 |
---|---|
37 #include "SDL_events.h" | 37 #include "SDL_events.h" |
38 #include "SDL_joystick.h" | 38 #include "SDL_joystick.h" |
39 #include "../SDL_sysjoystick.h" | 39 #include "../SDL_sysjoystick.h" |
40 #include "../SDL_joystick_c.h" | 40 #include "../SDL_joystick_c.h" |
41 #include "SDL_dxjoystick_c.h" | 41 #include "SDL_dxjoystick_c.h" |
42 | |
43 | |
44 #ifndef DIDFT_OPTIONAL | |
45 #define DIDFT_OPTIONAL 0x80000000 | |
46 #endif | |
42 | 47 |
43 | 48 |
44 #define INPUT_QSIZE 32 /* Buffer up to 32 input messages */ | 49 #define INPUT_QSIZE 32 /* Buffer up to 32 input messages */ |
45 #define MAX_JOYSTICKS 8 | 50 #define MAX_JOYSTICKS 8 |
46 #define AXIS_MIN -32768 /* minimum value for axis coordinate */ | 51 #define AXIS_MIN -32768 /* minimum value for axis coordinate */ |
283 SetDIerror("CoInitialize", result); | 288 SetDIerror("CoInitialize", result); |
284 return (-1); | 289 return (-1); |
285 } | 290 } |
286 | 291 |
287 result = CoCreateInstance(&CLSID_DirectInput, NULL, CLSCTX_INPROC_SERVER, | 292 result = CoCreateInstance(&CLSID_DirectInput, NULL, CLSCTX_INPROC_SERVER, |
288 &IID_IDirectInput, &dinput); | 293 &IID_IDirectInput, (LPVOID)&dinput); |
289 | 294 |
290 if (FAILED(result)) { | 295 if (FAILED(result)) { |
291 SetDIerror("CoCreateInstance", result); | 296 SetDIerror("CoCreateInstance", result); |
292 return (-1); | 297 return (-1); |
293 } | 298 } |