diff options
| author | jacqueline <me@jacqueline.id.au> | 2024-03-21 10:50:23 +1100 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2024-03-21 10:50:23 +1100 |
| commit | 684ff50ef4931aeb8cfb15c5a2d62e55520f04a5 (patch) | |
| tree | d7dc003eb1fd7b1a4960cb05d8084f18ddf64b72 /src/ui/ui_fsm.cpp | |
| parent | 21ae6a962623c9128fbb4a599cc50a2c616e9884 (diff) | |
| download | tangara-fw-684ff50ef4931aeb8cfb15c5a2d62e55520f04a5.tar.gz | |
Add support for screens declaring that they can't be popped
Needed as prep for usb msc support; you really shouldn't leave the MSC
settings screen until you've disabled usb msc.
Diffstat (limited to 'src/ui/ui_fsm.cpp')
| -rw-r--r-- | src/ui/ui_fsm.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ui/ui_fsm.cpp b/src/ui/ui_fsm.cpp index 0ed012a0..c11f66a7 100644 --- a/src/ui/ui_fsm.cpp +++ b/src/ui/ui_fsm.cpp @@ -610,6 +610,9 @@ auto Lua::QueuePrevious(lua_State*) -> int { } auto Lua::PopLuaScreen(lua_State* s) -> int { + if (!sCurrentScreen->canPop()) { + return 0; + } PopScreen(); luavgl_set_root(s, sCurrentScreen->content()); lv_group_set_default(sCurrentScreen->group()); |
