changeset 2573:40b89e3d7ab5 gsoc2008_force_feedback

More windows haptic patches.
author Edgar Simo <bobbens@gmail.com>
date Thu, 31 Jul 2008 16:29:12 +0000
parents bb1481265341
children c1f07fdd1e2d
files src/haptic/win32/SDL_syshaptic.c
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/haptic/win32/SDL_syshaptic.c	Thu Jul 31 16:23:52 2008 +0000
+++ b/src/haptic/win32/SDL_syshaptic.c	Thu Jul 31 16:29:12 2008 +0000
@@ -74,6 +74,7 @@
 struct haptic_hweffect
 {
    DIEFFECT effect;
+   LPDIRECTINPUTEFFECT ref;
 };
 
 
@@ -190,7 +191,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)
@@ -978,8 +979,8 @@
 
    /* Create the actual effect. */
    ret = IDirectInputDevice2_SetParameters(effect->hweffect->ref, &temp, flags);
-   if (ret != FF_OK) {
-      SDL_SetError("Haptic: Unable to update effect: %s.", FFStrError(ret));
+   if (FAILED(ret)) {
+      DI_SetError("Unable to update effect",ret);
       goto err_update;
    }