changed variable name to state (versus intent)

This commit is contained in:
Shaun Inman 2023-03-07 20:24:18 -05:00
parent ebff426e29
commit e0a6a9f5ee

View file

@ -1321,7 +1321,7 @@ void POW_warn(int enable) {
void POW_update(int* _dirty, int* _show_setting, POW_callback_t before_sleep, POW_callback_t after_sleep) {
int dirty = _dirty ? *_dirty : 0;
int show_setting = _show_setting ? *_show_setting : 0;
int ignore_menu = GetHDMI();
int has_hdmi = GetHDMI();
static uint32_t cancel_start = 0;
static uint32_t power_start = 0;
@ -1382,10 +1382,10 @@ void POW_update(int* _dirty, int* _show_setting, POW_callback_t before_sleep, PO
}
#define MENU_DELAY 250 // also in PAD_tappedMenu()
if (PAD_justRepeated(BTN_PLUS) || PAD_justRepeated(BTN_MINUS) || (PAD_isPressed(BTN_MENU) && now-menu_start>=MENU_DELAY && !ignore_menu)) {
if (PAD_justRepeated(BTN_PLUS) || PAD_justRepeated(BTN_MINUS) || (PAD_isPressed(BTN_MENU) && now-menu_start>=MENU_DELAY && !has_hdmi)) {
setting_start = now;
if (PAD_isPressed(BTN_MENU)) {
if (!ignore_menu) show_setting = 1;
if (!has_hdmi) show_setting = 1;
}
else {
show_setting = 2;