diff --git a/src/pc/discord/discord_activity.c b/src/pc/discord/discord_activity.c index c9d3594a..8112c076 100644 --- a/src/pc/discord/discord_activity.c +++ b/src/pc/discord/discord_activity.c @@ -110,7 +110,7 @@ void discord_activity_update(void) { sCurActivity.party.size.max_size = 1; } - if (sCurActivity.party.size.current_size > 1 || configAmountofPlayers == 1) { + if ((sCurActivity.party.size.current_size > 1 || configAmountofPlayers == 1) && !gDjuiInMainMenu) { strcpy(sCurActivity.state, "Playing!"); } else if (gNetworkType == NT_SERVER) { strcpy(sCurActivity.state, "Waiting for players..."); @@ -120,12 +120,11 @@ void discord_activity_update(void) { if (sCurActivity.party.size.max_size < 1) { sCurActivity.party.size.max_size = 1; } } - char details[128] = { 0 }; - discord_populate_details(details, 128); + // HACK: give the detail population more space than the Discord details can fit so it gets truncated without cutting off the largest strings + char details[256] = { 0 }; + discord_populate_details(details, 256); - if (snprintf(sCurActivity.details, 128, "%s", details) < 0) { - LOG_INFO("truncating details"); - } + snprintf(sCurActivity.details, 128, "%s", details); if (!app.activities) { LOG_INFO("no activities"); diff --git a/src/pc/network/coopnet/coopnet.c b/src/pc/network/coopnet/coopnet.c index a75990ec..a3015dd0 100644 --- a/src/pc/network/coopnet/coopnet.c +++ b/src/pc/network/coopnet/coopnet.c @@ -17,7 +17,7 @@ uint64_t gCoopNetDesiredLobby = 0; char gCoopNetPassword[64] = ""; -char sCoopNetDescription[256] = ""; +char sCoopNetDescription[512] = ""; static uint64_t sLocalLobbyId = 0; static uint64_t sLocalLobbyOwnerId = 0; @@ -171,7 +171,7 @@ bool ns_coopnet_is_connected(void) { static void coopnet_populate_description(void) { char* buffer = sCoopNetDescription; - int bufferLength = 256; + int bufferLength = 512; // get version const char* version = get_version(); int versionLength = strlen(version);