mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 21:22:39 -05:00
Added 12 hour clock to status bar on recorders.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2621 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
c7e0bea57a
commit
22a7a2d7d3
5 changed files with 41 additions and 5 deletions
|
|
@ -23,6 +23,8 @@
|
|||
#include "sprintf.h"
|
||||
#include "rtc.h"
|
||||
|
||||
#include "settings.h"
|
||||
|
||||
#include "icons.h"
|
||||
|
||||
unsigned char slider_bar[] =
|
||||
|
|
@ -277,6 +279,12 @@ void statusbar_time(int hour, int minute)
|
|||
hour <= 23 &&
|
||||
minute >= 0 &&
|
||||
minute <= 59 ) {
|
||||
if ( global_settings.timeformat ) { /* 12 hour clock */
|
||||
hour %= 12;
|
||||
if ( hour == 0 ) {
|
||||
hour +=12;
|
||||
}
|
||||
}
|
||||
snprintf(buffer, sizeof(buffer), "%02d:%02d", hour, minute);
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue