sdlGetRendererName function
Get the name of a renderer.
\param renderer the rendering context. \returns the name of the selected renderer, or NULL on failure; call SDL_GetError() for more information.
\threadsafety It is safe to call this function from any thread.
\since This function is available since SDL 3.1.3.
\sa SDL_CreateRenderer \sa SDL_CreateRendererWithProperties
extern SDL_DECLSPEC const char * SDLCALL SDL_GetRendererName(SDL_Renderer *renderer)
Implementation
String? sdlGetRendererName(Pointer<SdlRenderer> renderer) {
final sdlGetRendererNameLookupFunction = libSdl3.lookupFunction<
Pointer<Utf8> Function(Pointer<SdlRenderer> renderer),
Pointer<Utf8> Function(
Pointer<SdlRenderer> renderer)>('SDL_GetRendererName');
final result = sdlGetRendererNameLookupFunction(renderer);
if (result == nullptr) {
return null;
}
return result.toDartString();
}