Hi,
I'm cloning Linux-style /dev/js support, to Solaris.
(a patch for joy_i386.c is attached)
My driver passes jstest. xmame appears to open the device.
It prints out
I386 joystick interface initialization...
Once I wiggle the joystick, it also prints out
Joystick: /dev/js0 is WingMan Attack 2
Joystick: Built in driver version: 2.1.0
Joystick: Kernel driver version : 2.1.0
OSD: Info: Joystick 0, 3 axis, 6 buttons
Using 16bpp video mode
...
but then it hangs.
truss shows that it keeps looping on reading from the joystick device.
Can I get any suggestions on what is happening, and how to fix it?
--- joy_i386.c.orig 2003-10-04 13:53:15.916020000 -0400
+++ joy_i386.c 2003-10-14 12:16:42.496845000 -0400
@@ -9,10 +9,14 @@
{ "joydevname", "jdev", rc_string, &joy_dev,
"/dev/joy", 0, 0, NULL,
"Joystick device prefix (defaults to /dev/joy)" },
-#elif defined __ARCH_linux
+#elif defined __ARCH_linux || defined __ARCH_solaris
{ "joydevname", "jdev", rc_string, &joy_dev,
"/dev/js", 0, 0, NULL,
"Joystick device prefix (defaults to /dev/js)" },
+#else
+#ifdef I386_JOYSTICK
+#error You need to give a define for your OS here
+#endif
#endif /* arch */
{ NULL, NULL, rc_end, NULL,
NULL, 0, 0, NULL,
@@ -29,7 +33,7 @@
#include <machine/joystick.h>
typedef struct joystick joy_struct;
-#elif defined __ARCH_linux
+#elif defined __ARCH_linux || defined __ARCH_solaris
#include <linux/joystick.h>
typedef struct JS_DATA_TYPE joy_struct;