[fixed] Irr1.6: Joysticks created with no ID on OSX

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
DavidJE13
Posts: 165
Joined: Tue Jan 09, 2007 7:17 pm

[fixed] Irr1.6: Joysticks created with no ID on OSX

Post by DavidJE13 »

CIrrDeviceMacOSX.mm: line 1303-1315
returnInfo is never given a Joystick number. This results in semi-random numbers assigned to joysticks (usually 0, but sometimes other values). This is not the case in the Windows implementation.

to fix, add u32 jindex = 0u; to the top of the activateJoysticks function, and returnInfo.Joystick = jindex; jindex ++; anywhere near line 1308.

(maybe this is considered a hack but it does the job)

I'll note that adding returnInfo.Joystick = info.Joystick; will not fix this because the info.Joystick property is only set later.

(all line numbers based on the release I'm using (1.6), not the SVN)
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Thanks, I have changed it in the 1.7 release branch in svn.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply