src/haptic/win32/SDL_syshaptic.c
branchgsoc2008_force_feedback
changeset 2570 53bb7d21928d
parent 2569 806919b319d4
child 2571 6b29d9f267be
equal deleted inserted replaced
2569:806919b319d4 2570:53bb7d21928d
    30 /*#include "../../joystick/win32/SDL_sysjoystick_c.h"*/ /* For joystick hwdata */ 
    30 /*#include "../../joystick/win32/SDL_sysjoystick_c.h"*/ /* For joystick hwdata */ 
    31 
    31 
    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 0x0500
    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 <dxerr9.h>          /* From DirectX SDK 9c */
    38 #ifdef _MSC_VER
    38 #ifdef _MSC_VER
    39 #   pragma comment (lib, "dxerr9.lib")
    39 #   pragma comment (lib, "dxerr9.lib")
    40 #endif /* _MSC_VER */
    40 #endif /* _MSC_VER */
   187 
   187 
   188 
   188 
   189 /*
   189 /*
   190  * Callback to get all supported effects.
   190  * Callback to get all supported effects.
   191  */
   191  */
       
   192 /*
   192 #define EFFECT_TEST(e,s)   \
   193 #define EFFECT_TEST(e,s)   \
   193 if (pei->guid == (e))      \
   194 if (pei->guid == (e))      \
   194    haptic->supported |= (s)
   195    haptic->supported |= (s)
       
   196 */
   195 static BOOL CALLBACK
   197 static BOOL CALLBACK
   196 DI_EffectCallback(LPCDIEffectInfo pei, LPVOID pv)
   198 DI_EffectCallback(LPCDIEffectInfo pei, LPVOID pv)
   197 {
   199 {
   198    /* Prepare the haptic device. */
   200    /* Prepare the haptic device. */
   199    SDL_Haptic *haptic = (SDL_Haptic*) pv;
   201    SDL_Haptic *haptic = (SDL_Haptic*) pv;