Remove comparison statement in board::start loop
This commit is contained in:
parent
28c568b04e
commit
ae85dae6e9
@ -358,14 +358,12 @@ void board::start(){
|
|||||||
//check if its time to increment the panel
|
//check if its time to increment the panel
|
||||||
if(std::chrono::duration_cast<std::chrono::milliseconds>(
|
if(std::chrono::duration_cast<std::chrono::milliseconds>(
|
||||||
start - last_panel).count() >= PANELS[i]->_time_on_screen){
|
start - last_panel).count() >= PANELS[i]->_time_on_screen){
|
||||||
i++;
|
i = ++i % PANELS_LENGTH;
|
||||||
last_panel = start;
|
|
||||||
OVERLAY->_title = PANELS[i]->_title;
|
|
||||||
}
|
|
||||||
|
|
||||||
//check if we can loop back over
|
OVERLAY->_title = PANELS[i]->_title;
|
||||||
if(i >= PANELS_LENGTH)
|
|
||||||
i = 0;
|
last_panel = start;
|
||||||
|
}
|
||||||
|
|
||||||
//clear the screen
|
//clear the screen
|
||||||
SDL_RenderClear(_renderer);
|
SDL_RenderClear(_renderer);
|
||||||
|
Loading…
Reference in New Issue
Block a user