Minor tweaks and code clean up (#357)

This commit is contained in:
Exzap 2022-10-11 09:17:34 +02:00 committed by GitHub
parent b07e9efba4
commit 2b9edced81
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 105 additions and 130 deletions

View file

@ -605,14 +605,12 @@ wxPanel* GeneralSettings2::AddAccountPage(wxNotebook* notebook)
content->Add(m_delete_account, 0, wxEXPAND | wxALL | wxALIGN_RIGHT, 5);
m_delete_account->Bind(wxEVT_BUTTON, &GeneralSettings2::OnAccountDelete, this);
if (NetworkConfig::XMLExists()) {
wxString choices[] = { _("Nintendo"), _("Pretendo"), _("Custom") };
m_active_service= new wxRadioBox(online_panel, wxID_ANY, _("Network Service"), wxDefaultPosition, wxDefaultSize, std::size(choices), choices, 3, wxRA_SPECIFY_COLS);
}
else {
wxString choices[] = { _("Nintendo"), _("Pretendo") };
m_active_service= new wxRadioBox(online_panel, wxID_ANY, _("Network Service"), wxDefaultPosition, wxDefaultSize, std::size(choices), choices, 2, wxRA_SPECIFY_COLS);
}
wxString choices[] = { _("Nintendo"), _("Pretendo"), _("Custom") };
m_active_service = new wxRadioBox(online_panel, wxID_ANY, _("Network Service"), wxDefaultPosition, wxDefaultSize, std::size(choices), choices, 3, wxRA_SPECIFY_COLS);
if (!NetworkConfig::XMLExists())
m_active_service->Enable(2, false);
m_active_service->SetToolTip(_("Connect to which Network Service"));
m_active_service->Bind(wxEVT_RADIOBOX, &GeneralSettings2::OnAccountServiceChanged,this);
content->Add(m_active_service, 0, wxEXPAND | wxALL, 5);

View file

@ -97,17 +97,14 @@ void gui_updateWindowTitles(bool isIdle, bool isLoading, double fps)
const uint64 titleId = CafeSystem::GetForegroundTitleId();
windowText.append(fmt::format(" - FPS: {:.2f} {} {} [TitleId: {:08x}-{:08x}]", (double)fps, renderer, graphicMode, (uint32)(titleId >> 32), (uint32)(titleId & 0xFFFFFFFF)));
if (ActiveSettings::IsOnlineEnabled()){
windowText.append(" [Online]");
if (ActiveSettings::GetNetworkService() == NetworkService::Nintendo) {
windowText.append("[Nintendo]");
}
else if (ActiveSettings::GetNetworkService() == NetworkService::Pretendo) {
windowText.append("[Pretendo]");
}
else if (ActiveSettings::GetNetworkService() == NetworkService::Custom) {
windowText.append("[" + GetNetworkConfig().networkname.GetValue() + "]");
}
if (ActiveSettings::IsOnlineEnabled())
{
if (ActiveSettings::GetNetworkService() == NetworkService::Nintendo)
windowText.append(" [Online]");
else if (ActiveSettings::GetNetworkService() == NetworkService::Pretendo)
windowText.append(" [Online-Pretendo]");
else if (ActiveSettings::GetNetworkService() == NetworkService::Custom)
windowText.append(" [Online-" + GetNetworkConfig().networkname.GetValue() + "]");
}
windowText.append(" ");
windowText.append(CafeSystem::GetForegroundTitleName());