src/haptic/linux/SDL_syshaptic.c
branchgsoc2008_force_feedback
changeset 2475 4b874e3a3a2c
parent 2474 3f80bf1528b4
child 2476 242d8a668ebb
--- a/src/haptic/linux/SDL_syshaptic.c	Sun Jun 01 18:46:51 2008 +0000
+++ b/src/haptic/linux/SDL_syshaptic.c	Sun Jun 01 19:11:49 2008 +0000
@@ -37,28 +37,37 @@
 #include <string.h>
 
 
-#include <stdio.h>
-
-
 #define MAX_HAPTICS  32
 
 
+/*
+ * List of available haptic devices.
+ */
 static struct
 {
    char *fname;
    SDL_Haptic *haptic;
 } SDL_hapticlist[MAX_HAPTICS];
 
+
+/*
+ * Haptic system hardware data.
+ */
 struct haptic_hwdata
 {
    int fd;
 };
 
 
+
 #define test_bit(nr, addr) \
    (((1UL << ((nr) & 31)) & (((const unsigned int *) addr)[(nr) >> 5])) != 0)
 #define EV_TEST(ev,f) \
    if (test_bit((ev), features)) ret |= (f);
+/*
+ * Test whether a device has haptic properties.
+ * Returns available properties or 0 if there are none.
+ */
 static int
 EV_IsHaptic(int fd)
 {
@@ -139,6 +148,9 @@
 }
 
 
+/*
+ * Return the name of a haptic device, does not need to be opened.
+ */
 const char *
 SDL_SYS_HapticName(int index)
 {
@@ -162,6 +174,9 @@
 }
 
 
+/*
+ * Opens a haptic device for usage.
+ */
 int
 SDL_SYS_HapticOpen(SDL_Haptic * haptic)
 {
@@ -182,6 +197,15 @@
 }
 
 
+/*
+ * Closes the haptic device.
+ */
+void
+SDL_SYS_HapticClose(SDL_Haptic * haptic)
+{
+}
+
+
 /* Clean up after system specific haptic stuff */
 void
 SDL_SYS_HapticQuit(void)