diff --git a/rpcs3/Emu/System.cpp b/rpcs3/Emu/System.cpp index 4d4765f962..b9a3fdbca6 100644 --- a/rpcs3/Emu/System.cpp +++ b/rpcs3/Emu/System.cpp @@ -1977,12 +1977,17 @@ bool Emulator::Quit(bool force_quit) // The callback is only used if we actually quit RPCS3 const auto on_exit = []() { - // Deinitialize object manager to prevent any hanging objects at program exit - g_fxo->clear(); + Emu.CleanUp(); }; return GetCallbacks().try_to_quit(force_quit, on_exit); } +void Emulator::CleanUp() +{ + // Deinitialize object manager to prevent any hanging objects at program exit + g_fxo->clear(); +} + std::string Emulator::GetFormattedTitle(double fps) const { rpcs3::title_format_data title_data; diff --git a/rpcs3/Emu/System.h b/rpcs3/Emu/System.h index a0c650d33a..b62ceff7b9 100644 --- a/rpcs3/Emu/System.h +++ b/rpcs3/Emu/System.h @@ -236,6 +236,7 @@ public: void Stop(bool restart = false); void Restart() { Stop(true); } bool Quit(bool force_quit); + void CleanUp(); bool IsRunning() const { return m_state == system_state::running; } bool IsPaused() const { return m_state == system_state::paused; } diff --git a/rpcs3/rpcs3qt/update_manager.cpp b/rpcs3/rpcs3qt/update_manager.cpp index e173756ce5..4e097cbc33 100644 --- a/rpcs3/rpcs3qt/update_manager.cpp +++ b/rpcs3/rpcs3qt/update_manager.cpp @@ -545,6 +545,10 @@ bool update_manager::handle_rpcs3(const QByteArray& data) QMessageBox::information(m_parent, tr("Auto-updater"), tr("Update successful!\nRPCS3 will now restart.")); + Emu.SetForceBoot(true); + Emu.Stop(); + Emu.CleanUp(); + #ifdef _WIN32 const int ret = _wexecl(wchar_orig_path.data(), L"--updating", nullptr); #else