Page 1 of 1

IsJoystick(#Number) - Checks if joystick is connected.

Posted: Mon Sep 29, 2008 7:56 am
by DarkDragon
Hello,

As I want to check up to about 8 joysticks I need a function telling me how many are connected to the PC or a function which returns if a joystick with the specific number is connected and can be examined. ExamineJoystick just notifies the debugger as if it is a fatal error to check a non-existing joystick. Without debugger it works.

Thanks,
Daniel

Posted: Mon Sep 29, 2008 11:03 am
by Fred
InitJoystick() returns the number of connected joystick, and can be called again if you want to check if a new one is available.

Posted: Mon Sep 29, 2008 11:17 am
by DarkDragon
Fred wrote:InitJoystick() returns the number of connected joystick, and can be called again if you want to check if a new one is available.
Ah, good to know :lol: . Sorry for the mistake (It's a bit hard to to keep track of the commands for me).

[EDIT]
But the Debugger still says: "InitJoystick() can only be called once." and stops the program.

Posted: Mon Sep 29, 2008 11:35 am
by Fred
Ha yes, i will remove the debug check, thanks.

Posted: Tue Sep 30, 2008 12:32 am
by Rescator
Fred, maybe you shouldn't do that.
leave the check but add a wrapper called GetJoysticks() or something.
That way the InitJoystick() will keep behaving like all other Init functions. (can only be called once)