Skip to content

Commit

Permalink
Enable more fine-grained control over screen locking handling
Browse files Browse the repository at this point in the history
  • Loading branch information
siy authored and yhql committed Oct 13, 2023
1 parent a49e0a3 commit 8c26807
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
# Rust
/target
Cargo.lock

# Editors
.idea/
.vscode/
4 changes: 2 additions & 2 deletions src/uxapp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ impl UxEvent {

match self {
Self::ValidatePIN => Self::block(),
_ => BOLOS_UX_OK,
_ => unsafe { os_sched_last_status(TASK_BOLOS_UX as u32) as u32 },
}
}

fn block() -> u32 {
pub fn block() -> u32 {
let mut ret = unsafe { os_sched_last_status(TASK_BOLOS_UX as u32) } as u32;
while ret == BOLOS_UX_IGNORE || ret == BOLOS_UX_CONTINUE {
if unsafe { os_sched_is_running(TASK_SUBTASKS_START as u32) } != BOLOS_TRUE as i8 {
Expand Down

0 comments on commit 8c26807

Please sign in to comment.