Play your Steam library's Windows games on a jailbroken PS5.
C++
Point Update runtime to Recreate bottle after a kit swap
Leonardo Lobato054668246f1a
diff --git a/src/homebrew/simulation.cpp b/src/homebrew/simulation.cppindex b50204a..0936c05 100644--- a/src/homebrew/simulation.cpp+++ b/src/homebrew/simulation.cpp@@ -4002,8 +4002,12 @@ void Simulation::rebuild_view() {item.enabled = stale && runtime->can_prepare && closed && !busy;// While it runs the title is being prepared, no longer "Kit update available".const bool updating = busy && runtime->maintenance == MaintenanceKind::UpdateRuntime;+ // A setup an earlier kit left has no title to update: it is made again.if (!stale && !updating)- item.subtitle = runtime && runtime->status == "No kit" ? "Needs a usable compatibility kit." : "Already up to date.";+ item.subtitle = runtime && runtime->status == "No kit" ? "Needs a usable compatibility kit."+ : runtime && runtime->setup_other_kit+ ? "Setup was started with an earlier kit. Use Recreate bottle to finish it; saves are kept."+ : "Already up to date.";else if (!updating && !closed) item.subtitle = closed_reason;else if (!updating && !runtime->can_prepare && !busy) item.subtitle = "Wait for the game's setup to finish.";} else {diff --git a/tests/homebrew_library_model_test.cpp b/tests/homebrew_library_model_test.cppindex 4c51757..8cbf2c0 100644--- a/tests/homebrew_library_model_test.cpp+++ b/tests/homebrew_library_model_test.cpp@@ -2637,6 +2637,20 @@ void live_setup_from_an_earlier_kit_offers_recreate() {check(model.TakeMaintenanceRequests() == Requests{{SteamId(34), MaintenanceKind::RecreateBottle}},"the game page's Recreate bottle asks for the same");check(find_row(model, "details-play") && !find_row(model, "details-play")->enabled, "it waits while it runs");++ // Maintenance › Update runtime has nothing to update: it points to Recreate bottle, never "Already up to date".+ spire.activity = TitleActivity::Stopped;+ model.UpdateRuntime(RuntimeState::Ready, {spire, broke});+ activate(model, "details-more");+ activate(model, "game-maintenance");+ model.TakeActivityRequests();+ model.UpdateRuntime(RuntimeState::Ready, {spire, broke});+ const auto* update = find_row(model, "maintenance-update");+ check(update && !update->enabled &&+ update->subtitle == "Setup was started with an earlier kit. Use Recreate bottle to finish it; saves are kept.",+ "Update runtime points to Recreate bottle");+ const auto* recreate = find_row(model, "maintenance-recreate");+ check(recreate && recreate->enabled, "Recreate bottle is there to use");}// The game page of a waiting game names the game right ahead of it and offers Prepare next.