mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-28 10:59:16 -04:00
986348858c
Select the offline controller-source dependency and unified resolver onc18a055312. Preserve release switching, capture/release, Escape handling, routing, lifecycle and eligibility guards. Source attribution: controller-source reconstruction from 5a1264b79b69b5d75f7b8507e305b1e13a911a50; unified delta6f9bdd94f2and documentationc3dc3465d6. Omit duplicated mouse commits and unrelated master changes. Initial private matrix: 32 executions passed. Co-authored-by: Yves <calibratedbeats@gmail.com>
20 lines
848 B
C
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
|