JoyHit broken in Vista?

BlitzMax Forums/BlitzMax Programming/JoyHit broken in Vista?

Is JoyHit broken on Vista, I've just tried a version of my project on Vista, and it completely ignores JoyHit?

'Try this in Vista

Graphics 640 , 480

Repeat
Cls
	'Print to output area
	If JoyDown(3) Then Print "JoyDown"
	If JoyHit(4) Then Print "joyHit"
Flip 
Until KeyDown(KEY_ESCAPE)
End 


Any news about this, or a quick fix?

Dabz

You haven't used - "Import Pub.FreeJoy" at the start of your code.

I also found that you need to use JoyCount() to get the program to work.

This code works fine now -

 
Import Pub.FreeJoy

Graphics 640 , 480

JoyCount()

Repeat
Cls
	'Print to output area
	If JoyDown(3) Then Print "JoyDown"
	If JoyHit(4) Then Print "joyHit"
Flip 
Until KeyDown(KEY_ESCAPE)
End


Thanks Rockford, I forgot about the FreeJoy module!

much appreciated

Dabz

Aren't all pub modules included by default? JoyCount() was the cause of your troubles. It acts as an initialiser routine which isn't documented. I reported that a year or two ago. Guess nothing changed.