diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main-menu.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main-menu.c b/src/main-menu.c index 5909e51..2a0ace8 100644 --- a/src/main-menu.c +++ b/src/main-menu.c @@ -116,7 +116,6 @@ db_main_menu(void) /* Render background */ SDL_SetRenderDrawColor(renderer, 0x7F, 0x7F, 0x7F, 0xFF); - SDL_RenderClear(renderer); text_color.r = 0x00; text_color.g = 0x00; @@ -142,8 +141,6 @@ db_main_menu(void) } dest_rect.x = 16; dest_rect.y = 16; - SDL_RenderCopy(renderer, texture_title, NULL, &dest_rect); - SDL_DestroyTexture(texture_title); TTF_CloseFont(font); font = TTF_OpenFont(font_path, 16); @@ -336,6 +333,8 @@ db_main_menu(void) default: break; } + SDL_RenderClear(renderer); + SDL_RenderCopy(renderer, texture_title, NULL, &dest_rect); for (i = 0; i < n + 2; ++i) { if (buttons[i] == active) { SDL_RenderCopy(renderer, @@ -356,4 +355,5 @@ db_main_menu(void) err: free(font_path); TTF_CloseFont(font); + SDL_DestroyTexture(texture_title); } |