public domain declaration
[sball] / src / sball.c
index 2a893de..c8fed5b 100644 (file)
@@ -1,3 +1,10 @@
+/* Serial spaceball and space-mouse example driver code for UNIX systems.
+ * Tested with Spaceball 4000FLX and Magellan SpaceMouse on GNU/Linux, FreeBSD,
+ * SGI/IRIX, and SunOS (Solaris/Illumos).
+ *
+ * Author: John Tsiombikas <nuclear@member.fsf.org>
+ * No copyright, public domain.
+ */
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -309,13 +316,8 @@ static int mag_parsepkt(struct sball *sb, int id, char *data, int len)
                        return -1;
                }
                for(i=0; i<6; i++) {
-#ifdef SBALL_BIG_ENDIAN
-                       sb->mot[i] = ((((int)data[3] & 0xf) << 12) | (((int)data[2] & 0xf) << 8) |
-                                       (((int)data[1] & 0xf) << 4) | (data[0] & 0xf)) - 0x8000;
-#else
                        sb->mot[i] = ((((int)data[0] & 0xf) << 12) | (((int)data[1] & 0xf) << 8) |
                                        (((int)data[2] & 0xf) << 4) | (data[3] & 0xf)) - 0x8000;
-#endif
                        data += 4;
                }
                print_state(sb);