Skip to content

JoyDeviceCount

Narta Xaymar Dirks edited this page Oct 30, 2026 · 2 revisions

JoyDeviceCount

JoyDeviceCount:Int32

Returns: The number of ports in use, 0 if no joystick was found.

Description

Tells how many joysticks and gamepads have had a port. One that is unplugged is still counted, and goes on having its port, see JoyDeviceConnected. At most 4 get a port.

Differences

  • This is a BlitzLLVM extension: the original has no such command.

Examples

Graphics 320, 240, 0, 2
SetBuffer BackBuffer()
Cls
For p = 0 To JoyDeviceCount() - 1
	Text 10, 10 + p * 16, p + ": " + JoyDeviceName(p)
Next
Flip
WaitKey

Related Commands

JoyChanged, JoyDeviceConnected, JoyDeviceName, JoyDown, JoyHat, JoyHit, JoyPitch, JoyRoll

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally