Files
psxrecomp/runtime/include/mod_controller_source.h
T
Beman 986348858c Backport unified controller and mouse input to release runtime
Select the offline controller-source dependency and unified resolver on
c18a055312. Preserve release switching,
capture/release, Escape handling, routing, lifecycle and eligibility guards.

Source attribution: controller-source reconstruction from
5a1264b79b69b5d75f7b8507e305b1e13a911a50; unified delta
6f9bdd94f2 and documentation
c3dc3465d6. Omit duplicated mouse commits
and unrelated master changes. Initial private matrix: 32 executions passed.

Co-authored-by: Yves <calibratedbeats@gmail.com>
2026-10-08 08:50:11 +10:00

20 lines
848 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);
#ifdef __cplusplus
}
#endif