mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +02:00
screensaver: allow no screensaver_timeout to show first pic only
Thats usefull when you have just one plain black pic in your
screensaver directory. So you'll get a blank screen w/o pic changes.
Origin commit data
------------------
Branch: ni/coolstream
Commit: b85aa43d87
Author: vanhofen <vanhofen@gmx.de>
Date: 2014-12-29 (Mon, 29 Dec 2014)
Origin message was:
------------------
- screensaver: allow no screensaver_timeout to show first pic only
Thats usefull when you have just one plain black pic in your
screensaver directory. So you'll get a blank screen w/o pic changes.
------------------
This commit was generated by Migit
This commit is contained in:
@@ -1278,7 +1278,7 @@ void COsdSetup::showOsdScreensaverSetup(CMenuWidget *menu_screensaver)
|
|||||||
menu_screensaver->addItem(nc);
|
menu_screensaver->addItem(nc);
|
||||||
|
|
||||||
// screensaver timeout
|
// screensaver timeout
|
||||||
nc = new CMenuOptionNumberChooser(LOCALE_SCREENSAVER_TIMEOUT, &g_settings.screensaver_timeout, true, 0, 60);
|
nc = new CMenuOptionNumberChooser(LOCALE_SCREENSAVER_TIMEOUT, &g_settings.screensaver_timeout, true, 0, 60, NULL, CRCInput::RC_nokey, NULL, 0, 0, LOCALE_OPTIONS_OFF);
|
||||||
nc->setNumberFormat(std::string("%d ") + g_Locale->getText(LOCALE_UNIT_SHORT_SECOND));
|
nc->setNumberFormat(std::string("%d ") + g_Locale->getText(LOCALE_UNIT_SHORT_SECOND));
|
||||||
nc->setHint("", LOCALE_MENU_HINT_SCREENSAVER_TIMEOUT);
|
nc->setHint("", LOCALE_MENU_HINT_SCREENSAVER_TIMEOUT);
|
||||||
menu_screensaver->addItem(nc);
|
menu_screensaver->addItem(nc);
|
||||||
|
@@ -121,11 +121,17 @@ void* CScreenSaver::ScreenSaverPrg(void* arg)
|
|||||||
PScreenSaver->ReadDir(); //TODO kill Screensaver if false
|
PScreenSaver->ReadDir(); //TODO kill Screensaver if false
|
||||||
PScreenSaver->m_frameBuffer->Clear();
|
PScreenSaver->m_frameBuffer->Clear();
|
||||||
|
|
||||||
while(1)
|
if (g_settings.screensaver_timeout)
|
||||||
{
|
{
|
||||||
PScreenSaver->PaintPicture();
|
while(1)
|
||||||
sleep(g_settings.screensaver_timeout);
|
{
|
||||||
|
PScreenSaver->PaintPicture();
|
||||||
|
sleep(g_settings.screensaver_timeout);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
PScreenSaver->PaintPicture(); //just paint first found picture
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user