sdlGetHint function
Get the value of a hint.
\param name the hint to query \returns the string value of a hint or NULL if the hint isn't set.
\since This function is available since SDL 2.0.0.
\sa SDL_SetHint \sa SDL_SetHintWithPriority
extern DECLSPEC const char * SDLCALL SDL_GetHint(const char *name)
Implementation
String? sdlGetHint(String? name) {
final sdlGetHintLookupFunction = libSdl2.lookupFunction<
Pointer<Utf8> Function(Pointer<Utf8> name),
Pointer<Utf8> Function(Pointer<Utf8> name)>('SDL_GetHint');
final namePointer = name != null ? name.toNativeUtf8() : nullptr;
final result = sdlGetHintLookupFunction(namePointer);
calloc.free(namePointer);
if (result == nullptr) {
return null;
}
return result.toDartString();
}