From ea45025bf9147e0e74be9e5762e7df0cab966a11 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sat, 1 Oct 2022 16:23:35 +1000 Subject: [PATCH] FullscreenUI: Clean boot if resume picked without state --- pcsx2/Frontend/FullscreenUI.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pcsx2/Frontend/FullscreenUI.cpp b/pcsx2/Frontend/FullscreenUI.cpp index a6d0ca6260..0bea487c11 100644 --- a/pcsx2/Frontend/FullscreenUI.cpp +++ b/pcsx2/Frontend/FullscreenUI.cpp @@ -4541,15 +4541,16 @@ void FullscreenUI::HandleGameListOptions(const GameList::Entry* entry) {ICON_FA_WINDOW_CLOSE " Close Menu", false}, }; + const bool has_resume_state = VMManager::HasSaveStateInSlot(entry->serial.c_str(), entry->crc, -1); OpenChoiceDialog( - entry->title.c_str(), false, std::move(options), [entry_path = entry->path](s32 index, const std::string& title, bool checked) { + entry->title.c_str(), false, std::move(options), [has_resume_state, entry_path = entry->path](s32 index, const std::string& title, bool checked) { switch (index) { case 0: // Open Game Properties SwitchToGameSettings(entry_path); break; case 1: // Resume Game - DoStartPath(entry_path, -1); + DoStartPath(entry_path, has_resume_state ? std::optional(-1) : std::optional()); break; case 2: // Load State OpenLoadStateSelectorForGame(entry_path);