]> skyeroc.xyz Git - dgamelaunch/commitdiff
Don't show idle times less than 5s.
authorPasi Kallinen <paxed@alt.org>
Sat, 29 Jan 2011 19:23:48 +0000 (19:23 +0000)
committerPasi Kallinen <paxed@alt.org>
Sat, 29 Jan 2011 19:23:48 +0000 (19:23 +0000)
git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@582 db0b04b0-f4d1-0310-9a6d-de3e77497b0e

dgamelaunch.c

index 24f8414594f5b17d56206c9996a2855233821f24..d2ff8d01ed4762c7c27487cc77549b13544e046c 100644 (file)
@@ -801,8 +801,12 @@ inprogressmenu (int gameid)
              secs -= (mins*60);
              if (hours)
                  snprintf(idletime, 10, "%ldh %ldm", hours, mins);
-             else
+             else if (mins)
                  snprintf(idletime, 10, "%ldm %lds", mins, secs);
+             else if (secs > 4)
+                 snprintf(idletime, 10, "%lds", secs);
+             else
+                 snprintf(idletime, 10, " ");
          }
 
          for (di = 0; di < ARRAY_SIZE(watchcols); di++) {