Implemented SDL_SYS_HapticMouse on windows. gsoc2008_force_feedback
authorEdgar Simo <bobbens@gmail.com>
Wed, 06 Aug 2008 07:59:03 +0000
branchgsoc2008_force_feedback
changeset 2615 088907e9a2bb
parent 2614 3ee319d9800a
child 2616 acd5da848404
Implemented SDL_SYS_HapticMouse on windows.
src/haptic/win32/SDL_syshaptic.c
--- a/src/haptic/win32/SDL_syshaptic.c	Wed Aug 06 07:54:33 2008 +0000
+++ b/src/haptic/win32/SDL_syshaptic.c	Wed Aug 06 07:59:03 2008 +0000
@@ -453,8 +453,13 @@
 {
    int i;
 
+   /* Grab the first mouse haptic device we find. */
    for (i=0; i<SDL_numhaptics; i++) {
+      if (SDL_hapticlist[i].capabilities.dwDevType == DIDEVTYPE_MOUSE ) {
+         return i;
+      }
    }
+
    return -1;
 }