forked from PretendoNetwork/Inkay
feat(p2p): Show p2p port in the config menu
with love to my weblate people
This commit is contained in:
parent
22bebff027
commit
cc967126fe
5 changed files with 14 additions and 1 deletions
|
|
@ -20,11 +20,13 @@
|
|||
#include "wut_extra.h"
|
||||
#include "utils/logger.h"
|
||||
#include "utils/sysconfig.h"
|
||||
#include "patches/game_peertopeer.h"
|
||||
|
||||
#include <wups.h>
|
||||
#include <wups/storage.h>
|
||||
#include <wups/config_api.h>
|
||||
#include <wups/config/WUPSConfigItemBoolean.h>
|
||||
#include <wups/config/WUPSConfigItemStub.h>
|
||||
|
||||
#include <coreinit/title.h>
|
||||
#include <coreinit/launch.h>
|
||||
|
|
@ -32,6 +34,8 @@
|
|||
#include <sysapp/launch.h>
|
||||
#include <nn/act.h>
|
||||
|
||||
#include <format>
|
||||
|
||||
bool Config::connect_to_network = true;
|
||||
bool Config::need_relaunch = false;
|
||||
bool Config::unregister_task_item_pressed = false;
|
||||
|
|
@ -174,6 +178,12 @@ static WUPSConfigAPICallbackStatus ConfigMenuOpenedCallback(WUPSConfigCategoryHa
|
|||
res = network_cat->add(std::move(*connect_item), err);
|
||||
if (!res) return report_error(err);
|
||||
|
||||
{
|
||||
std::string multiplayer_port_text = std::vformat(strings.multiplayer_port_display, std::make_format_args(peertopeer_port()));
|
||||
res = network_cat->add(WUPSConfigItemStub::Create(multiplayer_port_text), err);
|
||||
if (!res) return report_error(err);
|
||||
}
|
||||
|
||||
res = root.add(std::move(*network_cat), err);
|
||||
if (!res) return report_error(err);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue