Skip to content

fix: cursor draw in fullscreen — guard unregistered mouse pointers - #9

Merged
LLThreasher merged 1 commit into
dev/metalfrom
fix/full_screen_cursor_draw
Aug 14, 2026
Merged

fix: cursor draw in fullscreen — guard unregistered mouse pointers#9
LLThreasher merged 1 commit into
dev/metalfrom
fix/full_screen_cursor_draw

Conversation

@LLThreasher

Copy link
Copy Markdown
Owner

Cursor drawing in fullscreen was misbehaving because mouse events for unregistered pointer ids could index out of bounds.

Changes

  • RawInputStream::SetMouseButton / SetMouseDelta / SetMousePosition: early-return when FindMouse returns MaxMousePtrCount (id not registered) instead of writing past the end of the pointer arrays.
  • SceneView: initialise the m_cursors array to entt::null in the constructor; add OGE_ASSERT bounds checks on e.mouse.ptrIdx() before updating cursor sprites on mouse-button down/up; silence per-frame cursor add/remove/down/up log spam.

Stacked on #6 (Metal graphics backend).

🤖 Generated with Claude Code

@LLThreasher
LLThreasher merged commit 163c020 into dev/metal Aug 14, 2026
@LLThreasher
LLThreasher deleted the fix/full_screen_cursor_draw branch August 14, 2026 14:05
LLThreasher added a commit that referenced this pull request Aug 15, 2026
LLThreasher added a commit that referenced this pull request Aug 15, 2026
…LAUDE.md contract, plan status block

Co-Authored-By: Claude <noreply@anthropic.com>
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.

1 participant