From b9f15e16ccd6402bfeca4bd38f46b1381c22a62e Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sat, 12 Nov 2011 14:19:10 +0000 Subject: [PATCH] open_ui: Load correct thumbnail for dated saves --- src/interface.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/interface.c b/src/interface.c index 9c99a7a2f..a3afd8f37 100644 --- a/src/interface.c +++ b/src/interface.c @@ -3649,7 +3649,21 @@ int open_ui(pixel *vid_buf, char *save_id, char *save_date) } //Try to load the thumbnail from the cache - if(!thumb_cache_find(save_id, &thumb_data, &thumb_data_size)){ + if(save_date) + { + char * id_d_temp = malloc(strlen(save_id)+strlen(save_date)+2); + strcpy(id_d_temp, save_id); + strappend(id_d_temp, "_"); + strappend(id_d_temp, save_date); + + status = thumb_cache_find(id_d_temp, &thumb_data, &thumb_data_size); + free(id_d_temp); + } + else + { + status = thumb_cache_find(save_id, &thumb_data, &thumb_data_size); + } + if(!status){ thumb_data = NULL; } else { //We found a thumbnail in the cache, we'll draw this one while we wait for the full image to load.