mirror of
https://github.com/PretendoNetwork/Inkay.git
synced 2026-09-08 10:25:20 -05:00
fix(config): Switch to snprintf for formatting
Some checks failed
Inkay-CI / build-inkay (push) Has been cancelled
Some checks failed
Inkay-CI / build-inkay (push) Has been cancelled
while vformat is closer to modern string-formatting sensibilities, it added 400KiB to our binaries, whereas snprintf has no noticeable impact. so... suffer, and hope the translators know what's up
This commit is contained in:
@@ -140,8 +140,9 @@ static WUPSConfigAPICallbackStatus ConfigMenuOpenedCallback(WUPSConfigCategoryHa
|
||||
|
||||
{
|
||||
uint16_t port = get_console_peertopeer_port();
|
||||
std::string multiplayer_port_text = std::vformat(strings.multiplayer_port_display, std::make_format_args(port));
|
||||
res = network_cat->add(WUPSConfigItemStub::Create(multiplayer_port_text), err);
|
||||
char buffer[256];
|
||||
snprintf(buffer, sizeof(buffer), strings.multiplayer_port_display.data(), port);
|
||||
res = network_cat->add(WUPSConfigItemStub::Create(buffer), err);
|
||||
if (!res) return report_error(err);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user