Skip to content

feat(input_drivers): Update pointer_input to better handle screen rotation#553

Merged
finger563 merged 3 commits intomainfrom
feat/pointer-input-rotation
Oct 28, 2025
Merged

feat(input_drivers): Update pointer_input to better handle screen rotation#553
finger563 merged 3 commits intomainfrom
feat/pointer-input-rotation

Conversation

@finger563
Copy link
Copy Markdown
Contributor

@finger563 finger563 commented Oct 28, 2025

Description

  • Update input_drivers so that pointer_input better handles pointer input on rotated displays

Motivation and Context

Ensures that if a pointer input is used on a non-square rotated display, such as could happen on the t-deck and in the t-deck/example the pointer is able to reach all parts of the screen and doesn't go off the screen.

How has this been tested?

Running as part of a forthcoming change to the t-deck/example.

Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Hardware (schematic, board, system design) change
  • Software change

Checklist:

  • My change requires a change to the documentation.
  • I have added / updated the documentation related to this change via either README or WIKI

Software

  • I have added tests to cover my changes.
  • I have updated the .github/workflows/build.yml file to add my new test to the automated cloud build github action.
  • All new and existing tests passed.
  • My code follows the code style of this project.

Copilot AI review requested due to automatic review settings October 28, 2025 13:49
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the pointer_input component to properly handle screen rotation by dynamically adjusting cursor boundary clamping based on the current display rotation. Instead of using fixed screen dimensions, the code now queries the display rotation at runtime and adjusts the clamp boundaries accordingly to ensure the cursor remains visible within screen bounds regardless of orientation.

Key Changes

  • Replaced static screen size member variables with runtime display queries
  • Added rotation-aware cursor boundary clamping logic with rotation-specific adjustments
  • Removed initialization of screen size variables from the initialization method

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@finger563 finger563 self-assigned this Oct 28, 2025
@github-actions
Copy link
Copy Markdown

✅Static analysis result - no issues found! ✅

@finger563 finger563 merged commit 188d261 into main Oct 28, 2025
98 of 100 checks passed
@finger563 finger563 deleted the feat/pointer-input-rotation branch October 28, 2025 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants