# HG changeset patch # User Edgar Simo # Date 1217521432 0 # Node ID bb148126534120372a34404fb082df78b220af99 # Parent 6b29d9f267be85b91e353aa991ed3444b2420a39 More windows haptic patches. diff -r 6b29d9f267be -r bb1481265341 src/haptic/win32/SDL_syshaptic.c --- 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; icAxes; 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.");