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,26 +373,37 @@ void MainWindow::onGameListContextMenuRequested(const QPoint& point, const GameL
menu.addSeparator();
if (!entry->code.empty())
if (!m_emulation_running)
{
m_host_interface->populateGameListContextMenu(entry->code.c_str(), this, &menu);
menu.addSeparator();
if (!entry->code.empty())
{
m_host_interface->populateGameListContextMenu(entry->code.c_str(), this, &menu);
menu.addSeparator();
}
connect(menu.addAction(tr("Default Boot")), &QAction::triggered,
[this, entry]() { m_host_interface->bootSystem(SystemBootParameters(entry->path)); });
connect(menu.addAction(tr("Fast Boot")), &QAction::triggered, [this, entry]() {
SystemBootParameters boot_params(entry->path);
boot_params.override_fast_boot = true;
m_host_interface->bootSystem(boot_params);
});
connect(menu.addAction(tr("Full Boot")), &QAction::triggered, [this, entry]() {
SystemBootParameters boot_params(entry->path);
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();
});
}
connect(menu.addAction(tr("Default Boot")), &QAction::triggered,
[this, entry]() { m_host_interface->bootSystem(SystemBootParameters(entry->path)); });
connect(menu.addAction(tr("Fast Boot")), &QAction::triggered, [this, entry]() {
SystemBootParameters boot_params(entry->path);
boot_params.override_fast_boot = true;
m_host_interface->bootSystem(boot_params);
});
connect(menu.addAction(tr("Full Boot")), &QAction::triggered, [this, entry]() {
SystemBootParameters boot_params(entry->path);
boot_params.override_fast_boot = false;
m_host_interface->bootSystem(boot_params);
});
menu.addSeparator();
}