mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-20 02:47:02 +02:00
3c62359e05
* Pad: report the adaptive trigger state instead of always 0 scePadGetTriggerEffectState returned 0 for both triggers. Games that wait for the state of the trigger effect they set before acting on L2/R2 never saw it change; in Astro Bot, L2/R2 actions such as punches did nothing in some levels. The state now follows from the game's last effect per trigger (already kept for the DualSense output) and the trigger's travel, 0..255 over the effect's ten positions: feedback no force / pushing, weapon not / almost / fully pressed, vibration not firing / firing, with the values 1..7 that duaLib (WujekFoliarz/duaLib) reads from a DualSense input report. SDL does not expose that report, so this is an approximation; it also works with other pads and the keyboard, where a digital L2/R2 is full travel. The trigger intensity setting changes only the output, not the reported state. Tested in Astro Bot (PPSA21567 1.018) by a player in the levels where the triggers did nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * tests: controller_settings covers scePadGetTriggerEffectState Feedback, weapon and vibration states across the trigger travel, a trigger without an effect, a masked update keeping the other trigger's effect, and the intensity setting leaving the reported state unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Pad: a feedback trigger reports pushing only while it is pressed A feedback effect from position 0 reported FEEDBACK_IS_PUSHING on an untouched trigger, so a game waiting for the change from no force to pushing never saw it. In Astro's Playroom the gacha capsules did not break on R2. Feedback states (modes 1, 4, 5) now need some travel (>= 8 of 255). Tested in Astro's Playroom (PPSA01325): the capsules break on R2 again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Pad: a vibration trigger reports firing only while it is pressed A vibration effect from position 0 reported VIBRATION_IS_FIRING on an untouched trigger; in Astro's Playroom the gun fired by itself. Vibration states (modes 3 and 6) now need some travel, as the feedback states do. Tested in Astro's Playroom. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Pad: reject invalid handles in scePadGetTriggerEffectState; test the remaining effect modes scePadGetTriggerEffectState ignored its handle and returned pad 1's state for any handle. It now returns SCE_PAD_ERROR_INVALID_HANDLE (0x80920003) for handles other than 1, like the other pad queries in libPad.cpp and duaLib. controller_settings now also covers multiple-position feedback (mode 4: pushes only at positions with a strength), slope feedback (mode 5: pushes from its start position, not on an untouched trigger) and multiple-position vibration (mode 6: fires only at positions with an amplitude and a frequency). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Pad: scePadGetTriggerEffectState returns libScePad's invalid-argument code A null state returned 0x80960005, which is SCE_USER_SERVICE_ERROR_INVALID_ARGUMENT, not a pad error; libScePad's code is SCE_PAD_ERROR_INVALID_ARG (0x80920001), as scePadSetTriggerEffect returns. The call now lives with the other pad calls in controller.cpp so controller_settings tests its handle and argument checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Pad: correct trigger effect state reporting --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: nmzik <Nmzik@mail.ru>