retro-go icon indicating copy to clipboard operation
retro-go copied to clipboard

Simplify menu by hiding inoperable options

Open tomvanbraeckel opened this issue 1 year ago • 2 comments
trafficstars

Simplify menu by hiding inoperable options, to avoid confusing the users.

On the Fri3D Camp 2022 badge, the backlight is always on, and there is no GPIO LED to show activity, AFAIK. In any case, if a board doesn't have these configured in config.h, then showing a changeable option in the menu for it doesn't make sense.

tomvanbraeckel avatar Jun 29 '24 16:06 tomvanbraeckel

The disk LED change is reasonable and I've pushed a commit to make your RG_GPIO_LED check actually work (it was default defined so your check would always fail).

But the backlight one isn't as straightforward because it isn't necessarily controlled by RG_GPIO_LCD_BCKL, so it's not a 100% good indication of the capability...

ducalex avatar Jun 29 '24 19:06 ducalex

Ah yes, thanks for catching that. I can confirm the disk LED option is gone now, as well as the backlight option. I've added an additional "defined(AW_TFT_BACKLIGHT)" to cover the qtpy-gamer's backlight configuration.

tomvanbraeckel avatar Jun 29 '24 19:06 tomvanbraeckel

I'm not happy with this solution, because future targets might use totally different things to control brightness. In fact, I have unmerged device support that uses /sys/class/backlight/... for example.

I've added a constant. For simplicity we'll assume that if it's undefined or zero it means no backlight, so a short #if RG_SCREEN_BACKLIGHT should correctly fail on both scenarios.

ducalex avatar Jul 01 '24 16:07 ducalex

Alright, pushed it!

tomvanbraeckel avatar Jul 02 '24 06:07 tomvanbraeckel