Add XLink Kai UDP BBA

This commit is contained in:
CrunchBite
2020-06-07 23:25:45 -04:00
parent 595e1197b6
commit 067667fda5
11 changed files with 425 additions and 28 deletions

View File

@ -104,6 +104,8 @@ void GameCubePane::CreateWidgets()
{std::make_pair(tr("<Nothing>"), ExpansionInterface::EXIDEVICE_NONE),
std::make_pair(tr("Dummy"), ExpansionInterface::EXIDEVICE_DUMMY),
std::make_pair(tr("Broadband Adapter (TAP)"), ExpansionInterface::EXIDEVICE_ETH),
std::make_pair(tr("Broadband Adapter (XLink Kai)"),
ExpansionInterface::EXIDEVICE_ETHXLINK)})
{
m_slot_combos[2]->addItem(entry.first, entry.second);
}
@ -158,7 +160,8 @@ void GameCubePane::UpdateButton(int slot)
value == ExpansionInterface::EXIDEVICE_AGP || value == ExpansionInterface::EXIDEVICE_MIC);
break;
case SLOT_SP1_INDEX:
has_config = (value == ExpansionInterface::EXIDEVICE_ETH);
has_config = (value == ExpansionInterface::EXIDEVICE_ETH ||
value == ExpansionInterface::EXIDEVICE_ETHXLINK);
break;
}
@ -186,13 +189,24 @@ void GameCubePane::OnConfigPressed(int slot)
{
bool ok;
const auto new_mac = QInputDialog::getText(
this, tr("Broadband Adapter (TAP) MAC address"),
tr("Enter new Broadband Adapter (TAP) MAC address:"), QLineEdit::Normal,
QString::fromStdString(SConfig::GetInstance().m_bba_tap_mac), &ok);
// i18n: MAC stands for Media Access Control. A MAC address uniquely identifies a network
// interface (physical) like a serial number. "MAC" should be kept in translations.
this, tr("Broadband Adapter MAC address"), tr("Enter new Broadband Adapter MAC address:"),
QLineEdit::Normal, QString::fromStdString(SConfig::GetInstance().m_bba_mac), &ok);
if (ok)
SConfig::GetInstance().m_bba_tap_mac = new_mac.toStdString();
SConfig::GetInstance().m_bba_mac = new_mac.toStdString();
return;
}
case ExpansionInterface::EXIDEVICE_ETHXLINK:
{
bool ok;
const auto new_dest = QInputDialog::getText(
this, tr("Broadband Adapter (XLink Kai) Destination Address"),
tr("Enter IP address of device running the XLink Kai Client.\nFor more information see"
" https://www.teamxlink.co.uk/wiki/Dolphin"),
QLineEdit::Normal, QString::fromStdString(SConfig::GetInstance().m_bba_xlink_ip), &ok);
if (ok)
SConfig::GetInstance().m_bba_xlink_ip = new_dest.toStdString();
return;
}
default: