diff options
author | P. J. McDermott <pj@pehjota.net> | 2021-03-18 19:27:54 (EDT) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2021-03-18 19:27:54 (EDT) |
commit | b3c3497499f0346ccd952e8398f2b0bdb3da32ed (patch) | |
tree | 0db889776289574b57f1d045b2983cba23e18033 | |
parent | a086752f5c2f70275f98b8698598db337fca498a (diff) | |
download | dodge-balls-b3c3497499f0346ccd952e8398f2b0bdb3da32ed.zip dodge-balls-b3c3497499f0346ccd952e8398f2b0bdb3da32ed.tar.gz dodge-balls-b3c3497499f0346ccd952e8398f2b0bdb3da32ed.tar.bz2 |
main-menu: Wrap rendering in stub loop
-rw-r--r-- | src/main-menu.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/main-menu.c b/src/main-menu.c index 3d13986..613de69 100644 --- a/src/main-menu.c +++ b/src/main-menu.c @@ -277,19 +277,22 @@ db_main_menu(void) active = buttons[1]; } - for (i = 0; i < n + 2; ++i) { - if (buttons[i] == active) { - SDL_RenderCopy(renderer, buttons[i]->texture_over, NULL, - &buttons[i]->rect); - } else { - SDL_RenderCopy(renderer, buttons[i]->texture_text, NULL, - &buttons[i]->rect); + while (1) { + for (i = 0; i < n + 2; ++i) { + if (buttons[i] == active) { + SDL_RenderCopy(renderer, + buttons[i]->texture_over, NULL, + &buttons[i]->rect); + } else { + SDL_RenderCopy(renderer, + buttons[i]->texture_text, NULL, + &buttons[i]->rect); + } } + SDL_RenderPresent(renderer); + SDL_Delay(1000); break; } - SDL_RenderPresent(renderer); - SDL_Delay(1000); - err: free(font_path); TTF_CloseFont(font); |