Skip to content

Conversation

@nchapman
Copy link
Collaborator

@nchapman nchapman commented Dec 3, 2025

This also includes consolidating some common pad code.

Implements a 3-item LRU cache for thumbnails with direction-aware
preloading. When browsing, the next item in the scroll direction is
automatically loaded in the background, making sequential navigation
feel instant.
Copilot AI review requested due to automatic review settings December 3, 2025 01:56
Copy link

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 pull request implements list performance enhancements through two main improvements: (1) consolidating duplicate input handling code into reusable helper functions (PAD_beginPolling, PAD_handleRepeat, PAD_updateButton), and (2) adding thumbnail and text caching systems to the minui file browser to reduce redundant rendering and I/O operations.

Key Changes:

  • Refactored input polling logic across 7+ platform implementations to use shared helper functions, eliminating ~1000 lines of duplicated code
  • Added button repeat acceleration (faster scrolling after 1.5 seconds) and thumbnail/text caching with preloading for smoother list navigation
  • Updated SDL2_Config structure to explicitly define rotation settings (rotate_cw, rotate_null_center) replacing the removed brightness_alpha field

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
workspace/all/common/pad.c Implements new helper functions (PAD_beginPolling, PAD_handleRepeat, PAD_updateButton) and button repeat acceleration with hold tracking
workspace/all/common/pad.h Declares new input polling helpers and adds hold_start tracking array plus acceleration timing constants
workspace/all/common/api.c Updates fallback PLAT_pollInput to use new pad helpers instead of duplicated logic
workspace/all/common/api.h Adds pad.h include and updates PAD_Context to include hold_start array
workspace/all/common/render_sdl2.c Updates rotation logic to use new rotate_cw and rotate_null_center config fields
workspace/all/common/render_sdl2.h Refactors SDL2_Config structure with explicit rotation settings, removes brightness_alpha
workspace/all/minui/minui.c Adds thumbnail cache (LRU with preloading) and text cache (round-robin) systems to optimize list rendering performance
workspace/zero28/platform/platform.c Adopts new pad helpers and adds rotation config (90° CW), updates MENU CPU frequency to 800MHz
workspace/tg5040/platform/platform.c Adopts new pad helpers and adds rotation config (no rotation), updates MENU CPU frequency to 800MHz
workspace/rgb30/platform/platform.c Adopts new pad helpers and adds rotation config (no rotation), updates MENU CPU frequency to 800MHz
workspace/rg35xxplus/platform/platform.c Adopts new pad helpers and adds rotation config (270° CCW), eliminates ~150 lines of duplicate input code
workspace/my355/platform/platform.c Adopts new pad helpers and adds rotation config (270° CCW), updates MENU CPU frequency to 800MHz
workspace/my282/platform/platform.c Adopts new pad helpers and adds rotation config (270° CCW)
workspace/magicmini/platform/platform.c Adopts new pad helpers, adds rotation config (270° CCW with NULL center), removes duplicate updateButton function
workspace/m17/platform/platform.c Adopts new pad helpers and removes duplicate input handling logic
tests/unit/all/common/test_api_pad.c Adds comprehensive unit tests for all three new pad helper functions

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

@nchapman nchapman force-pushed the feature/more-list-improvements branch from 189798f to 37dcb81 Compare December 3, 2025 02:22
@nchapman nchapman merged commit 3a7a1e7 into develop Dec 3, 2025
4 checks passed
@nchapman nchapman deleted the feature/more-list-improvements branch December 3, 2025 02:26
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.

2 participants