From 74ef39329471791abfad46a237734f0b055ad819 Mon Sep 17 00:00:00 2001 From: bQUARKz Date: Sat, 16 May 2026 09:53:25 +0100 Subject: [PATCH] minimal fixes for displaying --- .../src/firmware/firmware_step_splash_screen.rs | 2 +- .../console/prometeu-system/src/os/system_os.rs | 4 ++++ .../prometeu-host-desktop-winit/src/runner.rs | 15 +++++++++++---- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/crates/console/prometeu-firmware/src/firmware/firmware_step_splash_screen.rs b/crates/console/prometeu-firmware/src/firmware/firmware_step_splash_screen.rs index 6695a7dd..0ca52730 100644 --- a/crates/console/prometeu-firmware/src/firmware/firmware_step_splash_screen.rs +++ b/crates/console/prometeu-firmware/src/firmware/firmware_step_splash_screen.rs @@ -23,7 +23,7 @@ impl SplashScreenStep { ctx.hw.pad_mut().begin_frame(ctx.signals); // Clear screen - ctx.hw.gfx_mut().clear(Color::BLACK); + ctx.hw.gfx_mut().clear(Color::ORANGE); // Draw expanding square let (sw, sh) = ctx.hw.gfx().size(); diff --git a/crates/console/prometeu-system/src/os/system_os.rs b/crates/console/prometeu-system/src/os/system_os.rs index ed3c05a8..2b4e38ec 100644 --- a/crates/console/prometeu-system/src/os/system_os.rs +++ b/crates/console/prometeu-system/src/os/system_os.rs @@ -99,6 +99,10 @@ impl SystemOS { self.log_service.get_after(seq) } + pub fn frame_index(&mut self) -> u64 { + self.vm().logical_frame_index() + } + pub fn lifecycle(&mut self) -> LifecycleFacade<'_> { LifecycleFacade { os: self } } diff --git a/crates/host/prometeu-host-desktop-winit/src/runner.rs b/crates/host/prometeu-host-desktop-winit/src/runner.rs index 4d2a3b65..2e6a2f2b 100644 --- a/crates/host/prometeu-host-desktop-winit/src/runner.rs +++ b/crates/host/prometeu-host-desktop-winit/src/runner.rs @@ -10,7 +10,7 @@ use pixels::wgpu::PresentMode; use pixels::{Pixels, PixelsBuilder, SurfaceTexture}; use prometeu_drivers::AudioCommand; use prometeu_drivers::hardware::Hardware; -use prometeu_firmware::{BootTarget, Firmware}; +use prometeu_firmware::{BootTarget, Firmware, FirmwareState}; use prometeu_hal::telemetry::CertificationConfig; use std::time::{Duration, Instant}; use winit::application::ApplicationHandler; @@ -198,8 +198,15 @@ impl HostRunner { } fn request_redraw_if_needed(&mut self) { - if self.presentation.should_request_redraw() { - self.request_redraw(); + match self.firmware.state { + FirmwareState::GameRunning(_) => { + if self.presentation.should_request_redraw() { + self.request_redraw(); + } + } + _ => { + self.request_redraw(); + } } } @@ -383,7 +390,7 @@ impl ApplicationHandler for HostRunner { self.stats.record_frame(); } - self.presentation.note_published_frame(self.firmware.os.vm().logical_frame_index()); + self.presentation.note_published_frame(self.firmware.os.frame_index()); if was_debugger_connected != self.debugger.stream.is_some() || was_waiting_for_start != self.debugger.waiting_for_start