[fallin] render background to new plane #1425

pull/1428/head
nick black 4 years ago committed by Nick Black
parent 9b9bf83863
commit 7e03705ffb

@ -183,7 +183,7 @@ int fallin_demo(struct notcurses* nc){
x += newx; x += newx;
} }
} }
ncplane_erase(stdn); struct ncplane* n = NULL;
#ifndef DFSG_BUILD #ifndef DFSG_BUILD
if(notcurses_canopen_images(nc)){ if(notcurses_canopen_images(nc)){
char* path = find_data("lamepatents.jpg"); char* path = find_data("lamepatents.jpg");
@ -193,11 +193,10 @@ int fallin_demo(struct notcurses* nc){
goto err; goto err;
} }
struct ncvisual_options vopts = { struct ncvisual_options vopts = {
.n = stdn,
.scaling = NCSCALE_STRETCH, .scaling = NCSCALE_STRETCH,
.blitter = NCBLIT_PIXEL, .blitter = NCBLIT_PIXEL,
}; };
if(ncvisual_render(nc, ncv, &vopts) == NULL){ if((n = ncvisual_render(nc, ncv, &vopts)) == NULL){
ncvisual_destroy(ncv); ncvisual_destroy(ncv);
goto err; goto err;
} }
@ -208,6 +207,7 @@ int fallin_demo(struct notcurses* nc){
int ret = drop_bricks(nc, arr, arrcount); int ret = drop_bricks(nc, arr, arrcount);
free(arr); free(arr);
free(usemap); free(usemap);
ncplane_destroy(n);
return ret; return ret;
err: err:

Loading…
Cancel
Save