ncplane_erase() at the beginning of viewdemo #194

This commit is contained in:
nick black 2019-12-22 01:18:49 -05:00
parent c3fa7ea664
commit d50ee9ec50
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC
2 changed files with 2 additions and 1 deletions

View File

@ -549,7 +549,7 @@ int bleachworm_demo(struct notcurses* nc){
cell c;
struct timespec screenend;
clock_gettime(CLOCK_MONOTONIC, &screenend);
ns_to_timespec(timespec_to_ns(&screenend) + 2 * timespec_to_ns(&demodelay), &screenend);
ns_to_timespec(timespec_to_ns(&screenend) + 5 * timespec_to_ns(&demodelay), &screenend);
do{ // (re)draw a screen
const int start = starts[i];
int step = steps[i];

View File

@ -70,6 +70,7 @@ int view_demo(struct notcurses* nc){
ncplane_dim_yx(ncp, &dimy, &dimx);
int averr = 0;
char* pic = find_data("PurpleDrank.jpg");
ncplane_erase(ncp);
struct ncvisual* ncv = ncplane_visual_open(ncp, pic, &averr);
if(ncv == NULL){
free(pic);