mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-21 21:05:56 +00:00
Add a stick dead zone setting for drifting gamepads
stick_deadzone (0 to 50 percent, default 8) replaces the fixed per-axis cutoff of 2500. The zone is round and the travel past it is scaled to start at 0, so a drifting stick rests centred and full deflection still reaches full. The Controls tab shows it as a slider; --probe-cfg checks the math (input_pad_stick). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
fb06577c23
commit
ed1973a68b
10 files changed
+57
-11
No files matched your search
@@ -91,6 +91,10 @@ void input_map_stick(const uint8_t down[KEY_COUNT], int stick, int32_t out[2]);
|
||||
// Mouse motion in raw counts over dt_s seconds to right-stick deflection: full deflection at 3000 / sens counts/s.
|
||||
// Clamped to the unit circle, up (negative dy) is +y.
|
||||
void input_mouse_stick(int32_t dx, int32_t dy, double dt_s, float sens, int32_t out[2]);
|
||||
// A gamepad stick (x, y in -32768..32767, up is +y) through a round dead zone of `dead` (fraction of full deflection,
|
||||
// 0..0.5): inside the circle the stick reads 0, and the rest of the travel is scaled to start at 0 at the edge, so a
|
||||
// drifting stick rests at 0 and full deflection still reaches full. The result stays inside the unit square.
|
||||
void input_pad_stick(int32_t x, int32_t y, float dead, int32_t out[2]);
|
||||
|
||||
// ---- the remapping rows' edits, on a copy of input_map. Pure.
|
||||
// action's keys (table order) / its gamepad buttons in layout, at most max; returns how many.
|
||||
|
||||
Reference in new issue
Block a user