sdlLoadObject function
Dynamically load a shared object.
\param sofile a system-dependent name of the object file. \returns an opaque pointer to the object handle 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_LoadFunction \sa SDL_UnloadObject
extern SDL_DECLSPEC SDL_SharedObject * SDLCALL SDL_LoadObject(const char *sofile)
Implementation
Pointer<SdlSharedObject> sdlLoadObject(String? sofile) {
final sdlLoadObjectLookupFunction = libSdl3.lookupFunction<
Pointer<SdlSharedObject> Function(Pointer<Utf8> sofile),
Pointer<SdlSharedObject> Function(
Pointer<Utf8> sofile)>('SDL_LoadObject');
final sofilePointer = sofile != null ? sofile.toNativeUtf8() : nullptr;
final result = sdlLoadObjectLookupFunction(sofilePointer);
calloc.free(sofilePointer);
return result;
}