feat(libSceVideoOut): bind horizontal wheel steps with WHEEL:Left and WHEEL:Right #17149

Merged
ycbuzi merged 1 commit from upstream-pr/17149 into main 2026-11-12 01:05:37 +00:00
ycbuzi commented 2026-11-08 11:38:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ycbuzi on 2026-11-08T11:38:29Z.


What

anyps5-input.ini only accepted WHEEL:Up and WHEEL:Down. The wheel handler also returned early on SDL's horizontal scroll (wheel.x), so nothing could bind a tilting wheel's sideways clicks, or any other source of horizontal scrolling, to a pad button.

  • InputBinding gets a wheelTilt (+1 right, -1 left) next to wheelDirection. The parser accepts WHEEL:Left and WHEEL:Right, case-insensitive like the other values, for pad buttons only, as before. Duplicate detection compares the new field too.
  • A sideways step works like a vertical one:
    • It presses the bindings for its direction for WheelPressDurationMs (80 ms) and lets go of the opposite direction.
    • It follows SDL_MOUSEWHEEL_FLIPPED.
    • It doesn't touch vertical bindings, and vertical steps don't touch tilt bindings.
  • Nothing is bound to Left or Right by default, so behaviour without an ini is unchanged.
  • docs/user/INPUT_MAPPING.md lists the two new values, and the browser input mapper offers them.

I'm adding this for the Meta Quest. Meta's Android apps features overview says a 2D app gets the Touch controller thumbstick as scrolling on AXIS_HSCROLL/AXIS_VSCROLL. Termux:X11, which shows a Linux AnyPS5 build there, passes that on as X wheel events, so left and right can't reach a title without horizontal wheel bindings. The change itself is generic.

Tested

Windows 11, MinGW g++ from the winrun toolchain (the build/pr-rint flags and its SDL2), CPU only:

  • pad_keyboard_mouse_tests passes all 32 cases, including the new wheel tilt case:
    • an unbound tilt presses nothing
    • a right tilt presses only Right
    • a vertical step leaves the tilt held
    • the press releases after its duration
    • tilting back releases the first direction
    • a flipped wheel reverses the tilt
  • pad_input_mapping_tests passes, including the new wheelTilt cases:
    • no tilt bindings by default
    • Left, Right and lower-case values parse
    • a repeated line is kept once
    • any pad button accepts a tilt
    • a stick action and an unknown direction are rejected
  • Negative control: the same tests built with origin/main's src/KeyboardMouse.cpp and src/InputMapping.cpp. They fail with a right tilt presses only Right and mouse wheel direction must be UP or DOWN.
  • node --test tools/input-mapper/tests/: 45 of 45 pass.
  • python3 tools/check_conventions.py --base origin/main passes.
  • Overlap: tools/pr_overlap.py fails here while fetching PR heads (fetch-pack: invalid index-pack output). A GraphQL file-list check found #14294 (tools/input-mapper/tests/mapping.test.js) and #16097 (docs/user/INPUT_MAPPING.md), and git merge-tree merges both cleanly.

