fix(videoout): preserve relative mouse mode for ToggleMouse #6195
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/6195"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by hossiendehghan989 on 2026-10-15T01:46:14Z.
What
Fixes #6147 by keeping SDL relative mouse mode owned by ToggleMouse instead of releasing it on every presentation-loop iteration.
Why
VideoOutDriver calls MouseInput::UpdateCapture(!padInput.MouseModeEnabled()) every frame. When ToggleMouse is enabled, allowed is false; the previous implementation interpreted that as a request to disable SDL relative mode. That made the cursor visible and limited camera movement to the window or screen edges.
When capture is not allowed, MouseInput now clears its guest-mouse capture bookkeeping but leaves SDL relative mode untouched. PadInput::setMouseMode(false) remains the owner of disabling relative mode when the toggle is turned off. The normal guest-mouse capture path is unchanged.
Tested
python3 tools/check_conventions.py --base upstream/main
git diff --check
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON
cmake --build build --target video_out_mouse_tests --parallel 2
ctest --test-dir build -R '^video_out_mouse$' --output-on-failure
Result: 1/1 test passed.
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
No third-party code added
Generic behavior, not title-specific
Depends on: none
Unblocks: none
GPUs tested: n/a
AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T01:52:05Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)core/libs/prx/libSceVideoOut/tests/MouseInput.cppL70Imported from boykopovar/AnyPS5. Originally posted by hossiendehghan989 on 2026-10-15T02:11:20Z.
This PR overlaps with #6153 in both the implementation and regression test. The current branch has passing checks, but I’m happy to rebase, consolidate, or defer to whichever implementation the maintainers prefer.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T04:25:06Z.
I confirmed the current checks: the latest conventions run passes (an earlier run failed), and the other hosted checks pass; the platform build jobs are skipped. This PR and #6153 implement the same relative-mouse-mode handoff and update the same regression test. Please coordinate with #6153’s author on which PR should proceed or whether to consolidate; I am not recommending which one to close.
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-17T00:10:24Z.
Closing in favour of #6153, which makes the same
UpdateCapturechange and whose test also checks that the guest capture comes back after mouse-to-stick mode, with a Linux run failing on main and passing with it. Thanks for offering to defer.Pull request closed