[OSX] JoyCount not detecting disconnected joypads

Archives Forums/BlitzMax Bug Reports/[OSX] JoyCount not detecting disconnected joypads

d-bug(Posted 2009) [#1]
While adding joypad-movement to my game I've discovered, that JoyCount() can only detect one new connected joypad on OSX. Disconnecting a joypad will not have any changes in JoyCount too. It will be shown as present.

Test-code by Yan:


Digging a bit deeper into pub.freejoy I've found, that in freejoy.macosx.c at the following code-lines:
int JoyCount()
{
	if (!macjoycount) InitMacJoy();
	return macjoycount;
}

... macjoycount will only change its value, when its 0. Connecting a second or third joypad would probaly not work too.