Skip to content

JoyDeviceConnected

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

JoyDeviceConnected

JoyDeviceConnected:Int32 port:Int32
Parameter Mode Type Default Description
port In Int32 required The port to ask, counted from 0.

Returns: 1 if a joystick is connected to the port, otherwise 0.

Description

Tells if the joystick of a port is still plugged in. A joystick that was removed leaves its port not connected, and plugging it in again gives it a new port.

Differences

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

Examples

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

Related Commands

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

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally