05-08-2023, 02:23 PM
Great improvements,
about _DEVICES, no news,
this code continue to fails...
use an USB Jostick, first run the code, press Enter (you get the NO Joystick warning), then Plugin the Joystick and after some seconds press Enter again (you get the info of joystick plugged in) , now plug out the joystick (you desire to use another joystick or another USB) and after some seconds press Enter again...
for Operative System the joystick is again NO detected, for QB64pe it is still there in that USB!
waiting for when developers efforts will (peharps) be focused on this issue.
Thank you so much for all the time, the love and the energy spent for QB64pe development!
about _DEVICES, no news,
this code continue to fails...
Code: (Select All)
'minitest Joystic detection
DefInt I
Const False = 0, True = Not False
ReDim Shared iLBu(1 To 1), iLax(1 To 1), iLWh(1 To 1)
ReDim Shared iLB, iLA, iLW
While True
Cls
Color 1, 10
Locate 2, 1: Print "Press Enter to detect joystick"
Locate , 1: Print " Press Escape to quit program"
Color 5, 12: Locate 10, 1: Print iLA, iLB, iLW
Locate , 1: Print UBound(iLax), UBound(iLBu), UBound(iLWh)
Color 6, 2: Locate 12, 1: Print iLA, iLB, iLW
Locate , 1: Print UBound(iLax), UBound(iLBu), UBound(iLWh)
iKB = _KeyHit
If iKB = 13 Then
'Color 5: Locate 10, 1: Print iLA, iLB, iLW
'Locate , 1: Print UBound(iLax), UBound(iLBu), UBound(iLWh)
If JoystickInit = True Then
'Color 6: Locate 12, 1: Print iLA, iLB, iLW
'Locate , 1: Print UBound(iLax), UBound(iLBu), UBound(iLWh)
Else
Color 4, 14
Locate 22, 1: Print "Joystick NOT detected": Sleep 2
End If
ElseIf iKB = 27 Then
Color 7, 0
Exit While
End If
_Limit 10
Wend
End
Function JoystickInit%
iDevice = _Devices
If iDevice > 2 Then
JoystickInit% = True
iLA = _LastAxis(iDevice)
iLB = _LastButton(iDevice)
iLW = _LastWheel(iDevice)
ReDim iLBu(1 To iLB), iLax(1 To iLA), iLWh(1 To iLW)
Else
JoystickInit% = False
iLA = 0
iLB = 0
iLW = 0
ReDim iLBu(1 To iLB), iLax(1 To iLA), iLWh(1 To iLW)
End If
End Function
use an USB Jostick, first run the code, press Enter (you get the NO Joystick warning), then Plugin the Joystick and after some seconds press Enter again (you get the info of joystick plugged in) , now plug out the joystick (you desire to use another joystick or another USB) and after some seconds press Enter again...
for Operative System the joystick is again NO detected, for QB64pe it is still there in that USB!
waiting for when developers efforts will (peharps) be focused on this issue.
Thank you so much for all the time, the love and the energy spent for QB64pe development!