comparison src/haptic/win32/SDL_syshaptic.c @ 2760:02aa80d7905f

Updated Visual C++ build
author Sam Lantinga <slouken@libsdl.org>
date Mon, 15 Sep 2008 07:34:36 +0000
parents 50bc882455e5
children 0c544c2eff77
comparison
equal deleted inserted replaced
2759:95fccd9bf262 2760:02aa80d7905f
26 #include "SDL_haptic.h" 26 #include "SDL_haptic.h"
27 #include "../SDL_syshaptic.h" 27 #include "../SDL_syshaptic.h"
28 #include "SDL_joystick.h" 28 #include "SDL_joystick.h"
29 #include "../../joystick/SDL_sysjoystick.h" /* For the real SDL_Joystick */ 29 #include "../../joystick/SDL_sysjoystick.h" /* For the real SDL_Joystick */
30 #include "../../joystick/win32/SDL_dxjoystick_c.h" /* For joystick hwdata */ 30 #include "../../joystick/win32/SDL_dxjoystick_c.h" /* For joystick hwdata */
31
32 #define WIN32_LEAN_AND_MEAN
33 #include <windows.h>
34
35 #define DIRECTINPUT_VERSION 0x0700 /* Need at least DirectX 7 for dwStartDelay */
36 #include <dinput.h>
37 #include <dxerr8.h>
38 #ifdef _MSC_VER
39 # pragma comment (lib, "dinput8.lib")
40 # pragma comment (lib, "dxguid.lib")
41 # pragma comment (lib, "dxerr8.lib")
42 #endif /* _MSC_VER */
43
44 /* an ISO hack for VisualC++ */
45 #ifdef _MSC_VER
46 #define snprintf _snprintf
47 #endif /* _MSC_VER */
48 31
49 32
50 #define MAX_HAPTICS 32 33 #define MAX_HAPTICS 32
51 34
52 35
120 * Like SDL_SetError but for DX error codes. 103 * Like SDL_SetError but for DX error codes.
121 */ 104 */
122 static void 105 static void
123 DI_SetError(const char *str, HRESULT err) 106 DI_SetError(const char *str, HRESULT err)
124 { 107 {
108 /*
125 SDL_SetError("Haptic: %s - %s: %s", str, 109 SDL_SetError("Haptic: %s - %s: %s", str,
126 DXGetErrorString8A(err), DXGetErrorDescription8A(err)); 110 DXGetErrorString8A(err), DXGetErrorDescription8A(err));
111 */
112 SDL_SetError("Haptic error %s", str);
127 } 113 }
128 114
129 115
130 /* 116 /*
131 * Checks to see if two GUID are the same. 117 * Checks to see if two GUID are the same.