JoyHit broken in Vista?

BlitzMax Forums/BlitzMax Programming/JoyHit broken in Vista?

Dabz(Posted 2007) [#1]
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


rockford(Posted 2007) [#2]
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



Dabz(Posted 2007) [#3]
Thanks Rockford, I forgot about the FreeJoy module!

much appreciated

Dabz


Hotcakes(Posted 2007) [#4]
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.