Skip to content

feat(libScePad): implement scePadResetOrientationForTracker - #951

Open
Thimo188 wants to merge 1 commit into
mainfrom
upstream-pr/23478
Open

Thimo188 wants to merge 1 commit into
mainfrom
upstream-pr/23478

Conversation

@Thimo188

@Thimo188 Thimo188 commented Dec 2, 2026 •

Copy link
Copy Markdown
Owner

Imported from boykopovar/AnyPS5#23478, originally opened by GRG-DA.

Source commit: 9a0911268c154bc9a8161a31332c5a7232b41dee. The import branch preserves this fetched upstream PR snapshot. The description and validation below are copied from upstream; no new code changes or test runs were made for this import. Original reviews, discussions, and attachments remain at the linked upstream PR.


What

Implement scePadResetOrientationForTracker in core/libs/prx/libScePad/Export.cpp by delegating to the already-implemented scePadResetOrientation. The tracker variant takes only a handle and performs the same orientation reset as the plain call, following the in-file scePadSetLightBarForTracker → scePadSetLightBar delegation precedent. This resets the controller's orientation and bias integral through the existing Pad::ResetOrientation path rather than returning a constant. A debt fragment records that a console difference between the two calls is unmeasured.

All other remaining libScePad exports stay throwing. Their semantics are Sony-specific (VR/Lotus/Leonardo/Hunt profiles, firmware-update ioctls, HID feature/output reports, power-saving, telemetry and unidentified NIDs) and cannot be established from a public source; each family's gap is already recorded in docs/dev/debt/libScePad.md. 17 exports are left to the open PRs that already implement them (boykopovar#5038 and boykopovar#14196).

Tested

Windows 11, no title or homebrew. python tools/progress.py --module libScePad: implemented count 55 → 56, todo 167 → 166 (24.77% → 25.23%); global libraries 17227/39548 → 17228/39548. python tools/check_conventions.py --base origin/main: all checks passed. python tools/debt_fold.py --check and git diff --check main...HEAD: clean. g++ -std=c++20 -fsyntax-only -I core/libs core/libs/prx/libScePad/Export.cpp: exit 0. python tools/pr_overlap.py --names on all libScePad stub names: 17 functions claimed by open PRs boykopovar#5038 and boykopovar#14196 were skipped; this function had no overlap. No full native library build (the 3rdparty/SDL2 submodule is not checked out in the worktree) and no GPU tests were run.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt and the licence notice of code adapted from upstream (see AGENTS.md)
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source (none added)
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

Summary by CodeRabbit

  • Bug Fixes

    • Resetting orientation for a tracker now follows the standard orientation-reset behavior, including validation of the controller handle. Invalid handles are handled consistently with other orientation reset requests. This replaces the previous behavior, which did not perform a reset.
  • Documentation

    • Added a note describing the tracker orientation reset behavior and indicating that differences in the console’s tracker path have not yet been measured.

@coderabbitai

coderabbitai Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Changes: Pad orientation reset

Layer / File(s) Summary
Delegate tracker reset to standard reset
core/libs/prx/libScePad/Export.cpp, docs/dev/debt/changes/feat-libpad-tracker-orientation.md
scePadResetOrientationForTracker now returns the result of scePadResetOrientation(handle) instead of reporting the function as unimplemented and returning 0. The documentation describes the expected behavior and its unmeasured tracker-path differences.

Change: Feature

Merge Risk: Minimal · up to 9a091

The tracker orientation reset now uses the existing orientation reset path and returns its result, so invalid handles report errors instead of always succeeding. The risk is minimal; console-specific tracker behavior is documented as unmeasured.

Architecture risk: Low · up to 9a091

The tracker reset moved from an unconditional success response to forwarding the standard reset's handle validation and result.

Changed areas: core, docs

Review details

Systems and components

  • observed — 1 changed file mapped to core.
  • observed — 1 changed file mapped to docs.
Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Usage-based review receipt

  • Mode: Continue automatically
  • Reviewed files: 2
  • Waived: $0.50 (charged $0.00)
  • View usage details

Note

This review exceeded your plan’s limits and used usage-based reviews—free during trial, billed after paid activation unless disabled. Manage usage-based reviews.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 828b0521-4105-46df-bf4f-b3b87d465515
Commits

Reviewing files that changed from the base of the PR and between 4131f51 and 9a09112.

Files selected for processing: 2

  • core/libs/prx/libScePad/Export.cpp
  • docs/dev/debt/changes/feat-libpad-tracker-orientation.md

Limit details: You’ve used all 10 included reviews currently available.

@github-actions

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown

Progress report (4131f51 → 9a09112)

📈 System libraries: 47.94% (+0.0025%, +1 implemented function)

✅ 1 implemented
Library Name
libScePad scePadResetOrientationForTracker

Changed libraries (implemented exports)

Library Before After Change
libScePad 57/222 (25.68%) 58/222 (26.13%) +0.45%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants