mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 17:31:20 +02:00
gui/timeosd.cpp: show negative time for MODE_DESC
This commit is contained in:
@@ -85,7 +85,13 @@ CTimeOSD::~CTimeOSD()
|
|||||||
void CTimeOSD::initTimeString()
|
void CTimeOSD::initTimeString()
|
||||||
{
|
{
|
||||||
struct tm t;
|
struct tm t;
|
||||||
strftime((char*) &cl_timestr, sizeof(cl_timestr), cl_format_str.c_str(), gmtime_r(&m_time_show, &t));
|
if (m_mode == MODE_DESC) {
|
||||||
|
char tt[20];
|
||||||
|
strftime(tt, sizeof(tt), cl_format_str.c_str(), gmtime_r(&m_time_show, &t));
|
||||||
|
snprintf(cl_timestr, sizeof(cl_timestr), "-%s", tt);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
strftime(cl_timestr, sizeof(cl_timestr), cl_format_str.c_str(), gmtime_r(&m_time_show, &t));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CTimeOSD::show(time_t time_show, bool force)
|
void CTimeOSD::show(time_t time_show, bool force)
|
||||||
@@ -132,6 +138,7 @@ void CTimeOSD::switchMode(int position, int duration)
|
|||||||
switch (m_mode) {
|
switch (m_mode) {
|
||||||
case MODE_ASC:
|
case MODE_ASC:
|
||||||
m_mode = MODE_DESC;
|
m_mode = MODE_DESC;
|
||||||
|
CComponents::kill();
|
||||||
break;
|
break;
|
||||||
case MODE_DESC:
|
case MODE_DESC:
|
||||||
m_mode = MODE_BAR;
|
m_mode = MODE_BAR;
|
||||||
|
Reference in New Issue
Block a user