sdlJoystickGetGuid function

SdlGuid sdlJoystickGetGuid(
  1. Pointer<SdlJoystick> joystick
)

Get the implementation-dependent GUID for the joystick.

This function requires an open joystick.

\param joystick the SDL_Joystick obtained from SDL_JoystickOpen() \returns the GUID of the given joystick. If called on an invalid index, this function returns a zero GUID; call SDL_GetError() for more information.

\since This function is available since SDL 2.0.0.

\sa SDL_JoystickGetDeviceGUID \sa SDL_JoystickGetGUIDString

extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUID(SDL_Joystick *joystick)

Implementation

SdlGuid sdlJoystickGetGuid(Pointer<SdlJoystick> joystick) {
  final sdlJoystickGetGuidLookupFunction = libSdl2.lookupFunction<
      SdlGuid Function(Pointer<SdlJoystick> joystick),
      SdlGuid Function(Pointer<SdlJoystick> joystick)>('SDL_JoystickGetGUID');
  return sdlJoystickGetGuidLookupFunction(joystick);
}