sdlGetGdkDefaultUser function
Gets a reference to the default user handle for GDK.
This is effectively a synchronous version of XUserAddAsync, which always prefers the default user and allows a sign-in UI.
\param outUserHandle a pointer to be filled in with the default user handle. \returns true if success or false on failure; call SDL_GetError() for more information.
\since This function is available since SDL 3.1.3.
extern SDL_DECLSPEC bool SDLCALL SDL_GetGDKDefaultUser(XUserHandle *outUserHandle)
Implementation
bool sdlGetGdkDefaultUser(Pointer<XUserHandle> outUserHandle) {
final sdlGetGdkDefaultUserLookupFunction = libSdl3.lookupFunction<
Uint8 Function(Pointer<XUserHandle> outUserHandle),
int Function(
Pointer<XUserHandle> outUserHandle)>('SDL_GetGDKDefaultUser');
return sdlGetGdkDefaultUserLookupFunction(outUserHandle) == 1;
}