diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2011-11-12 14:19:10 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2011-11-12 14:19:10 (GMT) |
| commit | b9f15e16ccd6402bfeca4bd38f46b1381c22a62e (patch) | |
| tree | 5b11fe72e1ee8caac609f0b5ce963b73700cf282 /src/interface.c | |
| parent | 859022ccb1fb35e6606a218b9a924fcef6183bf2 (diff) | |
| download | powder-b9f15e16ccd6402bfeca4bd38f46b1381c22a62e.zip powder-b9f15e16ccd6402bfeca4bd38f46b1381c22a62e.tar.gz | |
open_ui: Load correct thumbnail for dated saves
Diffstat (limited to 'src/interface.c')
| -rw-r--r-- | src/interface.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/interface.c b/src/interface.c index 9c99a7a..a3afd8f 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. |
