Repository navigation
feat: hide the pointer and drive the mouse with the controller from the session menu - #145
Conversation
During a session the mouse pointer now disappears after 3 seconds without moving and comes back on the next move, for emulators and games that leave it in the middle of the TV. Windows has no per-app call for this, so the system cursors are swapped for a blank one and reloaded from the user's scheme afterwards; a marker file restores them on the next start if the app dies in between. On by default, with a toggle in both settings screens. The session menu gains "Control the mouse with the controller", for games and emulators whose menus ignore the pad: left stick moves the pointer, right stick scrolls, A clicks, A twice right-clicks and A held drags. It reads XInput and Sony HID (both work without focus), pauses while the menu is open, and lasts until the session ends. The pure parts (stick curve, wheel notches, the A gesture, Sony stick offsets) are covered by unit tests; the hardware checks are in docs/TESTING.md section 1e. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Important
A failed cursor restore can leave the system cursor scheme hidden, and the recovery marker is removed before a later launch can retry.
Reviewed changes This review covers the idle-pointer hider, controller-driven mouse input, their session/settings integration, and associated tests and documentation.
- Idle cursor hiding Replaces system cursors after inactivity during a session and restores the user's scheme when the pointer moves or the session ends.
- Controller mouse mode Adds optional XInput/Sony HID pointer movement, scrolling, and click/drag input while the game has focus.
- Integration and coverage Adds session-menu and settings controls, localization, manual test steps, and pure-logic/report-mapping unit tests.
gpt-6-luna | 𝕏
| // Reloads the user's own scheme (Settings → Mouse pointer), whatever it is. | ||
| if (!SystemParametersInfo(SpiSetCursors, 0, 0, 0)) | ||
| AppLog.Write($"Cursor: não foi possível restaurar os cursores ({Marshal.GetLastWin32Error()})"); | ||
| WriteMarker(false); |
There was a problem hiding this comment.
If SPI_SETCURSORS fails, this still deletes the recovery marker. Because SetSystemCursor may already have replaced some or all system cursors, the next launch then cannot retry restoring the user's scheme; retain the marker unless the restore succeeds.
The side rows have a fixed 74 px height, which cut the two-line hint. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pointer no longer hides by itself after 3 s still. The session menu has a "Hide the mouse pointer" row: on, the pointer stays hidden until it is turned off or the session ends; moving the mouse doesn't bring it back. It turns off the controller mouse and vice versa, since a hidden pointer can't be steered. The Settings and Console interface options for the automatic hiding are gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
ℹ️ No critical issues; one informational documentation mismatch.
Reviewed changes Reviewed the changes since the prior Pullfrog review, focusing on the shift from automatic idle hiding to a manual session-menu toggle and its session lifecycle.
- Made cursor hiding manual Replaced the idle-triggered behavior and persistent setting with a per-session menu toggle.
- Aligned pointer modes Made cursor hiding and controller mouse mode mutually exclusive and reset both when the session ends.
- Updated related guidance Revised the changelogs, manual test checklist, localization, and session-menu layout.
ℹ️ README still describes automatic cursor hiding
The README feature bullets still say the pointer hides when idle, but the incremental changes make hiding an explicit session-menu action with no automatic behavior. This leaves the English and Portuguese feature summaries inconsistent with the shipped behavior.
Technical details
# Update the README feature summaries
## Affected sites
- README.md:52 — claims the pointer is hidden while idle.
- README.pt-BR.md:52 — claims the pointer disappears when idle.
## Required outcome
- Describe cursor hiding as a manual session-menu toggle, consistent with the current behavior.gpt-6-luna | 𝕏
…ontroller-mouse # Conflicts: # src/ConsoleMode/SessionMenuWindow.xaml # tests/ConsoleMode.Tests/ConsoleMode.Tests.csproj

Why
Emulators (and some games) launched from a console session leave the mouse pointer in the middle of the TV, and some of them don't take the controller in their menus at all.
What
"Hide the mouse pointer", a new row in the session menu (live session only)
CursorHiderswaps the system cursors for a blank one (SetSystemCursor) and reloads the user's own scheme afterwards (SPI_SETCURSORS). A marker file in the data folder covers a crash in between: the next start restores the cursors."Control the mouse with the controller", a new row in the session menu (live session only; off again when the session ends)
SonyHidReadernow also keeps both sticks), which both work while the game has the focus. Runs on its own thread withSendInput.The two rows exclude each other: turning one on turns the other off (an invisible pointer can't be steered). The controller-mouse row grows to fit its hint.
Known limits
asInvoker).Tests
ControllerMouseMath.cs: stick curve, pointer accumulation, wheel notches, the A gesture) and forControllerMapping.SonyStickson every report layout.docs/TESTING.md, section 1e.🤖 Generated with Claude Code