Allow more usb joysticks in SDL

2012-05-15 Thread Edd Barrett
I have this usb keyboard which uses 3 uhid devices nodes, leaving only one left
for SDL to use (SDL has a hardcoded limit of 4 usb devices).

Let's bump this. Tested using emulators/dgen. OK?

Index: Makefile
===
RCS file: /cvs/ports/devel/sdl/Makefile,v
retrieving revision 1.85
diff -u -p -r1.85 Makefile
--- Makefile29 Mar 2012 13:38:30 -  1.85
+++ Makefile15 May 2012 16:02:41 -
@@ -5,7 +5,7 @@ COMMENT=cross-platform multimedia libra
 VERSION=   1.2.15
 DISTNAME=  SDL-${VERSION}
 PKGNAME=   ${DISTNAME:L}
-REVISION=  1
+REVISION=  2
 CATEGORIES=devel
 MASTER_SITES=  ${HOMEPAGE}release/
 
Index: patches/patch-src_joystick_bsd_SDL_sysjoystick_c
===
RCS file: patches/patch-src_joystick_bsd_SDL_sysjoystick_c
diff -N patches/patch-src_joystick_bsd_SDL_sysjoystick_c
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-src_joystick_bsd_SDL_sysjoystick_c15 May 2012 16:02:41 
-
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+It is easy to exhaust uhid devices in this day and age.
+
+--- src/joystick/bsd/SDL_sysjoystick.c.origTue May 15 17:09:10 2012
 src/joystick/bsd/SDL_sysjoystick.c Tue May 15 17:09:29 2012
+@@ -77,7 +77,7 @@
+ #include ../SDL_sysjoystick.h
+ #include ../SDL_joystick_c.h
+ 
+-#define MAX_UHID_JOYS 4
++#define MAX_UHID_JOYS 16
+ #define MAX_JOY_JOYS  2
+ #define MAX_JOYS  (MAX_UHID_JOYS + MAX_JOY_JOYS)
+ 
-- 
Best Regards
Edd Barrett

http://www.theunixzoo.co.uk



Re: Allow more usb joysticks in SDL

2012-05-15 Thread Antti Harri
On Tuesday 15 May 2012 19:16:20 Edd Barrett wrote:
 I have this usb keyboard which uses 3 uhid devices nodes, leaving only one
 left for SDL to use (SDL has a hardcoded limit of 4 usb devices).

 Let's bump this. Tested using emulators/dgen. OK?

Hi.

Why does SDL set keyboards as joysticks in the first place?

-- 
Antti Harri



Re: Allow more usb joysticks in SDL

2012-05-15 Thread Edd Barrett
It doesn't set them as joysticks as such, but it accesses USB joysticks
via a /dev/uhid* node. More than just joysticks use this kind of device
node.

That's all I know.
On May 15, 2012 5:54 PM, Antti Harri i...@openbsd.fi wrote:

 On Tuesday 15 May 2012 19:16:20 Edd Barrett wrote:
  I have this usb keyboard which uses 3 uhid devices nodes, leaving only
 one
  left for SDL to use (SDL has a hardcoded limit of 4 usb devices).
 
  Let's bump this. Tested using emulators/dgen. OK?

 Hi.

 Why does SDL set keyboards as joysticks in the first place?

 --
 Antti Harri