# GetRawJoystickExists

## Description

Returns 1 if a joystick exists at the given index. Physical joysticks are detected at startup and placed in IDs 1-8 incrementally. You should call CompleteRawJoystickDetection at some point before this command to make sure that all present joysticks have been discovered. After the initial detection process plugging in additional joysticks will not be detected (except on Android which will detect new joysticks). Unplugging a joystick will not delete its index and this command will still return 1. You can use GetRawJoystickConnected to detect when a previously detected joystick is disconnected. If a disconnected joystick is reattached the AGK will attempt to reconnect to it.
An alternative version of this command exists GetJoystickExists, in which case it will return 1 if there are any raw joysticks attached.

## Definition

integer GetRawJoystickExists( index )

int agk::GetRawJoystickExists( UINT index )

## Parameters

- index - The ID of the joystick to check.