From 6e514e71fe7cce7a6156747b5d3d852355365891 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Sun, 5 Jun 2022 17:01:36 +0200 Subject: don't show ping when disconnected --- client/ui.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/ui.c b/client/ui.c index 1cde52f..f636501 100644 --- a/client/ui.c +++ b/client/ui.c @@ -41,9 +41,9 @@ void w2_ui_paint_statusbar() { mvaddnstr(1, 0, temp, g_w2_ui_width); mvaddnstr(2, 0, temp, g_w2_ui_width); - sprintf(temp, "%s, %ims %s", - g_w2_state.connected ? W2_UI_CONN_STAT_CONNECTED : W2_UI_CONN_STAT_DISCONNECTED, - g_w2_state.ping, W2_UI_CONN_STAT_PING); + g_w2_state.connected + ? sprintf(temp, W2_UI_CONN_STAT_CONNECTED ", %ims %s", g_w2_state.ping, W2_UI_CONN_STAT_PING) + : sprintf(temp, W2_UI_CONN_STAT_DISCONNECTED); mvaddstr(0, 0, temp); sprintf(temp, "(%s)", g_w2_state.info.build_str); -- cgit v1.2.3