mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-08-28 05:37:36 -05:00
Added Triforce support
This commit is contained in:
@@ -250,7 +250,12 @@ MainWindow::MainWindow(Core::System& system, std::unique_ptr<BootParameters> boo
|
||||
});
|
||||
#endif
|
||||
|
||||
connect(m_cheats_manager, &CheatsManager::OpenGeneralSettings, this,
|
||||
&MainWindow::ShowGeneralWindow);
|
||||
|
||||
#ifdef USE_RETRO_ACHIEVEMENTS
|
||||
connect(m_cheats_manager, &CheatsManager::OpenAchievementSettings, this,
|
||||
&MainWindow::ShowAchievementSettings);
|
||||
connect(m_game_list, &GameList::OpenAchievementSettings, this,
|
||||
&MainWindow::ShowAchievementSettings);
|
||||
#endif // USE_RETRO_ACHIEVEMENTS
|
||||
@@ -511,6 +516,8 @@ void MainWindow::CreateComponents()
|
||||
});
|
||||
connect(m_breakpoint_widget, &BreakpointWidget::ShowMemory, m_memory_widget,
|
||||
&MemoryWidget::SetAddress);
|
||||
connect(m_cheats_manager, &CheatsManager::ShowMemory, m_memory_widget, &MemoryWidget::SetAddress);
|
||||
connect(m_cheats_manager, &CheatsManager::RequestWatch, request_watch);
|
||||
}
|
||||
|
||||
void MainWindow::ConnectMenuBar()
|
||||
@@ -1151,6 +1158,43 @@ void MainWindow::StartGame(std::unique_ptr<BootParameters>&& parameters)
|
||||
if (!NKitWarningDialog::ShowUnlessDisabled())
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user