src/haptic/win32/SDL_syshaptic.c
branchgsoc2008_force_feedback
changeset 2578 72c4ac55f73c
parent 2575 57ea8810b5f0
child 2580 64fa227c01ce
equal deleted inserted replaced
2577:72b17d80b426 2578:72c4ac55f73c
    32 #define WIN32_LEAN_AND_MEAN
    32 #define WIN32_LEAN_AND_MEAN
    33 #include <windows.h>
    33 #include <windows.h>
    34 
    34 
    35 #define DIRECTINPUT_VERSION 0x0700 /* Need at least DirectX 7 for dwStartDelay */
    35 #define DIRECTINPUT_VERSION 0x0700 /* Need at least DirectX 7 for dwStartDelay */
    36 #include <dinput.h>
    36 #include <dinput.h>
    37 #include <dxerr9.h>          /* From DirectX SDK 9c */
    37 #include <dxerr.h>
    38 #ifdef _MSC_VER
    38 #ifdef _MSC_VER
    39 #   pragma comment (lib, "dxerr9.lib")
    39 #   pragma comment (lib, "dxerr.lib")
    40 #endif /* _MSC_VER */
    40 #endif /* _MSC_VER */
    41 
    41 
    42     /* an ISO hack for VisualC++ */
    42     /* an ISO hack for VisualC++ */
    43 #ifdef _MSC_VER
    43 #ifdef _MSC_VER
    44 #define   snprintf   _snprintf
    44 #define   snprintf   _snprintf
   102  */
   102  */
   103 static void
   103 static void
   104 DI_SetError(const char *str, HRESULT err)
   104 DI_SetError(const char *str, HRESULT err)
   105 {
   105 {
   106    SDL_SetError( "Haptic: %s - %s: %s", str,
   106    SDL_SetError( "Haptic: %s - %s: %s", str,
   107                  DXGetErrorString9(err),
   107                  DXGetErrorString(err),
   108                  DXGetErrorDescription9(err));
   108                  DXGetErrorDescription(err));
   109 }
   109 }
   110 
   110 
   111 
   111 
   112 /*
   112 /*
   113  * Initializes the haptic subsystem.
   113  * Initializes the haptic subsystem.