Fix wall clock with 12h format
Stock strftime doesn't use capitalized "P", so for example on Windows the wall clock didn't appear for 12h format. PM and AM are converted to lowercase.
This commit is contained in:
@@ -503,7 +503,7 @@ menuitem [Reset to default scoreboard...] [ loop rsl (listlen $DEFAULT_SCOREBOAR
|
||||
menuitem [Close] [ closecurmenu ]
|
||||
|
||||
alias wallclockformat "" // strftime formatting
|
||||
alias wallclockformatlist ["" %H:%M %H:%M:%S %I:%M%P %I:%M:%S%P U%H:%M U%H:%M:%S] //"U" at beginning means UTC/GMT time
|
||||
alias wallclockformatlist ["" %H:%M %H:%M:%S %I:%M%p %I:%M:%S%p U%H:%M U%H:%M:%S] //"U" at beginning means UTC/GMT time
|
||||
|
||||
newmenu HUD
|
||||
|
||||
|
||||
@@ -841,7 +841,7 @@ void gl_drawhud(int w, int h, int curfps, int nquads, int curvert, bool underwat
|
||||
const char *ltimeformat = getalias("wallclockformat");
|
||||
bool wallclock = ltimeformat && *ltimeformat;
|
||||
//wallclockformat beginning with "U" shows UTC/GMT time
|
||||
if(wallclock) formatstring(ltime)("%s", timestring(*ltimeformat != 'U', ltimeformat + int(*ltimeformat == 'U')));
|
||||
if(wallclock) filtertext(ltime, timestring(*ltimeformat != 'U', ltimeformat + int(*ltimeformat == 'U')), FTXT_TOLOWER);
|
||||
|
||||
if(showstats)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user