95 |
bool found = false; |
bool found = false; |
96 |
int tries = 0; |
int tries = 0; |
97 |
|
|
98 |
|
if (screenItems.size() > 0) { //only try if we have a any screens |
99 |
|
while (found == false && tries <= screenItems.size()) { //find next with valid display time |
100 |
|
tries++; |
101 |
|
currentItemIdx = (currentItemIdx+1) % screenItems.size(); |
102 |
|
currentItem = screenItems.at(currentItemIdx); |
103 |
|
|
104 |
while (found == false && tries <= screenItems.size()) { //find next with valid display time |
if (currentItem.start <= now && now <= currentItem.stop ) |
105 |
tries++; |
found = true; |
106 |
currentItemIdx = (currentItemIdx+1) % screenItems.size(); |
} |
|
currentItem = screenItems.at(currentItemIdx); |
|
|
|
|
|
if (currentItem.start <= now && now <= currentItem.stop ) |
|
|
found = true; |
|
107 |
} |
} |
108 |
|
|
109 |
if (found) { |
if (found) { |