implements PLN-0058
Intrepid/Prometeu/Runtime/pipeline/head This commit looks good
Intrepid/Prometeu/Runtime/pipeline/pr-master This commit looks good

This commit is contained in:
2026-05-15 06:55:26 +01:00
parent bfe900797f
commit 4d2ea6400d
19 changed files with 499 additions and 281 deletions
@@ -19,7 +19,7 @@ impl GameRunningStep {
}
pub fn on_update(&mut self, ctx: &mut PrometeuContext) -> Option<FirmwareState> {
let Some(task_state) = ctx.os.task_manager.get(self.task_id).map(|task| task.state) else {
let Some(task_state) = ctx.os.lifecycle().task_state(self.task_id) else {
// TODO: is it panic?
let report =
CrashReport::VmPanic { message: "task is gone, panic!".to_string(), pc: None };
@@ -32,18 +32,18 @@ impl GameRunningStep {
message: "should be running as foreground, panic!".to_string(),
pc: None,
};
let _ = ctx.os.crash_task(self.task_id, Some(&report));
let _ = ctx.os.lifecycle().crash_task(self.task_id, Some(&report));
return Some(FirmwareState::AppCrashes(AppCrashesStep { report }));
}
let result = ctx.os.tick_vm(ctx.vm, ctx.signals, ctx.hw);
let result = ctx.os.vm().tick(ctx.vm, ctx.signals, ctx.hw);
if !ctx.os.vm_runtime.logical_frame_active {
if !ctx.os.vm().logical_frame_active() {
ctx.hw.gfx_mut().present();
}
if let Some(report) = result {
let _ = ctx.os.crash_task(self.task_id, Some(&report));
let _ = ctx.os.lifecycle().crash_task(self.task_id, Some(&report));
return Some(FirmwareState::AppCrashes(AppCrashesStep { report }));
}