RetroArch
Macros | Enumerations
input_defines.h File Reference
#include <stdint.h>
#include <string.h>
#include <retro_common_api.h>
Include dependency graph for input_defines.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MAX_USERS   16
 
#define MAX_INPUT_DEVICES   16
 
#define RARCH_MAX_KEYS   137
 
#define RARCH_FIRST_CUSTOM_BIND   16
 
#define RARCH_FIRST_LIGHTGUN_BIND   RARCH_ANALOG_BIND_LIST_END
 
#define RARCH_FIRST_MISC_CUSTOM_BIND   RARCH_LIGHTGUN_BIND_LIST_END
 
#define RARCH_FIRST_META_KEY   RARCH_CUSTOM_BIND_LIST_END
 
#define RARCH_UNMAPPED   1024
 
#define RARCH_DEVICE_MOUSE_SCREEN   (RETRO_DEVICE_MOUSE | 0x10000)
 
#define RARCH_DEVICE_POINTER_SCREEN   (RETRO_DEVICE_POINTER | 0x10000)
 
#define RARCH_DEVICE_ID_POINTER_BACK   (RETRO_DEVICE_ID_POINTER_PRESSED | 0x10000)
 
#define AXIS_NEG(x)   (((uint32_t)(x) << 16) | 0xFFFFU)
 
#define AXIS_POS(x)   ((uint32_t)(x) | 0xFFFF0000UL)
 
#define AXIS_NONE   0xFFFFFFFFUL
 
#define AXIS_DIR_NONE   0xFFFFU
 
#define AXIS_NEG_GET(x)   (((uint32_t)(x) >> 16) & 0xFFFFU)
 
#define AXIS_POS_GET(x)   ((uint32_t)(x) & 0xFFFFU)
 
#define NO_BTN   0xFFFFU
 
#define HAT_UP_SHIFT   15
 
#define HAT_DOWN_SHIFT   14
 
#define HAT_LEFT_SHIFT   13
 
#define HAT_RIGHT_SHIFT   12
 
#define HAT_UP_MASK   (1 << HAT_UP_SHIFT)
 
#define HAT_DOWN_MASK   (1 << HAT_DOWN_SHIFT)
 
#define HAT_LEFT_MASK   (1 << HAT_LEFT_SHIFT)
 
#define HAT_RIGHT_MASK   (1 << HAT_RIGHT_SHIFT)
 
#define HAT_MAP(x, hat)   ((x & ((1 << 12) - 1)) | hat)
 
#define HAT_MASK   (HAT_UP_MASK | HAT_DOWN_MASK | HAT_LEFT_MASK | HAT_RIGHT_MASK)
 
#define GET_HAT_DIR(x)   (x & HAT_MASK)
 
#define GET_HAT(x)   (x & (~HAT_MASK))
 

Enumerations

enum  {
  RARCH_ANALOG_LEFT_X_PLUS = RARCH_FIRST_CUSTOM_BIND, RARCH_ANALOG_LEFT_X_MINUS, RARCH_ANALOG_LEFT_Y_PLUS, RARCH_ANALOG_LEFT_Y_MINUS,
  RARCH_ANALOG_RIGHT_X_PLUS, RARCH_ANALOG_RIGHT_X_MINUS, RARCH_ANALOG_RIGHT_Y_PLUS, RARCH_ANALOG_RIGHT_Y_MINUS,
  RARCH_ANALOG_BIND_LIST_END, RARCH_LIGHTGUN_TRIGGER = RARCH_FIRST_LIGHTGUN_BIND, RARCH_LIGHTGUN_RELOAD, RARCH_LIGHTGUN_AUX_A,
  RARCH_LIGHTGUN_AUX_B, RARCH_LIGHTGUN_AUX_C, RARCH_LIGHTGUN_START, RARCH_LIGHTGUN_SELECT,
  RARCH_LIGHTGUN_DPAD_UP, RARCH_LIGHTGUN_DPAD_DOWN, RARCH_LIGHTGUN_DPAD_LEFT, RARCH_LIGHTGUN_DPAD_RIGHT,
  RARCH_LIGHTGUN_BIND_LIST_END, RARCH_TURBO_ENABLE = RARCH_FIRST_MISC_CUSTOM_BIND, RARCH_CUSTOM_BIND_LIST_END, RARCH_FAST_FORWARD_KEY = RARCH_FIRST_META_KEY,
  RARCH_FAST_FORWARD_HOLD_KEY, RARCH_SLOWMOTION_KEY, RARCH_SLOWMOTION_HOLD_KEY, RARCH_LOAD_STATE_KEY,
  RARCH_SAVE_STATE_KEY, RARCH_FULLSCREEN_TOGGLE_KEY, RARCH_QUIT_KEY, RARCH_STATE_SLOT_PLUS,
  RARCH_STATE_SLOT_MINUS, RARCH_REWIND, RARCH_BSV_RECORD_TOGGLE, RARCH_PAUSE_TOGGLE,
  RARCH_FRAMEADVANCE, RARCH_RESET, RARCH_SHADER_NEXT, RARCH_SHADER_PREV,
  RARCH_CHEAT_INDEX_PLUS, RARCH_CHEAT_INDEX_MINUS, RARCH_CHEAT_TOGGLE, RARCH_SCREENSHOT,
  RARCH_MUTE, RARCH_OSK, RARCH_FPS_TOGGLE, RARCH_NETPLAY_GAME_WATCH,
  RARCH_ENABLE_HOTKEY, RARCH_VOLUME_UP, RARCH_VOLUME_DOWN, RARCH_OVERLAY_NEXT,
  RARCH_DISK_EJECT_TOGGLE, RARCH_DISK_NEXT, RARCH_DISK_PREV, RARCH_GRAB_MOUSE_TOGGLE,
  RARCH_GAME_FOCUS_TOGGLE, RARCH_UI_COMPANION_TOGGLE, RARCH_MENU_TOGGLE, RARCH_RECORDING_TOGGLE,
  RARCH_STREAMING_TOGGLE, RARCH_BIND_LIST_END, RARCH_BIND_LIST_END_NULL
}
 
