feat(runtime): add optional pause and resume lifecycle hooks
Intrepid/Prometeu/Runtime/pipeline/pr-master Build started...
Intrepid/Prometeu/Runtime/pipeline/pr-master Build started...
This commit is contained in:
@@ -27,6 +27,15 @@ impl GameRunningStep {
|
||||
return Some(FirmwareState::AppCrashes(AppCrashesStep { report }));
|
||||
};
|
||||
|
||||
if matches!(task_state, TaskState::Suspended | TaskState::Closed) {
|
||||
ctx.os.vm().transition_render_owner(AppMode::Shell, 0);
|
||||
return Some(match ctx.os.lifecycle().foreground_owner() {
|
||||
prometeu_system::ForegroundOwner::Shell(task_id) => FirmwareState::ShellRunning(
|
||||
crate::firmware::firmware_state::ShellRunningStep::new(task_id),
|
||||
),
|
||||
_ => FirmwareState::HubHome(HubHomeStep),
|
||||
});
|
||||
}
|
||||
if task_state != TaskState::Foreground {
|
||||
// TODO: is it panic?
|
||||
let report = CrashReport::VmPanic {
|
||||
|
||||
Reference in New Issue
Block a user