Another Joystick trouble thread with solution

Developer's Forum, for discussion of bugs, code, and other developmental aspects of DOSBox.

Another Joystick trouble thread with solution

Postby Dominus » 2007-5-10 @ 23:28

I found something strange happening with my two USB joysticks. One is a N64 controller with an USB adapter and the other a PSX controller with an USB adapter. Both work fine in Windows XP.
When both are connected to the PC and I start Dosbox, the console tells me that both joysticks are being used. Fine.
When I unplug the N64 one and then start Dosbox, the console does not report any joystick. Vice versa, keeping the N64 plugged in and unplugging the PSX one, Dosbox does find the N64 controller.

After some testing I finally found the solution:
In the Windows control panel open the gamecontroller control, and then click on the advance button. The window that opens asks which controller should be used for older programs.
The "preferred controller" setting probably says [none], choose the controller, click ok, exit the gamecontroller control and start Dosbox. It should now find your controller.
Possible cause of this: The first attached controller gets assigned "for older programs". When you plug in a new controller and then unplug the first one, no conroller is assigned anymore.
Weird but probably true.
This could be something for the FAQ, maybe anyone can make screenshots of those settings with an English Windows. My German one doesn't help much , I guess :)
User avatar
Dominus
DOSBox Moderator
 
Posts: 7285
Joined: 2002-10-03 @ 09:54
Location: Vienna

Re: Another Joystick trouble thread with solution

Postby Kaminari » 2007-5-11 @ 01:26

The Prefered Device option has never worked for me.

I have a PSX pad (via a SmartJoy adapter) and a Saitek Cyborg. If both are connected, most games and emulators will detect the Cyborg as the primary controller, even though the PSX pad is selected as prefered device.
User avatar
Kaminari
Oldbie
 
Posts: 768
Joined: 2002-12-06 @ 01:54

Re: Another Joystick trouble thread with solution

Postby wd » 2007-5-16 @ 10:38

Went through the joystick init code of SDL, and they're using some
variable as joystick index that is always zero.
The svn of SDL has a fix for this actually since mid of 2006 (past their
1.2.11 stable release though). Maybe you could test if a SDL compile
of the newest 1.2 sources really fixes the problem (it should).
wd
DOSBox Author
 
Posts: 10818
Joined: 2003-12-03 @ 21:23

Re: Another Joystick trouble thread with solution

Postby Dominus » 2007-5-16 @ 11:33

hmm, I'll give it a try.
User avatar
Dominus
DOSBox Moderator
 
Posts: 7285
Joined: 2002-10-03 @ 09:54
Location: Vienna

Re: Another Joystick trouble thread with solution

Postby Dominus » 2007-5-16 @ 13:25

ok, works with SVN from January (compared old and new sdl.dll).
Gave me the initiative to get and compile the latest SDL stuff "my" apps need (_net, _mixer, _ttf) :)

For people with Joystick troubles with Dosbox 0.70, look at viewtopic.php?t=15447 and grab the SDL.dll I attached to it. Maybe this will help you as well.
User avatar
Dominus
DOSBox Moderator
 
Posts: 7285
Joined: 2002-10-03 @ 09:54
Location: Vienna


Return to DOSBox Development

Who is online

Users browsing this forum: No registered users and 1 guest