summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main-menu.c23
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);