From eba5adeb8cc606b4d685132248c6481c0aca53f6 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Thu, 7 Mar 2024 11:16:56 +1100 Subject: Show the now playing screen after being locked for a while --- src/ui/ui_fsm.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/ui/ui_fsm.cpp') diff --git a/src/ui/ui_fsm.cpp b/src/ui/ui_fsm.cpp index 5c22e90e..1a9f01b4 100644 --- a/src/ui/ui_fsm.cpp +++ b/src/ui/ui_fsm.cpp @@ -280,6 +280,8 @@ lua::Property UiState::sScrollSensitivity{ return true; }}; +lua::Property UiState::sLockSwitch{false}; + lua::Property UiState::sDatabaseUpdating{false}; auto UiState::InitBootSplash(drivers::IGpios& gpios) -> bool { @@ -326,6 +328,7 @@ int UiState::PopScreen() { void UiState::react(const system_fsm::KeyLockChanged& ev) { sDisplay->SetDisplayOn(!ev.locking); sInput->lock(ev.locking); + sLockSwitch.Update(ev.locking); } void UiState::react(const internal::ControlSchemeChanged&) { @@ -516,6 +519,7 @@ void Lua::entry() { { {"scheme", &sControlsScheme}, {"scroll_sensitivity", &sScrollSensitivity}, + {"lock_switch", &sLockSwitch}, }); registry.AddPropertyModule( -- cgit v1.2.3