diff options
| author | Cracker64 <cracker642@gmail.com> | 2010-12-08 17:14:02 (GMT) |
|---|---|---|
| committer | Cracker64 <cracker642@gmail.com> | 2010-12-08 17:14:02 (GMT) |
| commit | cbf41389a2ac611c4829e08ede525ee4076d92d7 (patch) | |
| tree | e7e7487fec95953e46ebde3e8c77931f076e61df /src/interface.c | |
| parent | fff7ecedf811e487efdb0a65012a3502915d3cb2 (diff) | |
| download | powder-cbf41389a2ac611c4829e08ede525ee4076d92d7.zip powder-cbf41389a2ac611c4829e08ede525ee4076d92d7.tar.gz | |
Bugfix for wifi, would cause a double spark if timed just right. updated to
Diffstat (limited to 'src/interface.c')
| -rw-r--r-- | src/interface.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/interface.c b/src/interface.c index 044b65c..af679d8 100644 --- a/src/interface.c +++ b/src/interface.c @@ -1500,7 +1500,7 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int b, int bq, int mx, { if(n!=SPC_AIR&&n!=SPC_HEAT&&n!=SPC_COOL&&n!=SPC_VACUUM) { - if(x-18<=20) + if(x-18<=2) { x = XRES-BARSIZE-18; y += 19; @@ -1537,7 +1537,7 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int b, int bq, int mx, { if(n==SPC_AIR||n==SPC_HEAT||n==SPC_COOL||n==SPC_VACUUM) { - if(x-18<=20) + if(x-18<=0) { x = XRES-BARSIZE-18; y += 19; @@ -1571,7 +1571,7 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int b, int bq, int mx, { if(ptypes[n].menusection==i&&ptypes[n].menu==1) { - if(x-18<=20) + if(x-18<=0) { x = XRES-BARSIZE-18; y += 19; @@ -1608,7 +1608,7 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int b, int bq, int mx, { if(ptypes[n].menusection==i&&ptypes[n].menu==1) { - if(x-18<=20) + if(x-18<=0) { x = XRES-BARSIZE-18; y += 19; @@ -2190,7 +2190,7 @@ int search_ui(pixel *vid_buf) drawrect(vid_buf, gx-2, gy-2, XRES/GRID_S+3, YRES/GRID_S+3, 160, 160, 192, 255); else drawrect(vid_buf, gx-2, gy-2, XRES/GRID_S+3, YRES/GRID_S+3, 128, 128, 128, 255); - if(own) + if(own && search_fav!=1) { if(dp == pos) drawtext(vid_buf, gx+XRES/GRID_S-4, gy-6, "\x86", 255, 48, 32, 255); @@ -2321,7 +2321,7 @@ int search_ui(pixel *vid_buf) lasttime = TIMEOUT; } - if(b && !bq && dp!=-1) + if(b && !bq && dp!=-1 && search_fav!=0) if(confirm_ui(vid_buf, "Do you want to delete?", search_names[dp], "Delete")) { execute_delete(vid_buf, search_ids[dp]); @@ -2720,9 +2720,14 @@ int open_ui(pixel *vid_buf, char *save_id, char *save_date) if(status == 200) { pixel *full_save = prerender_save(data, data_size, &imgw, &imgh); - save_pic = rescale_img(full_save, imgw, imgh, &thumb_w, &thumb_h, 2); - data_ready = 1; - free(full_save); + if(full_save!=NULL){ + save_pic = rescale_img(full_save, imgw, imgh, &thumb_w, &thumb_h, 2); + data_ready = 1; + free(full_save); + } else { + error_ui(vid_buf, 0, "Save may be from a newer version"); + break; + } } active = 0; free(http); |
