|
Xemu [doxygen]
hyppo 0a42be3a057156924bc1b626a687bd6e27349c45 @ Sat 19 Mar 02:15:11 CET 2022
|
Go to the documentation of this file.
18 #ifndef XEMU_COMMON_EMUTOOLS_HID_H_INCLUDED
19 #define XEMU_COMMON_EMUTOOLS_HID_H_INCLUDED
35 #ifdef HID_KBD_MAP_CFG_SUPPORT
36 #define KEYMAP_DEFAULT_FILENAME "@keymap-default.cfg"
37 #define KEYMAP_USER_FILENAME "@keymap.cfg"
38 extern void hid_keymap_from_config_file (
const char *
fn );
45 #define KBD_CLEAR_MATRIX() memset(kbd_matrix, 0xFF, sizeof kbd_matrix)
46 #define KBD_PRESS_KEY(a) kbd_matrix[(a) >> 4] &= ~(1 << ((a) & 0x7))
47 #define KBD_RELEASE_KEY(a) kbd_matrix[(a) >> 4] |= 1 << ((a) & 0x7)
48 #define KBD_SET_KEY(a,state) do { \
58 extern int emu_callback_key (
int pos, SDL_Scancode key,
int pressed,
int handled ) ;
71 #define HID_CB_LEVEL_CORE 0
72 #define HID_CB_LEVEL_CONSOLE 1
73 #define HID_CB_LEVEL_EMU 2
100 #define XEMU_EVENT_EXIT 0x100
101 #define XEMU_EVENT_FAKE_JOY_UP 0x101
102 #define XEMU_EVENT_FAKE_JOY_DOWN 0x102
103 #define XEMU_EVENT_FAKE_JOY_LEFT 0x103
104 #define XEMU_EVENT_FAKE_JOY_RIGHT 0x104
105 #define XEMU_EVENT_FAKE_JOY_FIRE 0x105
106 #define XEMU_EVENT_TOGGLE_FULLSCREEN 0x106
108 #define STD_XEMU_SPECIAL_KEYS \
109 { SDL_SCANCODE_F9, XEMU_EVENT_EXIT, "XEMU-EXIT" }, \
110 { SDL_SCANCODE_F11, XEMU_EVENT_TOGGLE_FULLSCREEN, "XEMU-FULLSCREEN" }, \
111 { SDL_SCANCODE_KP_5, XEMU_EVENT_FAKE_JOY_FIRE, "XEMU-JOY-FIRE" }, \
112 { SDL_SCANCODE_KP_0, XEMU_EVENT_FAKE_JOY_FIRE, "XEMU-JOY-FIRE" }, \
113 { SDL_SCANCODE_RCTRL, XEMU_EVENT_FAKE_JOY_FIRE, "XEMU-JOY-FIRE" }, \
114 { SDL_SCANCODE_KP_8, XEMU_EVENT_FAKE_JOY_UP, "XEMU-JOY-UP" }, \
115 { SDL_SCANCODE_KP_2, XEMU_EVENT_FAKE_JOY_DOWN, "XEMU-JOY-DOWN" }, \
116 { SDL_SCANCODE_KP_4, XEMU_EVENT_FAKE_JOY_LEFT, "XEMU-JOY-LEFT" }, \
117 { SDL_SCANCODE_KP_6, XEMU_EVENT_FAKE_JOY_RIGHT, "XEMU-JOY-RIGHT" }
119 #if defined(CONFIG_KBD_ALSO_TEXTEDITING_SDL_CALLBACK) || defined(CONFIG_KBD_ALSO_TEXTINPUT_SDL_CALLBACK) || defined(CONFIG_KBD_ALSO_RAW_SDL_CALLBACK)
120 #error "Feature request macros CONFIG_KBD_ALSO_TEXTEDITING_SDL_CALLBACK / CONFIG_KBD_ALSO_TEXTINPUT_SDL_CALLBACK / CONFIG_KBD_ALSO_RAW_SDL_CALLBACK has been **REMOVED**, emulator code **MUST** be reworked for the new API!"