pad: report trigger effects without force as off #2523

Manually merged
github merged 2 commits from gh-pr/2523/head into gh-pr/2523/base 2026-11-26 10:21:57 +00:00
Owner

@⁠Nawid3333 on GitHub · 2026-11-22 22:52 UTC · original
Nawid3333:fix/forceless-trigger-effect-state → main · +26 −16 · 2 files · 2 commits · merged 2026-11-23 14:18 UTC

Cronos: The New Dawn (PPSA24096) cannot aim or shoot (#2083). At the first weapon prompt ("Hold L2 to aim at the hinge and press R2 to shoot") neither trigger does anything, although both reach the game at full travel (scePadReadState gives l2/r2 = 255 with the L2/R2 button bits).

The game sets L2 to a feedback effect (position 0, strength 0) and R2 to a weapon effect (start 2, end 3, strength 0) every frame and polls scePadGetTriggerEffectState. trigger_effect_to_dualsense already sends both to the DualSense as the off effect (0x05), since they have no force, but TriggerEffectState still reported feedback standby (1) for L2 and the weapon states 3-5 for R2. duaLib, where #1132 took the state values from, also encodes feedback and weapon effects with strength 0 (and a vibration without amplitude or frequency) as Off, and a DualSense running Off reports no effect state.

Change

  • TriggerEffectState reports off when trigger_effect_to_dualsense encodes the command as the off effect, so the reported state follows the effect the controller runs. The off value 0x05 gets a name, DUALSENSE_TRIGGER_OFF.
  • After that check the strength and frequency conditions of the feedback, vibration and multiple-position vibration states can no longer be false, so they are removed.
  • Effects with force keep their states as before (the #1132 cases).

Tests

  • controller_settings_tests: new TestForcelessTriggerEffectsReportOff (the Cronos pair, plus a multiple-position feedback without strength and a vibration without frequency). The existing zero-strength feedback and zero-frequency vibration checks made sure these never report active; they now expect off (four expectations change from 1 or 6 to 0).
  • On main the new tests fail at "zero-strength feedback reported an effect state"; with the change all of controller_settings_tests passes (RX 9070 XT, Windows 11).
  • Fork CI passed for this head on Windows, Linux and macOS: https://github.com/Nawid3333/KytyPS5/actions/runs/45078621323

Game

  • Cronos: The New Dawn (PPSA24096 v01.010), RX 9070 XT, DualSense over Bluetooth. On main a0b083c85 plus logging, L2 stays at state 1 and R2 moves through 3, 4 and 5, and the game neither aims nor shoots. With a local build that reports off for these effects (the same check as this PR, behind a test switch) the game aims with L2 and shoots with R2.
  • Crispy81's log from a logging build on #2083 shows the same effects and states on his PC.

Fixes #2083

If you'd like this done differently, tell me and I'll change it.

Written with Claude Code (AI): it found the cause with logging builds and game runs on my PC, wrote the change and the tests and ran them (Windows 11, RX 9070 XT). I played the test runs and reviewed the diff and this description.

🤖 Generated with Claude Code

**@⁠Nawid3333** on GitHub · 2026-11-22 22:52 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2523) `Nawid3333:fix/forceless-trigger-effect-state` → `main` · +26 −16 · 2 files · 2 commits · merged 2026-11-23 14:18 UTC Cronos: The New Dawn (PPSA24096) cannot aim or shoot (#2083). At the first weapon prompt ("Hold L2 to aim at the hinge and press R2 to shoot") neither trigger does anything, although both reach the game at full travel (`scePadReadState` gives l2/r2 = 255 with the L2/R2 button bits). The game sets L2 to a feedback effect (position 0, strength 0) and R2 to a weapon effect (start 2, end 3, strength 0) every frame and polls `scePadGetTriggerEffectState`. `trigger_effect_to_dualsense` already sends both to the DualSense as the off effect (0x05), since they have no force, but `TriggerEffectState` still reported feedback standby (1) for L2 and the weapon states 3-5 for R2. duaLib, where #1132 took the state values from, also encodes feedback and weapon effects with strength 0 (and a vibration without amplitude or frequency) as Off, and a DualSense running Off reports no effect state. **Change** - `TriggerEffectState` reports off when `trigger_effect_to_dualsense` encodes the command as the off effect, so the reported state follows the effect the controller runs. The off value 0x05 gets a name, `DUALSENSE_TRIGGER_OFF`. - After that check the strength and frequency conditions of the feedback, vibration and multiple-position vibration states can no longer be false, so they are removed. - Effects with force keep their states as before (the #1132 cases). **Tests** - `controller_settings_tests`: new `TestForcelessTriggerEffectsReportOff` (the Cronos pair, plus a multiple-position feedback without strength and a vibration without frequency). The existing zero-strength feedback and zero-frequency vibration checks made sure these never report active; they now expect off (four expectations change from 1 or 6 to 0). - On main the new tests fail at "zero-strength feedback reported an effect state"; with the change all of `controller_settings_tests` passes (RX 9070 XT, Windows 11). - Fork CI passed for this head on Windows, Linux and macOS: https://github.com/Nawid3333/KytyPS5/actions/runs/45078621323 **Game** - Cronos: The New Dawn (PPSA24096 v01.010), RX 9070 XT, DualSense over Bluetooth. On main a0b083c85 plus logging, L2 stays at state 1 and R2 moves through 3, 4 and 5, and the game neither aims nor shoots. With a local build that reports off for these effects (the same check as this PR, behind a test switch) the game aims with L2 and shoots with R2. - Crispy81's log from a logging build on #2083 shows the same effects and states on his PC. Fixes #2083 If you'd like this done differently, tell me and I'll change it. Written with Claude Code (AI): it found the cause with logging builds and game runs on my PC, wrote the change and the tests and ran them (Windows 11, RX 9070 XT). I played the test runs and reviewed the diff and this description. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
A feedback or weapon effect with strength 0, a vibration without amplitude
or frequency and a multiple-position effect without any strength all run on
the DualSense as the off effect, so the controller reports no effect state
for them. Kyty reported feedback standby (1) and the weapon states (3-5).

Cronos: The New Dawn (PPSA24096) sets L2 to feedback and R2 to weapon, both
with strength 0. With states 1 and 3-5 it neither aims nor shoots at the
first prompt; with off it does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:21:56 +00:00
github manually merged commit 1732a9f5fd into gh-pr/2523/base 2026-11-26 10:21:57 +00:00
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-11-22 22:57 UTC · original

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The controller now uses a named constant for the DualSense trigger-off effect. Trigger-state reporting treats encoded off effects and specified zero-force feedback and vibration effects as off. Tests update expected states and add coverage for zero-force trigger configurations.

Suggested reviewers: jetsku, nmzik

Change: Bug fix

Merge Risk: Minimal · up to 439d0

This change makes forceless trigger effects report as off, which matches DualSense behavior and addresses the reported Cronos aiming and shooting problem. No merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "pad: report trigger effects without force as off" matches the main change: TriggerEffectState now reports off for trigger effects that trigger_effect_to_dualsense encodes as the DualSense o…
Description check Passed The description explains the problem (Cronos cannot aim or shoot, issue #2083), the cause (TriggerEffectState reports active or standby states for forceless effects that are sent to the DualSense as o…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "pad: report trigger effects without force as off" matches the main change: TriggerEffectState now reports off for trigger effects that trigger_effect_to_dualsense encodes as the DualSense off effect, including zero-strength feedback/weapon and zero-frequency vibration. The title is specific, concise, and accurate to the changeset and the PR objectives.

Full details: Description check

Explanation

The description explains the problem (Cronos cannot aim or shoot, issue #2083), the cause (TriggerEffectState reports active or standby states for forceless effects that are sent to the DualSense as off), the code change (named DUALSENSE_TRIGGER_OFF constant, off-state check, removal of strength and frequency conditions), the new and updated tests, and the game verification. It is directly related to the changeset.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between a0b083c852 and 439d04353b.

Files selected for processing: 2

  • src/libs/controller.cpp
  • tests/ControllerSettingsTests.cpp

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

**@⁠coderabbitai[bot]** on GitHub · 2026-11-22 22:57 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2523#issuecomment-7087201472) <!-- coderabbit-ai-generated:v1 --> <!-- This is an auto-generated comment: summarize by coderabbit.ai --> <!-- review_stack_entry_start --> <a href="https://app.coderabbit.ai/change-stack/KytyPS5/KytyPS5/pull/2523?scope=ghh_OusAJGA4HG8ljoOV0wJvVx8NmnZIjc2DdjmxOu0xZWA&amp;cs_source=review_comment"><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-stack-buttons-v1/explain-change-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-stack-buttons-v1/explain-change.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-stack-buttons-v1/explain-change.svg" alt="Explain Change →" height="32"></picture></a> <!-- review_stack_entry_end --> <!-- recent_review_status_start --> No actionable comments were generated in the recent review. <!-- recent_review_status_end --> <!-- walkthrough_start --> <details> <summary><strong>Walkthrough</strong></summary> <dl> <dd> <br> The controller now uses a named constant for the DualSense trigger-off effect. Trigger-state reporting treats encoded off effects and specified zero-force feedback and vibration effects as off. Tests update expected states and add coverage for zero-force trigger configurations. **Suggested reviewers:** `jetsku`, `nmzik` </dd> </dl> </details> <!-- walkthrough_end --> <!-- change_assessment_start --> <!-- change_assessment_commit:"439d04353b72fe1de906ec95956a0bf68f545ea4" --> <!-- change_assessment_priority:{"version":1,"urgency":"p2","manual":false} --> **Change:** Bug fix <!-- change_assessment_end --> <details> <summary><strong>Merge Risk:</strong> <strong><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/risk-unassessed-16.svg" width="16" height="16" align="absmiddle" alt=""></picture> Minimal</strong> · up to <code>439d0</code></summary> <dl> <dd> <br> <!-- final_review_risk_start --> <!-- final_review_risk_label **Merge Risk:** **⚪ Minimal** · up to `439d0` --> <!-- final_review_risk_coverage:{"sourceCommitId":"439d04353b72fe1de906ec95956a0bf68f545ea4","coveredCommitId":"439d04353b72fe1de906ec95956a0bf68f545ea4","kind":"reviewed"} --> This change makes forceless trigger effects report as off, which matches DualSense behavior and addresses the reported Cronos aiming and shooting problem. No merge-blocking risk was identified. <!-- final_review_risk_end --> </dd> </dl> </details> <!-- pre_merge_checks_walkthrough_start --> <details> <summary><strong>Pre-merge checks: <sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-passed-14-v2.svg" width="14" height="14" align="middle" alt="Passed" title="Passed"></picture></sup> 4</strong></summary> <dl> <dd> <br> | Check name | Status | Explanation | | :------------------------ | :--------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Title check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | The title "pad: report trigger effects without force as off" matches the main change: TriggerEffectState now reports off for trigger effects that trigger_effect_to_dualsense encodes as the DualSense o… | | Description check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | The description explains the problem (Cronos cannot aim or shoot, issue `#2083`), the cause (TriggerEffectState reports active or standby states for forceless effects that are sent to the DualSense as o… | | Linked Issues check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | Check skipped because no linked issues were found for this pull request. | | Out of Scope Changes check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | Check skipped because no linked issues were found for this pull request. | <details> <summary><strong>Full details: Title check</strong></summary> <dl> <dd> <br> **Explanation** The title "pad: report trigger effects without force as off" matches the main change: TriggerEffectState now reports off for trigger effects that trigger_effect_to_dualsense encodes as the DualSense off effect, including zero-strength feedback/weapon and zero-frequency vibration. The title is specific, concise, and accurate to the changeset and the PR objectives. </dd> </dl> </details> <details> <summary><strong>Full details: Description check</strong></summary> <dl> <dd> <br> **Explanation** The description explains the problem (Cronos cannot aim or shoot, issue `#2083`), the cause (TriggerEffectState reports active or standby states for forceless effects that are sent to the DualSense as off), the code change (named DUALSENSE_TRIGGER_OFF constant, off-state check, removal of strength and frequency conditions), the new and updated tests, and the game verification. It is directly related to the changeset. </dd> </dl> </details> </dd> </dl> </details> <!-- pre_merge_checks_walkthrough_end --> <!-- tips_start --> Thanks for using [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=KytyPS5/KytyPS5&utm_content=2523)! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. <details> <summary><strong>Share</strong></summary> <dl> <dd> <br> - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code) </dd> </dl> </details> <!-- tips_end --> <!-- recent_review_start --> <h6> <details> <summary><strong><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/info.svg" width="12" height="12" align="absmiddle" alt=""></picture> Recent review info</strong></summary> <dl> <dd> <br> <!-- review_info_content --> <details> <summary><strong><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog.svg" width="16" height="16" align="absmiddle" alt=""></picture> Run configuration</strong></summary> <dl> <dd> <br> - **Source mode**: Auto - **Repository**: [KytyPS5/KytyPS5](<https://github.com/KytyPS5/KytyPS5>) - **Branch**: [main](<https://github.com/KytyPS5/KytyPS5/tree/main>) - **File**: [.coderabbit.yaml](<https://github.com/KytyPS5/KytyPS5/blob/a0b083c85293d55a48b4f8774285415c29d78c8b/.coderabbit.yaml>) - **Commit**: [a0b083c](<https://github.com/KytyPS5/KytyPS5/commit/a0b083c85293d55a48b4f8774285415c29d78c8b>) - **Layers**: Repository YAML - **Review profile**: CHILL - **Plan**: Advanced - **Run ID**: `9882eba9-9202-46ad-9493-93a400346a30` </dd> </dl> </details> <details> <summary><strong><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal.svg" width="16" height="16" align="absmiddle" alt=""></picture> Commits</strong></summary> <dl> <dd> <br> Reviewing files that changed from the base of the PR and between a0b083c85293d55a48b4f8774285415c29d78c8b and 439d04353b72fe1de906ec95956a0bf68f545ea4. </dd> </dl> </details> <details> <summary><strong><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-plus-corner-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-plus-corner.svg" width="16" height="16" align="absmiddle" alt=""></picture> Files selected for processing: 2</strong></summary> <dl> <dd> <br> * `src/libs/controller.cpp` * `tests/ControllerSettingsTests.cpp` </dd> </dl> </details> **Included review availability:** This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. </dd> </dl> </details> </h6> <!-- recent_review_end -->
This discussion has been locked. Commenting is limited to contributors.
No description provided.