Merge pull request #6168 from PabloMK7/cia_update_fix

Fix handling of auto-updating ncch apps
This commit is contained in:
GPUCode 2022-11-09 17:35:16 +02:00 committed by GitHub
commit 38b8bf12de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 54 additions and 10 deletions

View file

@ -325,6 +325,7 @@ System::ResultStatus System::Load(Frontend::EmuWindow& emu_window, const std::st
status = ResultStatus::Success;
m_emu_window = &emu_window;
m_filepath = filepath;
self_delete_pending = false;
// Reset counters and set time origin to current frame
[[maybe_unused]] const PerfStats::Results result = GetAndResetPerfStats();
@ -559,6 +560,10 @@ void System::Shutdown(bool is_deserializing) {
memory.reset();
if (self_delete_pending)
FileUtil::Delete(m_filepath);
self_delete_pending = false;
LOG_DEBUG(Core, "Shutdown OK");
}
@ -575,6 +580,11 @@ void System::Reset() {
Shutdown();
if (!m_chainloadpath.empty()) {
m_filepath = m_chainloadpath;
m_chainloadpath.clear();
}
// Reload the system with the same setting
[[maybe_unused]] const System::ResultStatus result = Load(*m_emu_window, m_filepath);