Qt: spawn Confirmation Dialog on when booting games while Emu is running

This commit is contained in:
Megamouse 2019-01-03 17:13:49 +01:00
parent 5f9b441dd7
commit daee2a27a3
5 changed files with 29 additions and 0 deletions

View file

@ -270,6 +270,19 @@ void main_window::OnPlayOrPause()
void main_window::Boot(const std::string& path, bool direct, bool add_only)
{
if (!Emu.IsStopped())
{
int result;
guiSettings->ShowConfirmationBox(tr("Close Running Game?"),
tr("Booting another game will close the current game.\nDo you really want to boot another game?\n\nAny unsaved progress will be lost!\n"),
gui::ib_confirm_boot, &result, this);
if (result != QMessageBox::Yes)
{
return;
}
}
SetAppIconFromPath(path);
Emu.SetForceBoot(true);
Emu.Stop();