|
102 Patches: Detours to the Rescue
C reference for DttR maintainers and modders.
|
#include <SDL3/SDL.h>#include <dttr_pcdogs.h>#include <stdint.h>#include <string.h>#include <windows.h>#include <dttr_config.h>#include <dttr_log.h>#include "hooks_private.h"#include "inputs_private.h"#include "sidecar_private.h"Go to the source code of this file.
Data Structures | |
| struct | di_joy_state |
Macros | |
| #define | DINPUT_POV_CENTERED 0xFFFFFFFF |
| #define | DINPUT_BUTTON_PRESSED 0x80 |
Enumerations | |
| enum | { DTTR_DINPUT_AXIS_SCALE = 32 , DTTR_DINPUT_AXIS_FULL_DEFLECTION = 1000 } |
Functions | |
| static void | init_poll_state (di_joy_state *state) |
| static void | apply_direction_state (di_joy_state *state, bool dir_up, bool dir_down, bool dir_left, bool dir_right) |
| static bool | is_source_pressed (int source) |
| static LONG | read_axis (int axis_idx) |
| void * | dttr_inputs_hook_dinput_poll_callback (void *device) |
| #define DINPUT_BUTTON_PRESSED 0x80 |
Definition at line 33 of file hook_dinput_poll.c.
Referenced by dttr_inputs_hook_dinput_poll_callback().
| #define DINPUT_POV_CENTERED 0xFFFFFFFF |
Definition at line 31 of file hook_dinput_poll.c.
Referenced by init_poll_state().
| anonymous enum |
| Enumerator | |
|---|---|
| DTTR_DINPUT_AXIS_SCALE | |
| DTTR_DINPUT_AXIS_FULL_DEFLECTION | |
Definition at line 26 of file hook_dinput_poll.c.
|
static |
Definition at line 43 of file hook_dinput_poll.c.
References DTTR_DINPUT_AXIS_FULL_DEFLECTION, and state.
Referenced by dttr_inputs_hook_dinput_poll_callback().
Definition at line 98 of file hook_dinput_poll.c.
References apply_direction_state(), DINPUT_BUTTON_PRESSED, dttr_config, DTTR_GAMEPAD_AXIS_IDX_CAMERA_RZ, DTTR_GAMEPAD_AXIS_IDX_STICK_X, DTTR_GAMEPAD_AXIS_IDX_STICK_Y, DTTR_GAMEPAD_MAPPING_NONE, DTTR_GAMEPAD_SOURCE_COUNT, dttr_inputs_gamepad, DTTR_LOG_ERROR, DTTR_PCDOGS_F_Mem_MallocCRT, DTTR_ResultOK(), dttr_sidecar_result_detail(), dttr_sidecar_runtime_context(), init_poll_state(), is_source_pressed(), NULL, PCDOGS_GAMEPAD_IDX_BTN_0, PCDOGS_GAMEPAD_IDX_BTN_12, PCDOGS_GAMEPAD_IDX_DOWN, PCDOGS_GAMEPAD_IDX_LEFT, PCDOGS_GAMEPAD_IDX_RIGHT, PCDOGS_GAMEPAD_IDX_UP, read_axis(), src, and state.
Referenced by dttr_inputs_hooks_init().
|
static |
Definition at line 35 of file hook_dinput_poll.c.
References DINPUT_POV_CENTERED, and state.
Referenced by dttr_inputs_hook_dinput_poll_callback().
|
static |
Definition at line 67 of file hook_dinput_poll.c.
References DTTR_DINPUT_AXIS_SCALE, DTTR_GAMEPAD_SOURCE_TRIGGER_LEFT, DTTR_GAMEPAD_SOURCE_TRIGGER_RIGHT, DTTR_GAMEPAD_TRIGGER_THRESHOLD, dttr_inputs_gamepad, and source.
Referenced by dttr_inputs_hook_dinput_poll_callback().
|
static |
Definition at line 84 of file hook_dinput_poll.c.
References dttr_config, DTTR_DINPUT_AXIS_SCALE, DTTR_GAMEPAD_MAPPING_NONE, and dttr_inputs_gamepad.
Referenced by dttr_inputs_hook_dinput_poll_callback().