mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-13 02:08:49 +12:00
Cleanup Emu before the update reboot
This commit is contained in:
parent
9da7910fc9
commit
dab53f4e41
3 changed files with 12 additions and 2 deletions
|
@ -1977,12 +1977,17 @@ bool Emulator::Quit(bool force_quit)
|
||||||
// The callback is only used if we actually quit RPCS3
|
// The callback is only used if we actually quit RPCS3
|
||||||
const auto on_exit = []()
|
const auto on_exit = []()
|
||||||
{
|
{
|
||||||
// Deinitialize object manager to prevent any hanging objects at program exit
|
Emu.CleanUp();
|
||||||
g_fxo->clear();
|
|
||||||
};
|
};
|
||||||
return GetCallbacks().try_to_quit(force_quit, on_exit);
|
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
|
std::string Emulator::GetFormattedTitle(double fps) const
|
||||||
{
|
{
|
||||||
rpcs3::title_format_data title_data;
|
rpcs3::title_format_data title_data;
|
||||||
|
|
|
@ -236,6 +236,7 @@ public:
|
||||||
void Stop(bool restart = false);
|
void Stop(bool restart = false);
|
||||||
void Restart() { Stop(true); }
|
void Restart() { Stop(true); }
|
||||||
bool Quit(bool force_quit);
|
bool Quit(bool force_quit);
|
||||||
|
void CleanUp();
|
||||||
|
|
||||||
bool IsRunning() const { return m_state == system_state::running; }
|
bool IsRunning() const { return m_state == system_state::running; }
|
||||||
bool IsPaused() const { return m_state == system_state::paused; }
|
bool IsPaused() const { return m_state == system_state::paused; }
|
||||||
|
|
|
@ -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."));
|
QMessageBox::information(m_parent, tr("Auto-updater"), tr("Update successful!\nRPCS3 will now restart."));
|
||||||
|
|
||||||
|
Emu.SetForceBoot(true);
|
||||||
|
Emu.Stop();
|
||||||
|
Emu.CleanUp();
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
const int ret = _wexecl(wchar_orig_path.data(), L"--updating", nullptr);
|
const int ret = _wexecl(wchar_orig_path.data(), L"--updating", nullptr);
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue