Xemu [doxygen]  hyppo 0a42be3a057156924bc1b626a687bd6e27349c45 @ Sat 19 Mar 02:15:11 CET 2022
Macros | Functions
joystick.c File Reference
#include "xep128.h"
#include "joystick.h"
#include "input.h"
#include "dave.h"
#include <SDL.h>
Include dependency graph for joystick.c:

Go to the source code of this file.

Macros

#define MAX_JOYSTICKS   10
 
#define EPJOY_DISABLED   -2
 
#define EPJOY_KP   -1
 
#define BIT_TO_SET(storage, mask)   (storage) |= mask
 
#define BIT_TO_RESET(storage, mask)   (storage) &= (4294967295U - mask)
 
#define AXIS_LIMIT_HIGH   20000
 
#define AXIS_LIMIT_LOW   10000
 

Functions

void joy_sdl_event (SDL_Event *e)
 
int joystick_scan (int num, int dir)
 

Macro Definition Documentation

◆ AXIS_LIMIT_HIGH

#define AXIS_LIMIT_HIGH   20000

Definition at line 64 of file joystick.c.

◆ AXIS_LIMIT_LOW

#define AXIS_LIMIT_LOW   10000

Definition at line 65 of file joystick.c.

◆ BIT_TO_RESET

#define BIT_TO_RESET (   storage,
  mask 
)    (storage) &= (4294967295U - mask)

Definition at line 62 of file joystick.c.

◆ BIT_TO_SET

#define BIT_TO_SET (   storage,
  mask 
)    (storage) |= mask

Definition at line 61 of file joystick.c.

◆ EPJOY_DISABLED

#define EPJOY_DISABLED   -2

Definition at line 28 of file joystick.c.

◆ EPJOY_KP

#define EPJOY_KP   -1

Definition at line 29 of file joystick.c.

◆ MAX_JOYSTICKS

#define MAX_JOYSTICKS   10

Definition at line 27 of file joystick.c.

Function Documentation

◆ joy_sdl_event()

void joy_sdl_event ( SDL_Event *  e)

Definition at line 383 of file joystick.c.

◆ joystick_scan()

int joystick_scan ( int  num,
int  dir 
)

Definition at line 437 of file joystick.c.

Variable Documentation

◆ activated

int activated

Definition at line 55 of file joystick.c.

◆ axisn

Uint32 axisn

Definition at line 45 of file joystick.c.

◆ axisp

Uint32 axisp

Definition at line 44 of file joystick.c.

◆ button

Uint32 button

Definition at line 43 of file joystick.c.

◆ button_masks

Uint32 button_masks[3]

Definition at line 53 of file joystick.c.

◆ cfg_updated

int cfg_updated

Definition at line 49 of file joystick.c.

◆ guid

SDL_JoystickGUID guid

Definition at line 47 of file joystick.c.

◆ guid_str

char guid_str[40]

Definition at line 48 of file joystick.c.

◆ h_axis_mask

Uint32 h_axis_mask

Definition at line 54 of file joystick.c.

◆ haptic

SDL_Haptic* haptic

Definition at line 36 of file joystick.c.

◆ id

int id

Definition at line 52 of file joystick.c.

◆ joy

SDL_Joystick* joy

Definition at line 35 of file joystick.c.

◆ name

const char* name

Definition at line 46 of file joystick.c.

◆ num_of_axes

int num_of_axes

Definition at line 40 of file joystick.c.

◆ num_of_axes_orig

int num_of_axes_orig

Definition at line 41 of file joystick.c.

◆ num_of_buttons

int num_of_buttons

Definition at line 39 of file joystick.c.

◆ num_of_hats

int num_of_hats

Definition at line 42 of file joystick.c.

◆ rumble

int rumble

Definition at line 38 of file joystick.c.

◆ sdl_index

int sdl_index

Definition at line 37 of file joystick.c.

◆ v_axis_mask

Uint32 v_axis_mask

Definition at line 54 of file joystick.c.