|
102 Patches: Detours to the Rescue
C reference for DttR maintainers and modders.
|
#include <SDL3/SDL.h>#include <dttr_pcdogs.h>#include "hooks_private.h"#include "inputs_private.h"#include "sidecar_private.h"#include <dttr_config.h>#include <dttr_log.h>Go to the source code of this file.
Functions | |
| static bool | set_joystick_available (int32_t available) |
| static bool | try_open_configured_gamepad () |
| static void | close_gamepad () |
| void | dttr_inputs_init () |
| bool | dttr_inputs_hooks_init (const DTTR_Mods_Context *ctx) |
| void | dttr_inputs_handle_device_event (const SDL_Event *event) |
| bool | dttr_inputs_late_init () |
| void | dttr_inputs_hooks_cleanup (const DTTR_Mods_Context *ctx) |
| void | dttr_inputs_cleanup () |
Variables | |
| SDL_Gamepad * | dttr_inputs_gamepad |
| static DTTR_Core_PatchGroup * | inputs_targets |
|
static |
Definition at line 56 of file inputs.c.
References dttr_inputs_gamepad, NULL, and set_joystick_available().
Referenced by dttr_inputs_cleanup(), and dttr_inputs_handle_device_event().
| void dttr_inputs_cleanup | ( | ) |
Definition at line 172 of file inputs.c.
References close_gamepad().
Referenced by cleanup_runtime().
Definition at line 107 of file inputs.c.
References close_gamepad(), dttr_config, dttr_inputs_gamepad, DTTR_LOG_ERROR, DTTR_LOG_INFO, DTTR_PCDOGS_D_Window_ProcessGameProc_Initialized, DTTR_ResultOK(), dttr_sidecar_result_detail(), event, set_joystick_available(), and try_open_configured_gamepad().
Referenced by dttr_sidecar_handle_sdl_event().
| void dttr_inputs_hooks_cleanup | ( | const DTTR_Mods_Context * | ctx | ) |
Definition at line 168 of file inputs.c.
References ctx, DTTR_Core_PatchGroupRelease(), and inputs_targets.
Referenced by cleanup_runtime().
| bool dttr_inputs_hooks_init | ( | const DTTR_Mods_Context * | ctx | ) |
Definition at line 76 of file inputs.c.
References ctx, DTTR_ARRAY_COUNT, dttr_inputs_hook_dinput_poll_callback(), dttr_inputs_hook_get_async_key_state_callback(), DTTR_LOG_ERROR, DTTR_PCDOGS_D_Video_PlayMovieLoop_GetAsyncKeyStateThunk, DTTR_PCDOGS_F_Mem_MallocCRT, DTTR_PCDOGS_PATCH_SPEC_AOB_REL32_JMP, DTTR_ResultOK(), dttr_sidecar_install_pcdogs_patch_group(), dttr_sidecar_result_detail(), inputs_targets, and NULL.
Referenced by install_required_sidecar_hooks().
| void dttr_inputs_init | ( | ) |
Definition at line 66 of file inputs.c.
References dttr_config, DTTR_LOG_ERROR, and try_open_configured_gamepad().
Referenced by install_required_sidecar_hooks().
| bool dttr_inputs_late_init | ( | ) |
Definition at line 155 of file inputs.c.
References dttr_config, dttr_inputs_gamepad, DTTR_LOG_DEBUG, and set_joystick_available().
Referenced by DTTR_Hook_WinMainCallback().
|
static |
Definition at line 15 of file inputs.c.
References DTTR_LOG_ERROR, DTTR_PCDOGS_D_Input_GetPressedButton_JoystickAvailable, DTTR_ResultOK(), and dttr_sidecar_result_detail().
Referenced by close_gamepad(), dttr_inputs_handle_device_event(), and dttr_inputs_late_init().
|
static |
Definition at line 30 of file inputs.c.
References count, dttr_config, dttr_inputs_gamepad, DTTR_LOG_ERROR, DTTR_LOG_INFO, DTTR_LOG_WARN, and NULL.
Referenced by dttr_inputs_handle_device_event(), and dttr_inputs_init().
| SDL_Gamepad* dttr_inputs_gamepad |
Definition at line 11 of file inputs.c.
Referenced by close_gamepad(), dttr_inputs_handle_device_event(), dttr_inputs_hook_dinput_poll_callback(), dttr_inputs_late_init(), is_source_pressed(), read_axis(), and try_open_configured_gamepad().
|
static |
Definition at line 13 of file inputs.c.
Referenced by dttr_inputs_hooks_cleanup(), and dttr_inputs_hooks_init().