Files
psxrecomp/runtime/include/mod_controller_source.h
T
Matthew Stanley fedb5319d2 Support scoped modern controls and replay controller presence
Keep temporary keyboard profiles separate from saved bindings. Add optional persistent mouse capture with ordered release/focus/reset handling, and let offline sources represent an unplugged port without falling back to physical input. Existing capture and source defaults remain intact. Beads: beads-9wg8 and beads-eio.19.18.
2026-10-17 09:19:31 -07:00

21 lines
902 B
C

#pragma once
#include "mod_plugins.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Main (emulation) thread only; sources are not sampled in headless mode or
* netplay. begin_frame() starts a new frame: the first sample() per player
* invokes the callback, later ones in the same frame reuse its result.
* reset() detaches all sources but leaves a neutral release pending for each
* port that had one. sample() returns 1 with *released=1 for that release
* frame (source gone; the caller restores the port's real SIO state), 0 when
* the port has no source and no release pending. */
void mod_controller_source_reset(void);
void mod_controller_source_begin_frame(void);
int mod_controller_source_sample(uint32_t player, PSXModControllerState *state, int *released);
int mod_controller_source_present(uint32_t player);
int mod_controller_source_connected(uint32_t player);
#ifdef __cplusplus
}
#endif