Implement Emulator::GracefulShutdown()

This commit is contained in:
Eladash 2022-02-05 12:49:29 +02:00 committed by GitHub
parent 6c5b8dc31c
commit e951c619c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 180 additions and 89 deletions

View file

@ -1402,8 +1402,7 @@ void game_list_frame::ShowContextMenu(const QPoint &pos)
bool game_list_frame::CreatePPUCache(const std::string& path, const std::string& serial)
{
Emu.SetForceBoot(true);
Emu.Stop();
Emu.GracefulShutdown(false);
Emu.SetForceBoot(true);
if (const auto error = Emu.BootGame(path, serial, true); error != game_boot_result::no_errors)
@ -1701,7 +1700,7 @@ void game_list_frame::BatchCreatePPUCaches()
if (!Emu.IsStopped())
{
QApplication::processEvents();
Emu.Stop();
Emu.GracefulShutdown(false);
}
if (!pdlg->wasCanceled())