From 91b61d2f8a74bed9d3e14bb13643a93e7eb9607c Mon Sep 17 00:00:00 2001 From: Agent X <44549182+AgentXLP@users.noreply.github.com> Date: Wed, 10 Jul 2024 12:16:04 -0400 Subject: [PATCH] Hide old lobbies not on sm64coopdx --- src/pc/djui/djui_panel_join_lobbies.c | 1 + src/pc/network/version.c | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/pc/djui/djui_panel_join_lobbies.c b/src/pc/djui/djui_panel_join_lobbies.c index 4a05a15e..652b1d5f 100644 --- a/src/pc/djui/djui_panel_join_lobbies.c +++ b/src/pc/djui/djui_panel_join_lobbies.c @@ -78,6 +78,7 @@ void djui_panel_join_query(uint64_t aLobbyId, UNUSED uint64_t aOwnerId, uint16_t if (!sLobbyLayout) { return; } if (!sLobbyPaginated) { return; } if (aMaxConnections > MAX_PLAYERS) { return; } + if (strstr(aVersion, "v36") || strstr(aVersion, "beta")) { return; } char playerText[64] = ""; snprintf(playerText, 63, "%u/%u", aConnections, aMaxConnections); diff --git a/src/pc/network/version.c b/src/pc/network/version.c index 0b61a520..2dc76d0f 100644 --- a/src/pc/network/version.c +++ b/src/pc/network/version.c @@ -16,9 +16,17 @@ const char* get_version(void) { const char* get_version_online(void) { #if defined(VERSION_US) - snprintf(sOnlineVersionString, MAX_VERSION_LENGTH, "%s%d", VERSION_TEXT, VERSION_NUMBER); + if (MINOR_VERSION_NUMBER > 0) { + snprintf(sOnlineVersionString, MAX_VERSION_LENGTH, "%s%d.%d", VERSION_TEXT, VERSION_NUMBER, MINOR_VERSION_NUMBER); + } else { + snprintf(sOnlineVersionString, MAX_VERSION_LENGTH, "%s%d", VERSION_TEXT, VERSION_NUMBER); + } #else - snprintf(sOnlineVersionString, MAX_VERSION_LENGTH, "%s%d %s", VERSION_TEXT, VERSION_NUMBER, VERSION_REGION); + if (MINOR_VERSION_NUMBER > 0) { + snprintf(sOnlineVersionString, MAX_VERSION_LENGTH, "%s%d.%d %s", VERSION_TEXT, VERSION_NUMBER, MINOR_VERSION_NUMBER, VERSION_REGION); + } else { + snprintf(sOnlineVersionString, MAX_VERSION_LENGTH, "%s%d %s", VERSION_TEXT, VERSION_NUMBER, VERSION_REGION); + } #endif return sOnlineVersionString; }