sdlGetCurrentCameraDriver function
Get the name of the current camera driver.
The names of drivers are all simple, low-ASCII identifiers, like "v4l2", "coremedia" or "android". These never have Unicode characters, and are not meant to be proper names.
\returns the name of the current camera driver or NULL if no driver has been initialized.
\threadsafety It is safe to call this function from any thread.
\since This function is available since SDL 3.1.3.
extern SDL_DECLSPEC const char * SDLCALL SDL_GetCurrentCameraDriver(void)
Implementation
String? sdlGetCurrentCameraDriver() {
final sdlGetCurrentCameraDriverLookupFunction = libSdl3.lookupFunction<
Pointer<Utf8> Function(),
Pointer<Utf8> Function()>('SDL_GetCurrentCameraDriver');
final result = sdlGetCurrentCameraDriverLookupFunction();
if (result == nullptr) {
return null;
}
return result.toDartString();
}