implements PLN-0150

This commit is contained in:
2026-07-04 19:36:24 +01:00
parent c3d6b70b0c
commit fa2e329d4b
6 changed files with 116 additions and 17 deletions
@@ -40,13 +40,19 @@ impl HubHomeStep {
Some(SystemProfileAction::LaunchGame { path }) => match CartridgeLoader::load(&path) {
Ok(cartridge) => {
if cartridge.app_mode == AppMode::Game
&& ctx.os.lifecycle().resident_game_task().is_some()
&& let Some(resident_task_id) = ctx.os.lifecycle().resident_game_task()
{
if ctx.os.vm().current_app_id() == cartridge.app_id {
let resident_app_id = ctx
.os
.sessions()
.vm_session_for_task(resident_task_id)
.map(|session| session.app_id)
.unwrap_or(0);
if resident_app_id == cartridge.app_id {
return Some(FirmwareState::ResumeResidentGame);
}
let resident_app_id = ctx.os.vm().current_app_id();
ctx.os.log(
LogLevel::Warn,
LogSource::Hub,