mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 08:21:07 +02:00
fix clock osd
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1038 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Commit: 970b0ac6a3
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2011-01-22 (Sat, 22 Jan 2011)
Origin message was:
------------------
-fix clock osd
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1038 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -36,16 +36,13 @@ CInfoClock::~CInfoClock()
|
||||
|
||||
void CInfoClock::paintTime( bool show_dot)
|
||||
{
|
||||
char timestr[10];
|
||||
time_t tm;
|
||||
char timestr[20];
|
||||
time_t tm = time(0);
|
||||
strftime((char*) ×tr, sizeof(timestr), "%H:%M:%S", localtime(&tm));
|
||||
timestr[2] = show_dot ? ':':'.';
|
||||
|
||||
tm = time(0);
|
||||
if(show_dot)
|
||||
strftime((char*) ×tr, 20, "%H:%M:%S", localtime(&tm));
|
||||
else
|
||||
strftime((char*) ×tr, 20, "%H.%M:%S", localtime(&tm));
|
||||
frameBuffer->paintBoxRel(x - time_width - 15, y, time_width, time_height, COL_MENUCONTENT_PLUS_0, RADIUS_SMALL);
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->RenderString(x - time_width- 10, y+ time_height, time_width, timestr, COL_MENUCONTENT);
|
||||
frameBuffer->paintBoxRel(x - time_width - 10, y, time_width, time_height, COL_MENUCONTENT_PLUS_0, RADIUS_SMALL);
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->RenderString(x - time_width- 5, y+ time_height, time_width, timestr, COL_MENUCONTENT);
|
||||
}
|
||||
|
||||
void* CInfoClock::TimerProc(void *arg)
|
||||
@@ -79,6 +76,6 @@ void CInfoClock::StopClock()
|
||||
if(thrTimer) {
|
||||
pthread_cancel(thrTimer);
|
||||
thrTimer = 0;
|
||||
frameBuffer->paintBackgroundBoxRel(x - time_width - 15, y, time_width, time_height);
|
||||
frameBuffer->paintBackgroundBoxRel(x - time_width - 10, y, time_width, time_height);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user