enum  analog_dpad_mode { ANALOG_DPAD_NONE = 0, ANALOG_DPAD_LSTICK, ANALOG_DPAD_RSTICK, ANALOG_DPAD_LAST }
 

Macro Definition Documentation

◆ AXIS_DIR_NONE

#define AXIS_DIR_NONE   0xFFFFU

◆ AXIS_NEG

#define AXIS_NEG (   x)    (((uint32_t)(x) << 16) | 0xFFFFU)

◆ AXIS_NEG_GET

#define AXIS_NEG_GET (   x)    (((uint32_t)(x) >> 16) & 0xFFFFU)

◆ AXIS_NONE

#define AXIS_NONE   0xFFFFFFFFUL

◆ AXIS_POS

#define AXIS_POS (   x)    ((uint32_t)(x) | 0xFFFF0000UL)

◆ AXIS_POS_GET

#define AXIS_POS_GET (   x)    ((uint32_t)(x) & 0xFFFFU)

◆ GET_HAT

#define GET_HAT (   x)    (x & (~HAT_MASK))

◆ GET_HAT_DIR

#define GET_HAT_DIR (   x)    (x & HAT_MASK)

◆ HAT_DOWN_MASK

#define HAT_DOWN_MASK   (1 << HAT_DOWN_SHIFT)

◆ HAT_DOWN_SHIFT

#define HAT_DOWN_SHIFT   14

◆ HAT_LEFT_MASK

#define HAT_LEFT_MASK   (1 << HAT_LEFT_SHIFT)

◆ HAT_LEFT_SHIFT

#define HAT_LEFT_SHIFT   13

◆ HAT_MAP

#define HAT_MAP (   x,
  hat 
)    ((x & ((1 << 12) - 1)) | hat)

◆ HAT_MASK

#define HAT_MASK   (HAT_UP_MASK | HAT_DOWN_MASK | HAT_LEFT_MASK | HAT_RIGHT_MASK)

◆ HAT_RIGHT_MASK

#define HAT_RIGHT_MASK   (1 << HAT_RIGHT_SHIFT)

◆ HAT_RIGHT_SHIFT

#define HAT_RIGHT_SHIFT   12

◆ HAT_UP_MASK

#define HAT_UP_MASK   (1 << HAT_UP_SHIFT)

◆ HAT_UP_SHIFT

#define HAT_UP_SHIFT   15

◆ MAX_INPUT_DEVICES

#define MAX_INPUT_DEVICES   16

◆ MAX_USERS

#define MAX_USERS   16

◆ NO_BTN

#define NO_BTN   0xFFFFU

◆ RARCH_DEVICE_ID_POINTER_BACK

#define RARCH_DEVICE_ID_POINTER_BACK   (RETRO_DEVICE_ID_POINTER_PRESSED | 0x10000)

◆ RARCH_DEVICE_MOUSE_SCREEN

