Files
psxrecomp/overlay_toolchain/include/psx_stick.h
T
Matthew Stanley fe42da2744 Merge release/native-rendering-20261003 into master
Keeps both lines: master's PGXP session, draw-distance clamps, masked rejects
and saturated-winding NCLIP; the release's render-pass kit additions, verified
media/disc extents, timeline/present rings, cull-scale sites. Overlay ABI v30.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-04 19:27:02 -07:00

27 lines
668 B
C

#ifndef PSX_STICK_H
#define PSX_STICK_H
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Convert one SDL stick vector to the two unsigned DualShock axis bytes.
*
* deadzone and anti_deadzone use SDL's 0..32767 radial magnitude scale.
* Values inside deadzone are centred. Outside it, magnitude is remapped from
* anti_deadzone to full travel while direction is preserved. anti_deadzone=0
* is an ordinary rescaled radial deadzone.
*/
void psx_stick_to_dualshock(int16_t x, int16_t y,
int deadzone, int anti_deadzone,
uint8_t *out_x, uint8_t *out_y);
#ifdef __cplusplus
}
#endif
#endif