Aha! I figured it out. JoyHit only polls the button when a joystick command is executed. If you modify the above program to read
Line 31 has been changed to poll JoyX() every loop in the delay cycle. This causes JoyHit to behave like expected.
Graphics 640,480,0 SetBuffer BackBuffer() JF = 0 JC = 0 While Not KeyHit(1) Cls If KeyHit(57) time = MilliSecs() Repeat Cls Text 10,10,"Waiting... "+(5000-(MilliSecs()-time)) a = JoyX() ;Added this line!!!!!!! Flip Until MilliSecs() - time > 5000 End If JH = JoyHit(1) JC = JC + JH JD = JoyDown(1) If JH Then JF = 1 - JF Text 10,10,"JoyHit = "+JC Text 10,30,"JoyDown = "+JD If JF Color 255,0,0 Else Color 255,255,255 End If Oval 100,10,10,10 Color 255,255,255 Flip Wend
Line 31 has been changed to poll JoyX() every loop in the delay cycle. This causes JoyHit to behave like expected.