mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-09-23 01:38:42 +00:00
Prevent misconfigured Triforce launches and warn on mismatched hardware
This commit is contained in:
parent
83985cbec4
commit
001b94a6e2
1 changed files with 198 additions and 165 deletions
|
@ -1147,6 +1147,39 @@ void MainWindow::StartGame(std::unique_ptr<BootParameters>&& parameters)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
When booting Triforce games, we need to ensure that the hardware is set up correctly.
|
||||||
|
*/
|
||||||
|
const auto volume_type =
|
||||||
|
std::get<BootParameters::Disc>(parameters->parameters).volume->GetVolumeType();
|
||||||
|
|
||||||
|
const bool triforce_hardware_sp1 = Config::Get(Config::MAIN_SERIAL_PORT_1) == ExpansionInterface::EXIDeviceType::Baseboard;
|
||||||
|
const bool triforce_hardware_port_1 = Config::Get(Config::GetInfoForSIDevice(0)) == SerialInterface::SIDevices::SIDEVICE_AM_BASEBOARD;
|
||||||
|
|
||||||
|
if (volume_type == DiscIO::Platform::Triforce)
|
||||||
|
{
|
||||||
|
if (!triforce_hardware_sp1 || !triforce_hardware_port_1)
|
||||||
|
{
|
||||||
|
ModalMessageBox::critical(
|
||||||
|
this, tr("Error"), tr("To boot a Triforce game, SP1 and Port 1 must be set to Triforce Baseboard."),
|
||||||
|
QMessageBox::Ok);
|
||||||
|
HideRenderWidget();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
Some Triforce tools don't include a boot.id file, but they can still be launched.
|
||||||
|
*/
|
||||||
|
if (triforce_hardware_sp1 || triforce_hardware_port_1)
|
||||||
|
{
|
||||||
|
ModalMessageBox::warning(
|
||||||
|
this, tr("Warning"), tr("Non-Triforce games cannot be booted with Triforce hardware attached."),
|
||||||
|
QMessageBox::Ok);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// If we're running, only start a new game once we've stopped the last.
|
// If we're running, only start a new game once we've stopped the last.
|
||||||
if (!Core::IsUninitialized(m_system))
|
if (!Core::IsUninitialized(m_system))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue