sdlGetSemaphoreValue function

int sdlGetSemaphoreValue(
  1. Pointer<SdlSemaphore> sem
)

Get the current value of a semaphore.

\param sem the semaphore to query. \returns the current value of the semaphore.

\since This function is available since SDL 3.1.3.

extern SDL_DECLSPEC Uint32 SDLCALL SDL_GetSemaphoreValue(SDL_Semaphore *sem)

Implementation

int sdlGetSemaphoreValue(Pointer<SdlSemaphore> sem) {
  final sdlGetSemaphoreValueLookupFunction = libSdl3.lookupFunction<
      Uint32 Function(Pointer<SdlSemaphore> sem),
      int Function(Pointer<SdlSemaphore> sem)>('SDL_GetSemaphoreValue');
  return sdlGetSemaphoreValueLookupFunction(sem);
}