GETJOYSTICKNAME

Top  Previous  Next

Syntax

STRING = GETJOYSTICKNAME(opt device as INT)

Description

Returns the name of a joystick device as shown in the control panel.

Parameters

device - Optional device number. Default is 0 or the first joystick attached to the system

Return value

A string containing the name of the joystick device.

Remarks

A screen must be open or DirectInput initialized manually before using this function.

Example usage

FOR x = 1 TO GETJOYSTICKCOUNT
    PRINT GETJOYSTICKNAME(x-1)
NEXT x