sdlMemset4 function

Pointer<NativeType> sdlMemset4(
  1. Pointer<NativeType> dst,
  2. int val,
  3. int dwords
)

Initialize all 32-bit words of buffer of memory to a specific value.

This function will set a buffer of dwords Uint32 values, pointed to by dst, to the value specified in val.

Unlike SDL_memset, this sets 32-bit values, not bytes, so it's not limited to a range of 0-255.

\param dst the destination memory region. Must not be NULL. \param val the Uint32 value to set. \param dwords the number of Uint32 values to set in dst. \returns dst.

\threadsafety It is safe to call this function from any thread.

\since This function is available since SDL 3.1.3.

extern SDL_DECLSPEC void * SDLCALL SDL_memset4(void *dst, Uint32 val, size_t dwords)

Implementation

Pointer<NativeType> sdlMemset4(Pointer<NativeType> dst, int val, int dwords) {
  final sdlMemset4LookupFunction = libSdl3.lookupFunction<
      Pointer<NativeType> Function(
          Pointer<NativeType> dst, Uint32 val, Uint32 dwords),
      Pointer<NativeType> Function(
          Pointer<NativeType> dst, int val, int dwords)>('SDL_memset4');
  return sdlMemset4LookupFunction(dst, val, dwords);
}