Add support for choosing network service (incl Pretendo+Custom) (#302)

This commit is contained in:
MythicalPlayz 2022-10-11 04:04:47 +02:00 committed by GitHub
parent 52cc7c5996
commit b07e9efba4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 345 additions and 22 deletions

View file

@ -5,6 +5,7 @@
#include "gui/debugger/DebuggerWindow2.h"
#include "Cafe/HW/Latte/Core/Latte.h"
#include "config/ActiveSettings.h"
#include "config/NetworkSettings.h"
#include "config/CemuConfig.h"
#include "Cafe/HW/Latte/Renderer/Renderer.h"
#include "Cafe/CafeSystem.h"
@ -96,9 +97,18 @@ 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())
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() + "]");
}
}
windowText.append(" ");
windowText.append(CafeSystem::GetForegroundTitleName());
// append region