comparison src/joystick/win32/SDL_dxjoystick.c @ 2579:bd2a6c70cb29 gsoc2008_force_feedback

Used dxerr instead of dxerr9 in directinput joystick driver.
author Edgar Simo <bobbens@gmail.com>
date Sun, 03 Aug 2008 10:25:25 +0000
parents 72b17d80b426
children 64fa227c01ce
comparison
equal deleted inserted replaced
2578:72c4ac55f73c 2579:bd2a6c70cb29
46 #include <dinput.h> 46 #include <dinput.h>
47 #ifdef _MSC_VER 47 #ifdef _MSC_VER
48 /* Used for the c_dfDIJoystick2 symbol (no imports are used) */ 48 /* Used for the c_dfDIJoystick2 symbol (no imports are used) */
49 # pragma comment (lib, "dinput.lib") 49 # pragma comment (lib, "dinput.lib")
50 #endif 50 #endif
51 #include <dxerr9.h> /* From DirectX SDK 9c */ 51 #include <dxerr.h>
52 #ifdef _MSC_VER 52 #ifdef _MSC_VER
53 # pragma comment (lib, "dxerr9.lib") 53 # pragma comment (lib, "dxerr.lib")
54 #endif 54 #endif
55 55
56 /* an ISO hack for VisualC++ */ 56 /* an ISO hack for VisualC++ */
57 #ifdef _MSC_VER 57 #ifdef _MSC_VER
58 #define snprintf _snprintf 58 #define snprintf _snprintf
125 /* Convert a DirectInput return code to a text message */ 125 /* Convert a DirectInput return code to a text message */
126 static void 126 static void
127 SetDIerror(const char *function, HRESULT code) 127 SetDIerror(const char *function, HRESULT code)
128 { 128 {
129 SDL_SetError("%s() [%s]: %s", function, 129 SDL_SetError("%s() [%s]: %s", function,
130 DXGetErrorString9(code), DXGetErrorDescription9(code)); 130 DXGetErrorString(code), DXGetErrorDescription(code));
131 } 131 }
132 132
133 133
134 /* Function to scan the system for joysticks. 134 /* Function to scan the system for joysticks.
135 * This function should set SDL_numjoysticks to the number of available 135 * This function should set SDL_numjoysticks to the number of available