Skip to content

JoyWait

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

Blitz3DBlitzBasic

JoyWait

JoyWait:Int32 port:Int32=0
Parameter Mode Type Default Description
port In Int32 0 The joystick to wait for, counted from 0. Defaults to 0.

Returns: The number of the button that was pressed.

Description

Stops the program until a joystick button is pressed and returns its number. A program that has to keep drawing should poll GetJoy or JoyHit instead.

Differences

  • If no joystick is connected the function returns 0 right away instead of waiting forever.

Related Commands

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

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally