summaryrefslogtreecommitdiff
path: root/src/ui/ui_fsm.cpp
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2024-03-07 11:16:56 +1100
committerjacqueline <me@jacqueline.id.au>2024-03-07 11:16:56 +1100
commiteba5adeb8cc606b4d685132248c6481c0aca53f6 (patch)
treef09d7669cbc5cdf760f520525570e45821d08dee /src/ui/ui_fsm.cpp
parentef72b25660912ff247997089abfb93e9f0b52809 (diff)
downloadtangara-fw-eba5adeb8cc606b4d685132248c6481c0aca53f6.tar.gz
Show the now playing screen after being locked for a while
Diffstat (limited to 'src/ui/ui_fsm.cpp')
-rw-r--r--src/ui/ui_fsm.cpp4
1 files changed, 4 insertions, 0 deletions
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(