sdlGetTouchName function
Get the touch device name as reported from the driver or NULL if the index is invalid.
\since This function is available since SDL 2.0.22.
extern DECLSPEC const char* SDLCALL SDL_GetTouchName(int index)
Implementation
String? sdlGetTouchName(int index) {
final sdlGetTouchNameLookupFunction = libSdl2.lookupFunction<
Pointer<Utf8> Function(Int32 index),
Pointer<Utf8> Function(int index)>('SDL_GetTouchName');
final result = sdlGetTouchNameLookupFunction(index);
if (result == nullptr) {
return null;
}
return result.toDartString();
}