diff --git a/src/graphics.c b/src/graphics.c index ddb836898..fb3d384f5 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -2927,9 +2927,9 @@ void draw_parts(pixel *vid) void draw_wavelengths(pixel *vid, int x, int y, int h, int wl) { - fillrect(vid,x-1,y-1,30+1,h+1,64,64,64,255); // coords -1 size +1 to work around bug in fillrect - TODO: fix fillrect int i,cr,cg,cb,j; int tmp; + fillrect(vid,x-1,y-1,30+1,h+1,64,64,64,255); // coords -1 size +1 to work around bug in fillrect - TODO: fix fillrect for (i=0;i<30;i++) { if ((wl>>i)&1) diff --git a/src/interface.c b/src/interface.c index 72d710761..45cc83996 100644 --- a/src/interface.c +++ b/src/interface.c @@ -2840,11 +2840,12 @@ int open_ui(pixel *vid_buf, char *save_id, char *save_date) data = http_async_req_stop(http, &status, &data_size); if (status == 200) { + pixel *full_save; if (!data||!data_size) { error_ui(vid_buf, 0, "Save data is empty (may be corrupt)"); break; } - pixel *full_save = prerender_save(data, data_size, &imgw, &imgh); + full_save = prerender_save(data, data_size, &imgw, &imgh); if (full_save!=NULL) { save_pic = rescale_img(full_save, imgw, imgh, &thumb_w, &thumb_h, 2); data_ready = 1; diff --git a/src/main.c b/src/main.c index b06693c06..f8ea58ff7 100644 --- a/src/main.c +++ b/src/main.c @@ -1195,7 +1195,6 @@ int main(int argc, char *argv[]) int pastFPS = 0; int past = 0; pixel *vid_buf=calloc((XRES+BARSIZE)*(YRES+MENUSIZE), PIXELSIZE); - pers_bg = calloc((XRES+BARSIZE)*YRES, PIXELSIZE); void *http_ver_check; void *http_session_check = NULL; char *ver_data=NULL, *check_data=NULL, *tmp; @@ -1214,6 +1213,7 @@ int main(int argc, char *argv[]) int save_mode=0, save_x=0, save_y=0, save_w=0, save_h=0, copy_mode=0; SDL_AudioSpec fmt; int username_flash = 0, username_flash_t = 1; + pers_bg = calloc((XRES+BARSIZE)*YRES, PIXELSIZE); GSPEED = 1; /* Set 16-bit stereo audio at 22Khz */