Pause screen: Update the save state slots when a save finishes writing

Saves are written on a worker thread, so a state saved just before opening the pause
menu may not be on disk yet when the slots are listed, and the slot stayed empty.
Post SAVESTATE_SLOT_SAVED when a slot save is written, and recreate the pause
screen's views on it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Henrik RydgårdandClaude Opus 5.5 committed 2026-10-26 11:49:44 +01:00
1 parent b5901ab227
commit 0ce79d4d7a
4 files changed
+12

No files matched your search

+8
View File
@@ -411,6 +411,14 @@ void GamePauseScreen::update() {
SetVRAppMode(VRAppMode::VR_MENU_MODE);
}
void GamePauseScreen::sendMessage(UIMessage message, const char *value) {
UIBaseDialogScreen::sendMessage(message, value);
if (message == UIMessage::SAVESTATE_SLOT_SAVED) {
// A save started before the screen opened has finished writing, so its slot needs updating.
RecreateViews();
}
}
GamePauseScreen::GamePauseScreen(const Path &filename, bool bootPending)
: UIBaseDialogScreen(filename), bootPending_(bootPending) {
// So we can tell if something blew up while on the pause screen.