[fallin] render background to new plane #1425

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

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

Loading…
Cancel
Save