|
102 Patches: Detours to the Rescue
C reference for DttR maintainers and modders.
|
#include "hooks_private.h"#include "mss_private.h"#include "sidecar_private.h"#include <dttr_log.h>#include <dttr_pcdogs.h>#include <SDL3/SDL.h>Go to the source code of this file.
Functions | |
| static int32_t | audio_init_system () |
| static int32_t | audio_init_system_detour () |
| static int32_t | audio_stop_all_sounds_detour () |
| static int32_t | audio_init_level_audio_detour () |
| static int32_t | audio_stop_all_samples_detour () |
| static bool | has_playback_devices () |
| static bool | has_audio_driver () |
| static int32_t | run_guarded_audio_hook (int32_t(*original)(), bool stop_all_samples) |
| static void | handle_audio_device_removed () |
| static void | handle_audio_device_added () |
| void | dttr_audio_handle_device_event (const SDL_Event *event) |
| bool | dttr_audio_init (const DTTR_Mods_Context *ctx) |
| void | dttr_audio_cleanup (const DTTR_Mods_Context *) |
|
static |
Definition at line 101 of file hooks.c.
References audio_init_level_audio_original, and run_guarded_audio_hook().
Referenced by dttr_audio_init().
|
static |
Definition at line 81 of file hooks.c.
References audio_init_system_original, DTTR_LOG_ERROR, and has_playback_devices().
Referenced by audio_init_system_detour(), and handle_audio_device_added().
|
static |
Definition at line 91 of file hooks.c.
References audio_init_system().
Referenced by dttr_audio_init().
|
static |
Definition at line 106 of file hooks.c.
References audio_stop_all_samples_original, and run_guarded_audio_hook().
Referenced by dttr_audio_init().
|
static |
Definition at line 96 of file hooks.c.
References audio_stop_all_sounds_original, and run_guarded_audio_hook().
Referenced by dttr_audio_init().
| void dttr_audio_cleanup | ( | const DTTR_Mods_Context * | ctx | ) |
Definition at line 162 of file hooks.c.
References audio_init_level_audio_original, audio_init_system_original, audio_patch_group, audio_stop_all_samples_original, audio_stop_all_sounds_original, DTTR_Core_PatchGroupRelease(), dttr_mss_sdl_release_hooks(), dttr_mss_sdl_shutdown(), and NULL.
Referenced by cleanup_runtime().
Definition at line 111 of file hooks.c.
References event, handle_audio_device_added(), and handle_audio_device_removed().
Referenced by dttr_sidecar_handle_sdl_event().
| bool dttr_audio_init | ( | const DTTR_Mods_Context * | ctx | ) |
Definition at line 125 of file hooks.c.
References audio_init_level_audio_detour(), audio_init_level_audio_original, audio_init_system_detour(), audio_init_system_original, audio_patch_group, audio_stop_all_samples_detour(), audio_stop_all_samples_original, audio_stop_all_sounds_detour(), audio_stop_all_sounds_original, ctx, DTTR_ARRAY_COUNT, DTTR_LOG_ERROR, dttr_mss_sdl_install_hooks(), DTTR_PCDOGS_F_Audio_InitializeLevelAudio, DTTR_PCDOGS_F_Audio_InitializeSystem, DTTR_PCDOGS_F_Audio_StopAllSamples, DTTR_PCDOGS_F_Audio_StopAllSounds, and dttr_sidecar_install_pcdogs_patch_group().
Referenced by install_required_sidecar_hooks().
|
static |
Definition at line 65 of file hooks.c.
References audio_init_system(), DTTR_LOG_ERROR, DTTR_LOG_INFO, and has_audio_driver().
Referenced by dttr_audio_handle_device_event().
|
static |
Definition at line 51 of file hooks.c.
References DTTR_LOG_ERROR, DTTR_PCDOGS_F_Audio_ShutdownSystem, dttr_sidecar_runtime_context(), has_audio_driver(), and has_playback_devices().
Referenced by dttr_audio_handle_device_event().
|
static |
Definition at line 30 of file hooks.c.
References dttr_mss_core_has_driver(), DTTR_PCDOGS_D_Audio_InitializeSystem_DigitalDriver, and NULL.
Referenced by handle_audio_device_added(), handle_audio_device_removed(), and run_guarded_audio_hook().
|
static |
Definition at line 22 of file hooks.c.
References count.
Referenced by audio_init_system(), and handle_audio_device_removed().
|
static |
Definition at line 38 of file hooks.c.
References dttr_mss_sample_stop_all(), and has_audio_driver().
Referenced by audio_init_level_audio_detour(), audio_stop_all_samples_detour(), and audio_stop_all_sounds_detour().
|
static |
Definition at line 11 of file hooks.c.
Referenced by audio_init_level_audio_detour(), dttr_audio_cleanup(), and dttr_audio_init().
|
static |
Definition at line 9 of file hooks.c.
Referenced by audio_init_system(), dttr_audio_cleanup(), and dttr_audio_init().
|
static |
Definition at line 13 of file hooks.c.
Referenced by dttr_audio_cleanup(), and dttr_audio_init().
|
static |
Definition at line 12 of file hooks.c.
Referenced by audio_stop_all_samples_detour(), dttr_audio_cleanup(), and dttr_audio_init().
|
static |
Definition at line 10 of file hooks.c.
Referenced by audio_stop_all_sounds_detour(), dttr_audio_cleanup(), and dttr_audio_init().