Not tested: a Linux build, and a title on the Quest. The Quest end-to-end check waits on a controller session in the headset.

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
  • 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
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a. This changes only input mapping in libSceVideoOut and has no Vulkan path; both tests run without a device.
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5210984811 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/17149). Originally posted by [ycbuzi](https://github.com/ycbuzi) on 2026-11-08T11:38:29Z. --- ### What `anyps5-input.ini` only accepted `WHEEL:Up` and `WHEEL:Down`. The wheel handler also returned early on SDL's horizontal scroll (`wheel.x`), so nothing could bind a tilting wheel's sideways clicks, or any other source of horizontal scrolling, to a pad button. - `InputBinding` gets a `wheelTilt` (+1 right, -1 left) next to `wheelDirection`. The parser accepts `WHEEL:Left` and `WHEEL:Right`, case-insensitive like the other values, for pad buttons only, as before. Duplicate detection compares the new field too. - A sideways step works like a vertical one: - It presses the bindings for its direction for `WheelPressDurationMs` (80 ms) and lets go of the opposite direction. - It follows `SDL_MOUSEWHEEL_FLIPPED`. - It doesn't touch vertical bindings, and vertical steps don't touch tilt bindings. - Nothing is bound to Left or Right by default, so behaviour without an ini is unchanged. - `docs/user/INPUT_MAPPING.md` lists the two new values, and the browser input mapper offers them. I'm adding this for the Meta Quest. Meta's [Android apps features overview](https://developers.meta.com/horizon/documentation/android-apps/features-overview/) says a 2D app gets the Touch controller thumbstick as scrolling on `AXIS_HSCROLL`/`AXIS_VSCROLL`. Termux:X11, which shows a Linux AnyPS5 build there, passes that on as X wheel events, so left and right can't reach a title without horizontal wheel bindings. The change itself is generic. ### Tested Windows 11, MinGW g++ from the winrun toolchain (the `build/pr-rint` flags and its SDL2), CPU only: - `pad_keyboard_mouse_tests` passes all 32 cases, including the new `wheel tilt` case: - an unbound tilt presses nothing - a right tilt presses only Right - a vertical step leaves the tilt held - the press releases after its duration - tilting back releases the first direction - a flipped wheel reverses the tilt - `pad_input_mapping_tests` passes, including the new `wheelTilt` cases: - no tilt bindings by default - Left, Right and lower-case values parse - a repeated line is kept once - any pad button accepts a tilt - a stick action and an unknown direction are rejected - Negative control: the same tests built with `origin/main`'s `src/KeyboardMouse.cpp` and `src/InputMapping.cpp`. They fail with `a right tilt presses only Right` and `mouse wheel direction must be UP or DOWN`. - `node --test tools/input-mapper/tests/`: 45 of 45 pass. - `python3 tools/check_conventions.py --base origin/main` passes. - Overlap: `tools/pr_overlap.py` fails here while fetching PR heads (`fetch-pack: invalid index-pack output`). A GraphQL file-list check found #14294 (`tools/input-mapper/tests/mapping.test.js`) and #16097 (`docs/user/INPUT_MAPPING.md`), and `git merge-tree` merges both cleanly. Not tested: a Linux build, and a title on the Quest. The Quest end-to-end check waits on a controller session in the headset. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a. This changes only input mapping in libSceVideoOut and has no Vulkan path; both tests run without a device. - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
coptergui-ops commented 2026-11-08 12:57:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by coptergui-ops on 2026-11-08T12:57:31Z.

Review: APPROVED


Reviewed at current head. Adds wheelTilt (+1 right/-1 left) beside wheelDirection in InputBinding; parser accepts WHEEL:Left/Right case-insensitively (pad buttons only, same as vertical), duplicate detection extended to the new field; KeyboardMouse::HandleEvent now handles wheel.x with SDL_MOUSEWHEEL_FLIPPED applying to both axes, tilt steps press/release with the same 80ms WheelPressDurationMs and never interfere with vertical bindings (and vice versa); nothing bound by default. Tests: parser tests (case-insensitivity, rejection of Sideways, stick-rejection, duplicate line), KeyboardMouse::testWheelTilt via Simulate pins unbound-presses-nothing and direction isolation; docs/user/INPUT_MAPPING.md and tools/input-mapper updated together with the mapping.test.js additions. Body gives a concrete Quest/Termux:X11 motivation and a Windows 11 MinGW test report. No bot pending pairs for this PR (no shared files with other open PRs). Conventions checker: baseline warnings only, no new findings.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5817972056 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/17149#pullrequestreview-5817972056). Originally posted by [coptergui-ops](https://github.com/coptergui-ops) on 2026-11-08T12:57:31Z. **Review:** APPROVED --- Reviewed at current head. Adds wheelTilt (+1 right/-1 left) beside wheelDirection in InputBinding; parser accepts WHEEL:Left/Right case-insensitively (pad buttons only, same as vertical), duplicate detection extended to the new field; KeyboardMouse::HandleEvent now handles wheel.x with SDL_MOUSEWHEEL_FLIPPED applying to both axes, tilt steps press/release with the same 80ms WheelPressDurationMs and never interfere with vertical bindings (and vice versa); nothing bound by default. Tests: parser tests (case-insensitivity, rejection of Sideways, stick-rejection, duplicate line), KeyboardMouse::testWheelTilt via Simulate pins unbound-presses-nothing and direction isolation; docs/user/INPUT_MAPPING.md and tools/input-mapper updated together with the mapping.test.js additions. Body gives a concrete Quest/Termux:X11 motivation and a Windows 11 MinGW test report. No bot pending pairs for this PR (no shared files with other open PRs). Conventions checker: baseline warnings only, no new findings.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!17149
No description provided.