Skip to content

Conversation

@nchapman
Copy link
Collaborator

@nchapman nchapman commented Jan 2, 2026

Introduces LESSUI_PLATFORM, LESSUI_VARIANT, and LESSUI_DEVICE environment variables for consistent device identification across shell and C code.

  • Add variant_name field to PlatformVariant struct
  • Export LESSUI_* variables from all 12 platform init.sh scripts
  • Implement config cascade in player: default.cfg → variant-{variant}.cfg → device-{device}.cfg
  • Rename config files from default-{device}.cfg to device-{device}.cfg
  • Update WiFi, HTTP File Server, and Bootlogo paks to use LESSUI_DEVICE
  • Standardize variant names to resolution/aspect descriptors (vga, square, wide, 4x3, fhd, tall)
  • Add miyoomini device configs for small screen (2.8") Native scaling threshold

Closes #103

Introduces LESSUI_PLATFORM, LESSUI_VARIANT, and LESSUI_DEVICE environment
variables for consistent device identification across shell and C code.

- Add variant_name field to PlatformVariant struct
- Export LESSUI_* variables from all 12 platform init.sh scripts
- Implement config cascade in player: default.cfg → variant-{variant}.cfg → device-{device}.cfg
- Rename config files from default-{device}.cfg to device-{device}.cfg
- Update WiFi, HTTP File Server, and Bootlogo paks to use LESSUI_DEVICE
- Standardize variant names to resolution/aspect descriptors (vga, square, wide, 4x3, fhd, tall)
- Add miyoomini device configs for small screen (2.8") Native scaling threshold

Closes #103
Copilot AI review requested due to automatic review settings January 2, 2026 22:13
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 PR introduces a three-tier device identification system to provide more granular device and variant detection across shell scripts and C code. The key changes include:

  • Introduces LESSUI_PLATFORM, LESSUI_VARIANT, and LESSUI_DEVICE environment variables
  • Renames variant constants to aspect-based naming (e.g., VARIANT_TG5040_BRICK → VARIANT_TG5040_4X3, VARIANT_RETROID_MINI_V1 → VARIANT_RETROID_4X3)
  • Adds variant_name field to PlatformVariant struct for consistent variant naming
  • Implements config cascade in player: default.cfg → variant-{variant}.cfg → device-{device}.cfg
  • Renames config files from default-{device}.cfg to device-{device}.cfg throughout
  • Updates WiFi, HTTP File Server, and Bootlogo paks to use LESSUI_DEVICE

Reviewed changes

Copilot reviewed 39 out of 74 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
platform.h/c (tg5040, retroid, miyoomini) Renamed variant constants to aspect-based naming, added variant_name field assignments
rg35xxplus/platform.c Added variant_name field assignment for square/wide/vga variants
player_internal.h Added variant_tag field to Config struct
player.c Implemented Config_appendFile for cascaded config loading, updated to read LESSUI_* variables
LessUI platforms/*/init.sh Export LESSUI_PLATFORM, LESSUI_VARIANT, LESSUI_DEVICE variables
WiFi/Bootlogo paks Updated to use LESSUI_DEVICE instead of DEVICE
Emus configs Renamed default-{device}.cfg to device-{device}.cfg, added new device-specific configs
README.md Comprehensive documentation of new three-tier system and config cascade
platform_variant.h Added variant_name field to PlatformVariant struct
generate-scaling-configs.py Renamed VARIANTS to DEVICES, updated device naming to match LESSUI_DEVICE

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

@nchapman nchapman force-pushed the feature/device-config branch from f494f36 to 47fb723 Compare January 3, 2026 01:42
@nchapman nchapman force-pushed the feature/device-config branch from d137ad4 to a984941 Compare January 3, 2026 01:59
- Update generate-paks.sh to look for device-*.cfg (was still using
  default-*.cfg)
- Fix rg35xxplus platform.c switch statement causing -Werror=switch
@nchapman nchapman merged commit 3b37ac4 into develop Jan 3, 2026
6 checks passed
@nchapman nchapman deleted the feature/device-config branch January 3, 2026 02:48
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.

Device-specific configs missing for miyoomini and rg35xxplus variants

2 participants