sdlSendAndroidMessage function

bool sdlSendAndroidMessage(
  1. int command,
  2. int param
)

Send a user command to SDLActivity.

Override "boolean onUnhandledMessage(Message msg)" to handle the message.

\param command user command that must be greater or equal to 0x8000. \param param user parameter. \returns true on success or false 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.

extern SDL_DECLSPEC bool SDLCALL SDL_SendAndroidMessage(Uint32 command, int param)

Implementation

bool sdlSendAndroidMessage(int command, int param) {
  final sdlSendAndroidMessageLookupFunction = libSdl3.lookupFunction<
      Uint8 Function(Uint32 command, Int32 param),
      int Function(int command, int param)>('SDL_SendAndroidMessage');
  return sdlSendAndroidMessageLookupFunction(command, param) == 1;
}