Mercurial > sdl-ios-xcode
diff src/haptic/win32/SDL_syshaptic.c @ 2572:bb1481265341 gsoc2008_force_feedback
More windows haptic patches.
author | Edgar Simo <bobbens@gmail.com> |
---|---|
date | Thu, 31 Jul 2008 16:23:52 +0000 |
parents | 6b29d9f267be |
children | 40b89e3d7ab5 |
line wrap: on
line diff
--- a/src/haptic/win32/SDL_syshaptic.c Thu Jul 31 16:19:01 2008 +0000 +++ b/src/haptic/win32/SDL_syshaptic.c Thu Jul 31 16:23:52 2008 +0000 @@ -190,7 +190,7 @@ * Callback to get all supported effects. */ #define EFFECT_TEST(e,s) \ -if (pei->guid == (e)) \ +if (pei->guid == &(e)) \ haptic->supported |= (s) static BOOL CALLBACK DI_EffectCallback(LPCDIEFFECTINFO pei, LPVOID pv) @@ -690,7 +690,7 @@ SDL_memset(condition, 0, sizeof(DICONDITION)); /* Specifics */ - for (i=0; i<dest->cAxes; i++) { + for (i=0; i<(int)dest->cAxes; i++) { condition[i].lOffset = CONVERT(hap_condition->center[i]); condition[i].lPositiveCoefficient = CONVERT(hap_condition->right_coeff[i]); condition[i].lNegativeCoefficient = CONVERT(hap_condition->left_coeff[i]); @@ -857,40 +857,40 @@ { switch (effect->effect.type) { case SDL_HAPTIC_CONSTANT: - return GUID_ConstantForce; + return &GUID_ConstantForce; case SDL_HAPTIC_RAMP: - return GUID_RampForce; + return &GUID_RampForce; case SDL_HAPTIC_SQUARE: - return GUID_Square; + return &GUID_Square; case SDL_HAPTIC_SINE: - return GUID_Sine; + return &GUID_Sine; case SDL_HAPTIC_TRIANGLE: - return GUID_Triangle; + return &GUID_Triangle; case SDL_HAPTIC_SAWTOOTHUP: - return GUID_SawtoothUp; + return &GUID_SawtoothUp; case SDL_HAPTIC_SAWTOOTHDOWN: - return GUID_SawtoothDown; + return &GUID_SawtoothDown; case SDL_HAPTIC_SPRING: - return GUID_Spring; + return &GUID_Spring; case SDL_HAPTIC_DAMPER: - return GUID_Damper; + return &GUID_Damper; case SDL_HAPTIC_INERTIA: - return GUID_Inertia; + return &GUID_Inertia; case SDL_HAPTIC_FRICTION: - return GUID_Friction; + return &GUID_Friction; case SDL_HAPTIC_CUSTOM: - return GUID_CustomForce; + return &GUID_CustomForce; default: SDL_SetError("Haptic: Unknown effect type.");