Qt: Add missing Boot confirmation

This commit is contained in:
Megamouse 2021-09-08 19:10:30 +02:00
parent 00618995d9
commit 57473ff98d

View File

@ -1938,6 +1938,11 @@ void main_window::CreateConnects()
connect(ui->addGamesAct, &QAction::triggered, this, [this]() connect(ui->addGamesAct, &QAction::triggered, this, [this]()
{ {
if (!m_gui_settings->GetBootConfirmation(this))
{
return;
}
QStringList paths; QStringList paths;
// Only select one folder for now // Only select one folder for now
@ -2661,6 +2666,8 @@ void main_window::CreateFirmwareCache()
return; return;
} }
Emu.SetForceBoot(true);
Emu.Stop();
Emu.SetForceBoot(true); Emu.SetForceBoot(true);
if (const game_boot_result error = Emu.BootGame(g_cfg.vfs.get_dev_flash() + "sys", "", true); if (const game_boot_result error = Emu.BootGame(g_cfg.vfs.get_dev_flash() + "sys", "", true);
@ -2888,6 +2895,10 @@ void main_window::dropEvent(QDropEvent* event)
{ {
return; return;
} }
Emu.SetForceBoot(true);
Emu.Stop();
if (const auto error = Emu.BootGame(sstr(drop_paths.first()), "", true); error != game_boot_result::no_errors) if (const auto error = Emu.BootGame(sstr(drop_paths.first()), "", true); error != game_boot_result::no_errors)
{ {
gui_log.error("Boot failed: reason: %s, path: %s", error, sstr(drop_paths.first())); gui_log.error("Boot failed: reason: %s, path: %s", error, sstr(drop_paths.first()));