sdlJoystickAttachVirtual function

int sdlJoystickAttachVirtual(
  1. int type,
  2. int naxes,
  3. int nbuttons,
  4. int nhats,
)

Attach a new virtual joystick.

\returns the joystick's device index, or -1 if an error occurred.

\since This function is available since SDL 2.0.14.

extern DECLSPEC int SDLCALL SDL_JoystickAttachVirtual(SDL_JoystickType type, int naxes, int nbuttons, int nhats)

Implementation

int sdlJoystickAttachVirtual(int type, int naxes, int nbuttons, int nhats) {
  final sdlJoystickAttachVirtualLookupFunction = libSdl2.lookupFunction<
      Int32 Function(Int32 type, Int32 naxes, Int32 nbuttons, Int32 nhats),
      int Function(int type, int naxes, int nbuttons,
          int nhats)>('SDL_JoystickAttachVirtual');
  return sdlJoystickAttachVirtualLookupFunction(type, naxes, nbuttons, nhats);
}