mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2026-04-27 20:41:42 +00:00
Made version mismatch lobbies more obvious
This commit is contained in:
parent
6c7e7778d1
commit
b1aace4f04
1 changed files with 12 additions and 2 deletions
|
|
@ -29,11 +29,21 @@ void djui_panel_join_lobby(struct DjuiBase* caller) {
|
||||||
void djui_panel_join_query(uint64_t aLobbyId, UNUSED uint64_t aOwnerId, uint16_t aConnections, uint16_t aMaxConnections, UNUSED const char* aGame, UNUSED const char* aVersion, const char* aHostName, const char* aMode) {
|
void djui_panel_join_query(uint64_t aLobbyId, UNUSED uint64_t aOwnerId, uint16_t aConnections, uint16_t aMaxConnections, UNUSED const char* aGame, UNUSED const char* aVersion, const char* aHostName, const char* aMode) {
|
||||||
if (!sLobbyLayout) { return; }
|
if (!sLobbyLayout) { return; }
|
||||||
|
|
||||||
char playerText[64];
|
char playerText[64] = "";
|
||||||
snprintf(playerText, 63, "%u/%u", aConnections, aMaxConnections);
|
snprintf(playerText, 63, "%u/%u", aConnections, aMaxConnections);
|
||||||
|
|
||||||
|
|
||||||
|
char mode[64] = "";
|
||||||
|
snprintf(mode, 64, "%s", aMode);
|
||||||
|
|
||||||
|
char version[MAX_VERSION_LENGTH] = { 0 };
|
||||||
|
snprintf(version, MAX_VERSION_LENGTH, "%s", get_version());
|
||||||
|
if (strcmp(version, aVersion) != 0) {
|
||||||
|
snprintf(mode, 64, "\\#ff0000\\[%s]", aVersion);
|
||||||
|
}
|
||||||
|
|
||||||
struct DjuiBase* layoutBase = &sLobbyLayout->base;
|
struct DjuiBase* layoutBase = &sLobbyLayout->base;
|
||||||
struct DjuiLobbyEntry* entry = djui_lobby_entry_create(layoutBase, (char*)aHostName, (char*)aMode, playerText, djui_panel_join_lobby);
|
struct DjuiLobbyEntry* entry = djui_lobby_entry_create(layoutBase, (char*)aHostName, (char*)mode, playerText, djui_panel_join_lobby);
|
||||||
entry->base.tag = (s64)aLobbyId;
|
entry->base.tag = (s64)aLobbyId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue