Screeansaver: add optional random images

Origin commit data
------------------
Branch: ni/coolstream
Commit: ff667dfef3
Author: Thilo Graf <dbt@novatux.de>
Date: 2015-12-27 (Sun, 27 Dec 2015)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
2015-12-27 19:46:14 +01:00
parent 8b6edba743
commit 1dedce338b
8 changed files with 22 additions and 1 deletions

View File

@@ -234,7 +234,11 @@ void CScreenSaver::PaintPicture()
dprintf(DEBUG_INFO, "[CScreenSaver] %s - %d : %s\n", __func__, __LINE__, v_bg_files.at(index).c_str());
m_viewer->ShowImage(v_bg_files.at(index).c_str(), false /*unscaled*/);
index++;
if (!g_settings.screensaver_random)
index++;
else
index = rand() % v_bg_files.size();
if(index == v_bg_files.size())
index = 0;
}