#define RARCH_DEVICE_MOUSE_SCREEN   (RETRO_DEVICE_MOUSE | 0x10000)

◆ RARCH_DEVICE_POINTER_SCREEN

#define RARCH_DEVICE_POINTER_SCREEN   (RETRO_DEVICE_POINTER | 0x10000)

◆ RARCH_FIRST_CUSTOM_BIND

#define RARCH_FIRST_CUSTOM_BIND   16

◆ RARCH_FIRST_LIGHTGUN_BIND

#define RARCH_FIRST_LIGHTGUN_BIND   RARCH_ANALOG_BIND_LIST_END

◆ RARCH_FIRST_META_KEY

#define RARCH_FIRST_META_KEY   RARCH_CUSTOM_BIND_LIST_END

◆ RARCH_FIRST_MISC_CUSTOM_BIND

#define RARCH_FIRST_MISC_CUSTOM_BIND   RARCH_LIGHTGUN_BIND_LIST_END

◆ RARCH_MAX_KEYS

#define RARCH_MAX_KEYS   137

◆ RARCH_UNMAPPED

#define RARCH_UNMAPPED   1024

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
RARCH_ANALOG_LEFT_X_PLUS 
RARCH_ANALOG_LEFT_X_MINUS 
RARCH_ANALOG_LEFT_Y_PLUS 
RARCH_ANALOG_LEFT_Y_MINUS 
RARCH_ANALOG_RIGHT_X_PLUS 
RARCH_ANALOG_RIGHT_X_MINUS 
RARCH_ANALOG_RIGHT_Y_PLUS 
RARCH_ANALOG_RIGHT_Y_MINUS 
RARCH_ANALOG_BIND_LIST_END 
RARCH_LIGHTGUN_TRIGGER 
RARCH_LIGHTGUN_RELOAD 
RARCH_LIGHTGUN_AUX_A 
RARCH_LIGHTGUN_AUX_B 
RARCH_LIGHTGUN_AUX_C 
RARCH_LIGHTGUN_START 
RARCH_LIGHTGUN_SELECT 
RARCH_LIGHTGUN_DPAD_UP 
RARCH_LIGHTGUN_DPAD_DOWN 
RARCH_LIGHTGUN_DPAD_LEFT 
RARCH_LIGHTGUN_DPAD_RIGHT 
RARCH_LIGHTGUN_BIND_LIST_END 
RARCH_TURBO_ENABLE 
RARCH_CUSTOM_BIND_LIST_END 
RARCH_FAST_FORWARD_KEY 
RARCH_FAST_FORWARD_HOLD_KEY 
RARCH_SLOWMOTION_KEY 
RARCH_SLOWMOTION_HOLD_KEY 
RARCH_LOAD_STATE_KEY 
RARCH_SAVE_STATE_KEY 
RARCH_FULLSCREEN_TOGGLE_KEY 
RARCH_QUIT_KEY 
RARCH_STATE_SLOT_PLUS 
RARCH_STATE_SLOT_MINUS 
RARCH_REWIND 
RARCH_BSV_RECORD_TOGGLE 
RARCH_PAUSE_TOGGLE 
RARCH_FRAMEADVANCE 
RARCH_RESET 
RARCH_SHADER_NEXT 
RARCH_SHADER_PREV 
RARCH_CHEAT_INDEX_PLUS 
RARCH_CHEAT_INDEX_MINUS 
RARCH_CHEAT_TOGGLE 
RARCH_SCREENSHOT 
RARCH_MUTE 
RARCH_OSK 
RARCH_FPS_TOGGLE 
RARCH_NETPLAY_GAME_WATCH 
RARCH_ENABLE_HOTKEY 
RARCH_VOLUME_UP 
RARCH_VOLUME_DOWN 
RARCH_OVERLAY_NEXT 
RARCH_DISK_EJECT_TOGGLE 
RARCH_DISK_NEXT 
RARCH_DISK_PREV 
RARCH_GRAB_MOUSE_TOGGLE 
RARCH_GAME_FOCUS_TOGGLE 
RARCH_UI_COMPANION_TOGGLE 
RARCH_MENU_TOGGLE 
RARCH_RECORDING_TOGGLE 
RARCH_STREAMING_TOGGLE 
RARCH_BIND_LIST_END 
RARCH_BIND_LIST_END_NULL 

◆ analog_dpad_mode

Enumerator
ANALOG_DPAD_NONE 
ANALOG_DPAD_LSTICK 
ANALOG_DPAD_RSTICK 
ANALOG_DPAD_LAST