sdlGetCurrentVideoDriver function
Get the name of the currently initialized video driver.
\returns the name of the current video driver or NULL if no driver has been initialized.
\since This function is available since SDL 2.0.0.
\sa SDL_GetNumVideoDrivers \sa SDL_GetVideoDriver
extern DECLSPEC const char *SDLCALL SDL_GetCurrentVideoDriver(void)
Implementation
String? sdlGetCurrentVideoDriver() {
final sdlGetCurrentVideoDriverLookupFunction = libSdl2.lookupFunction<
Pointer<Utf8> Function(),
Pointer<Utf8> Function()>('SDL_GetCurrentVideoDriver');
final result = sdlGetCurrentVideoDriverLookupFunction();
if (result == nullptr) {
return null;
}
return result.toDartString();
}