26 if (pressed_button == previous_button)
37 if (pressed_button > -1)
40 else if (pressed_button > -1)
99 key_mappings[new_mapping_index] = control_code;
113 if (old_key_mappings)
121 if (old_button_mappings)
155 "\x26\x00\x00\x00\x28\x00\x00\x00\x25\x00\x00\x00\x27\x00\x00\x00\x64\x00\x00\x00\x66\x00\x00"
156 "\x00\x60\x00\x00\x00\x61\x00\x00\x00\x63\x00\x00\x00\x62\x00\x00\x00\x20\x00\x00\x00",
159 "\xe8\x03\x00\x00\xe9\x03\x00\x00\xea\x03\x00\x00\xeb\x03\x00\x00\xf5\x03\x00\x00\xf4\x03\x00"
160 "\x00\xef\x03\x00\x00\xf0\x03\x00\x00\xf2\x03\x00\x00\xee\x03\x00\x00",
171 int32_t bindings[10];
173 {
"Hammerhead FX", {
INPUT_GAMEPAD_UP,
INPUT_GAMEPAD_DOWN,
INPUT_GAMEPAD_LEFT,
INPUT_GAMEPAD_RIGHT,
INPUT_GAMEPAD_BUTTON_7,
INPUT_GAMEPAD_BUTTON_6,
INPUT_GAMEPAD_BUTTON_4,
INPUT_GAMEPAD_BUTTON_3,
INPUT_GAMEPAD_BUTTON_5,
INPUT_GAMEPAD_BUTTON_1}},
174 {
"Microsoft Sidewinder", {
INPUT_GAMEPAD_UP,
INPUT_GAMEPAD_DOWN,
INPUT_GAMEPAD_LEFT,
INPUT_GAMEPAD_RIGHT,
INPUT_GAMEPAD_BUTTON_7,
INPUT_GAMEPAD_BUTTON_6,
INPUT_GAMEPAD_BUTTON_1,
INPUT_GAMEPAD_BUTTON_2,
INPUT_GAMEPAD_BUTTON_4,
INPUT_GAMEPAD_BUTTON_0}},
175 {
"Gravis Gamepad Pro", {
INPUT_GAMEPAD_UP,
INPUT_GAMEPAD_DOWN,
INPUT_GAMEPAD_LEFT,
INPUT_GAMEPAD_RIGHT,
INPUT_GAMEPAD_BUTTON_6,
INPUT_GAMEPAD_BUTTON_5,
INPUT_GAMEPAD_BUTTON_1,
INPUT_GAMEPAD_BUTTON_0,
INPUT_GAMEPAD_BUTTON_2,
INPUT_GAMEPAD_BUTTON_3}},
176 {
"Wingman RumblePad", {
INPUT_GAMEPAD_UP,
INPUT_GAMEPAD_DOWN,
INPUT_GAMEPAD_LEFT,
INPUT_GAMEPAD_RIGHT,
INPUT_GAMEPAD_BUTTON_7,
INPUT_GAMEPAD_BUTTON_6,
INPUT_GAMEPAD_BUTTON_1,
INPUT_GAMEPAD_BUTTON_0,
INPUT_GAMEPAD_BUTTON_2,
INPUT_GAMEPAD_BUTTON_4}},
179 for (
size_t i = 0; i <
sizeof(defaults) /
sizeof(defaults[0]); ++i)
182 memcpy(
g_controllerPresets[i].bindings, defaults[i].bindings,
sizeof(defaults[i].bindings));
190 switch (control_mask)
217 int32_t string_table_index = control_code;
239 int32_t string_table_index = button_code;
void Input_FormatButtonName(int32_t control_code, uint32_t button_mask)
int32_t Input_GetButtonIndex(uint32_t control_mask)
char * Input_GetButtonString(int32_t button_code)
bool Input_CheckCheatCodeSequence()
void Input_InitializeButtonMappings()
void Input_InitializeControllerMappings()
void Input_RegisterButtonMapping(int32_t control_code, uint32_t button_mask)
#define g_player2Controls
#define g_player1Controls
void * CRT_malloc(uint32_t size)
void * CRT_realloc(void *ptr, uint32_t size)
int32_t String_FormatCRTString(char *buffer, char const *format,...)
#define g_cheatCodeSequence
char * String_GetByIndex(int32_t string_id)
#define g_cheatLastPressedButton
#define g_keyboardMappingButtons
#define g_cheatPreviousButton
#define g_keyboardMappingKeys
#define g_cheatSequenceIndex