mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
BBA: Added BuiltIn device that allow BBA emulation without the need of a TapDevice Configuration include a dns server setting
This commit is contained in:
@ -48,6 +48,15 @@ void BroadbandAdapterSettingsDialog::InitControls()
|
||||
window_title = tr("Broadband Adapter MAC Address");
|
||||
break;
|
||||
|
||||
case Type::BuiltIn:
|
||||
address_label = new QLabel(tr("Enter the DNS server to use:"));
|
||||
address_placeholder = QString::fromStdString("8.8.8.8");
|
||||
current_address = QString::fromStdString(Config::Get(Config::MAIN_BBA_BUILTIN_DNS));
|
||||
description = new QLabel(tr("Use 8.8.8.8 for normal DNS, else enter your custom one"));
|
||||
|
||||
window_title = tr("Broadband Adapter DNS setting");
|
||||
break;
|
||||
|
||||
case Type::XLinkKai:
|
||||
address_label = new QLabel(tr("Enter IP address of device running the XLink Kai Client:"));
|
||||
address_placeholder = QString::fromStdString("127.0.0.1");
|
||||
@ -103,6 +112,9 @@ void BroadbandAdapterSettingsDialog::SaveAddress()
|
||||
Config::SetBaseOrCurrent(Config::MAIN_BBA_MAC, bba_new_address);
|
||||
break;
|
||||
|
||||
case Type::BuiltIn:
|
||||
Config::SetBaseOrCurrent(Config::MAIN_BBA_BUILTIN_DNS, bba_new_address);
|
||||
break;
|
||||
case Type::XLinkKai:
|
||||
Config::SetBaseOrCurrent(Config::MAIN_BBA_XLINK_IP, bba_new_address);
|
||||
break;
|
||||
|
@ -15,6 +15,7 @@ public:
|
||||
{
|
||||
Ethernet,
|
||||
XLinkKai,
|
||||
BuiltIn
|
||||
};
|
||||
|
||||
explicit BroadbandAdapterSettingsDialog(QWidget* target, Type bba_type);
|
||||
|
@ -120,6 +120,7 @@ void GameCubePane::CreateWidgets()
|
||||
#ifdef __APPLE__
|
||||
EXIDeviceType::EthernetTapServer,
|
||||
#endif
|
||||
EXIDeviceType::EthernetBuiltIn,
|
||||
})
|
||||
{
|
||||
m_slot_combos[ExpansionInterface::Slot::SP1]->addItem(tr(fmt::format("{:n}", device).c_str()),
|
||||
@ -259,7 +260,8 @@ void GameCubePane::UpdateButton(ExpansionInterface::Slot slot)
|
||||
break;
|
||||
case ExpansionInterface::Slot::SP1:
|
||||
has_config = (device == ExpansionInterface::EXIDeviceType::Ethernet ||
|
||||
device == ExpansionInterface::EXIDeviceType::EthernetXLink);
|
||||
device == ExpansionInterface::EXIDeviceType::EthernetXLink ||
|
||||
device == ExpansionInterface::EXIDeviceType::EthernetBuiltIn);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -293,6 +295,11 @@ void GameCubePane::OnConfigPressed(ExpansionInterface::Slot slot)
|
||||
BroadbandAdapterSettingsDialog(this, BroadbandAdapterSettingsDialog::Type::XLinkKai).exec();
|
||||
return;
|
||||
}
|
||||
case ExpansionInterface::EXIDeviceType::EthernetBuiltIn:
|
||||
{
|
||||
BroadbandAdapterSettingsDialog(this, BroadbandAdapterSettingsDialog::Type::BuiltIn).exec();
|
||||
return;
|
||||
}
|
||||
default:
|
||||
PanicAlertFmt("Unknown settings pressed for {}", device);
|
||||
return;
|
||||
|
Reference in New Issue
Block a user