Skip to content

themes: only enqueue MMCE decorator art on selection transitions#30

Merged
NathanNeurotic merged 1 commit into
masterfrom
codex/refactor-mmce-game-art-request-initiation
May 1, 2026
Merged

themes: only enqueue MMCE decorator art on selection transitions#30
NathanNeurotic merged 1 commit into
masterfrom
codex/refactor-mmce-game-art-request-initiation

Conversation

@NathanNeurotic
Copy link
Copy Markdown
Owner

Motivation

  • Prevent draw-loop driven MMCE cover request side-effects by separating request initiation from display-time retrieval so IO enqueueing only happens on real selection transitions.
  • Keep existing behavior for non-MMCE modes (USB/HDD/SMB/MX4SIO/Apps/iLink) and avoid changing art naming/path logic.

Description

  • Add lightweight per-items-list selection state to items_list_t in include/themes.h as lastSelectedItemId and lastSelectedStartup[256] to detect selection transitions.
  • In src/themes.c drawItemsList compute mmceSelectionChanged when list->mode == MMCE_MODE and the decorator has a cache by comparing item->item.id and the startup string from list->itemGetStartup(list, item->item.id).
  • For MMCE mode only, call the enqueue-capable path (getGameImageTexture / cacheGetTexture) only when the selection actually changed for the selected row, and otherwise use cacheGetTextureIfReady for display-only retrieval to avoid queuing IO from the draw path.
  • Initialize the new tracking fields in initItemsList so lastSelectedItemId starts as -1 and lastSelectedStartup is empty, and leave non-MMCE retrieval logic unchanged.

Testing

  • Ran make -j2 (project build) which failed in this environment because required language YAML files are missing (lng_src/English.yml, lng_src/Albanian.yml), so a full build verification could not complete.
  • Attempted to build the object with make obj/themes.o which failed due to no matching Makefile rule in this environment, so further compile validation was not possible here.

Codex Task

Separate MMCE items-list decorator cover request initiation from draw-time retrieval. Track selected submenu item ID + startup string in items list state, and only call cacheGetTexture on actual selection changes. Keep draw path display-only via cacheGetTextureIfReady when selection is unchanged. Non-MMCE modes retain existing behavior.
@gemini-code-assist
Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@NathanNeurotic NathanNeurotic merged commit 1b829b7 into master May 1, 2026
32 checks passed
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.

1 participant