Show the time in menu core.
This commit is contained in:
2
osd.c
2
osd.c
@@ -235,7 +235,7 @@ void OsdWriteOffset(unsigned char n, char *s, unsigned char invert, unsigned cha
|
||||
// send all characters in string to OSD
|
||||
while (1)
|
||||
{
|
||||
if (i == 0)
|
||||
if (i == 0 && (n < osd_size))
|
||||
{ // Render sidestripe
|
||||
unsigned char j;
|
||||
unsigned char tmp[8];
|
||||
|
||||
22
user_io.c
22
user_io.c
@@ -1262,6 +1262,28 @@ void user_io_poll()
|
||||
DISKLED_OFF;
|
||||
}
|
||||
*/
|
||||
|
||||
if (is_menu_core())
|
||||
{
|
||||
if (!rtc_timer || CheckTimer(rtc_timer))
|
||||
{
|
||||
rtc_timer = GetTimer(1000);
|
||||
|
||||
time_t t = time(NULL);
|
||||
struct tm tm = *localtime(&t);
|
||||
|
||||
char str[64];
|
||||
sprintf(str, " MiSTer ");
|
||||
if (tm.tm_year >= 117)
|
||||
{
|
||||
strftime(str + strlen(str), sizeof(str) - 1 - strlen(str), "%Y.%m.%d %H:%M:%S", &tm);
|
||||
}
|
||||
|
||||
OsdWrite(16, "", 1, 0);
|
||||
OsdWrite(17, str, 1, 0);
|
||||
OsdWrite(18, "", 1, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (core_type == CORE_TYPE_ARCHIE) archie_poll();
|
||||
|
||||
Reference in New Issue
Block a user