window: auto-hide the cursor over the game window #958
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!958
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/958/head"
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?
@Aryansh1520 on GitHub · 2026-10-01 14:27 UTC · original
Aryansh1520:feat/cursor-auto-hide→main· +78 −8 · 8 files · 2 commits · merged 2026-10-03 14:15 UTCCloses #282
Problem
The host cursor stays visible over the game window for the whole session. In games that draw their own cursor (e.g. Blue Prince) there are two pointers on screen, and in every other game the pointer just sits on top of the picture.
Fix
All changes are in
hostInput.cpp, insideHostInputWaitEvent, which is the window loop's single event wait:SDL_TOUCH_MOUSEID/SDL_PEN_MOUSEID) are ignored, and so is zero-delta motion, which some platforms send on focus or cursor visibility changes.SDL_WaitEventTimeoutonly while the cursor is visible. Once it is hidden, the loop goes back to blocking onSDL_WaitEvent, so there are no extra wakeups.HostInputShutdown.This uses only
SDL_HideCursor/SDL_ShowCursor, which SDL3 implements for X11, Wayland, Cocoa and Win32 and which only affect the cursor while it is over the emulator window. There is no platform-specific code.Testing
@coderabbitai[bot] on GitHub · 2026-10-01 14:34 UTC · original
Navigate logical layers of code changes, visualize relationships, and explore their blast radius.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Repository: KytyPS5/KytyPS5/.coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID:
0f5399ed-8a6f-4913-949d-0acdf35c5ccc📥 Commits
Reviewing files that changed from the base of the PR and between
44798085bdand 845783ae85f619c5031d032a059d73785394d27f.📒 Files selected for processing (1)
src/graphics/presentation/window/hostInput.cppIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
📝 Walkthrough
Walkthrough
The input window now hides the cursor at initialization. Qualifying mouse movement, button, or wheel events show it and reset a two-second idle deadline. The cursor hides when that deadline expires, and shutdown clears the deadline and shows the cursor.
Suggested reviewers:
nmzikPriority: ⬇️ Low
Change: Feature · Severity of issue fixed: Low
Merge Risk: ⚪ Minimal · up to
84578The change hides the cursor over the game window and shows it again on real mouse activity. No concrete merge-blocking risk was found. Windows and macOS behavior was not tested by the author.
Security Architecture Review
Security architecture risk: 🔵 Low · up to
84578The change is confined to cursor visibility and event waiting in the existing application window. No expanded input authority was identified, but platform-specific cursor behavior and wait-failure recovery remain incompletely verified.
Retained concerns
No architecture-level concerns identified.
Security review details
Security Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
#282.hostInput.cpphides the cursor at initialization, shows it after real nonzero mouse motion, button, or wheel input, and hides it again after tw…#282. The event-loop timeout and input-event filtering directly support cursor visibility and idle detection. The reported preservation of game input, overlay input, and F7 b…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
Comment
@coderabbitai helpto get the list of available commands.@Nmzik on GitHub · 2026-10-03 14:14 UTC · original
@Aryansh1520 All good. There will be one new option in UI/CLI to auto disable mouse cursor