SDL_JoystickGetHat(3)

SDL_JoystickGetHat3

Get the current state of a joystick hat

Usage

#include "SDL.h"

Uint8 SDL_JoystickGetHat(SDL_Joystick *joystick, int hat);

Overview

SDL_JoystickGetHat returns the current state of the given hat on the given joystick.

Return value

The current state is returned as a Uint8 which is defined as an OR'd combination of one or more of the following

SDL_HAT_CENTERED

SDL_HAT_UP

SDL_HAT_RIGHT

SDL_HAT_DOWN

SDL_HAT_LEFT

SDL_HAT_RIGHTUP

SDL_HAT_RIGHTDOWN

SDL_HAT_LEFTUP

SDL_HAT_LEFTDOWN

Releases

11 releases since Debian 3.0 (Woody); the text changed 1 time.

  1. 3.0–5.0
  2. 6.0–12

From libsdl1.2-dev 1.2.15+dfsg2-8 in Debian 12 (Bookworm). Parsed by carta from the page's man source.