implements PLN-0142

This commit is contained in:
2026-07-04 13:20:52 +01:00
parent 5ff273f167
commit d645bbb7bd
7 changed files with 86 additions and 3 deletions
@@ -834,6 +834,11 @@ mod tests {
assert_eq!(render_ownership_after_home.app_mode, AppMode::Shell);
assert_eq!(render_ownership_after_home.app_id, 0);
assert!(render_ownership_after_home.epoch > render_ownership_before_home.epoch);
assert!(firmware.os.lifecycle().pending_game_lifecycle_events().is_empty());
assert_eq!(
firmware.os.vm().delivered_game_lifecycle_events().last().map(|event| event.kind),
Some(GameLifecycleEventKind::Pause)
);
}
#[test]
@@ -874,6 +879,11 @@ mod tests {
assert_eq!(firmware.os.lifecycle().task_state(task_id), Some(TaskState::Foreground));
assert!(!platform.input().pad().any());
assert!(!platform.input().touch().f().down);
assert!(firmware.os.lifecycle().pending_game_lifecycle_events().is_empty());
assert_eq!(
firmware.os.vm().delivered_game_lifecycle_events().last().map(|event| event.kind),
Some(GameLifecycleEventKind::ResumeForeground)
);
}
#[test]
@@ -37,6 +37,8 @@ impl GameRunningStep {
return Some(FirmwareState::AppCrashes(AppCrashesStep { report }));
}
ctx.os.vm().deliver_pending_game_lifecycle_events();
match ctx.os.lifecycle().advance_game_pause_budget(self.task_id) {
Ok(true) => {
ctx.os.vm().transition_render_owner(AppMode::Shell, 0);