Qt: Don't allow booting when changing disc from game list

This commit is contained in:
Connor McLaughlin 2020-07-24 02:37:09 +10:00
parent 4b2e6cdfa8
commit e30c0a6881
1 changed files with 29 additions and 18 deletions

View File

@ -373,6 +373,8 @@ void MainWindow::onGameListContextMenuRequested(const QPoint& point, const GameL
menu.addSeparator();
if (!m_emulation_running)
{
if (!entry->code.empty())
{
m_host_interface->populateGameListContextMenu(entry->code.c_str(), this, &menu);
@ -393,6 +395,15 @@ void MainWindow::onGameListContextMenuRequested(const QPoint& point, const GameL
boot_params.override_fast_boot = false;
m_host_interface->bootSystem(boot_params);
});
}
else
{
connect(menu.addAction(tr("Change Disc")), &QAction::triggered, [this, entry]() {
m_host_interface->changeDisc(QString::fromStdString(entry->path));
m_host_interface->pauseSystem(false);
switchToEmulationView();
});
}
menu.addSeparator();
}