sdlHasMouse function

bool sdlHasMouse()

Return whether a mouse is currently connected.

\returns true if a mouse is connected, false otherwise.

\threadsafety This function should only be called on the main thread.

\since This function is available since SDL 3.1.3.

\sa SDL_GetMice

extern SDL_DECLSPEC bool SDLCALL SDL_HasMouse(void)

Implementation

bool sdlHasMouse() {
  final sdlHasMouseLookupFunction =
      libSdl3.lookupFunction<Uint8 Function(), int Function()>('SDL_HasMouse');
  return sdlHasMouseLookupFunction() == 1;
}