GameInputManager.DeviceCount

From Xojo Documentation

Method


GameInputManager.DeviceCount() As Integer

Supported for all project types and targets.

Returns as an Integer the number of input devices.

Example

This example gets the list of all the devices on the user‘s computer and displays them in a ListBox. mManager is a GameInputDevice instance that has been added to the window.

Var gCount, i As Integer
If mManager=Nil Then
mManager=New GameInputManager
End If
gCount = mManager.DeviceCount
For i = 0 To gCount-1
Listbox1.AddRow(mManager.Device(i).Name)
Next