diff --git a/src/demo/normal.c b/src/demo/normal.c index 3048d3b5a..f8492ffce 100644 --- a/src/demo/normal.c +++ b/src/demo/normal.c @@ -44,7 +44,9 @@ int normal_demo(struct notcurses* nc){ if(!rgba){ goto err; } - memset(rgba, 0, sizeof(*rgba) * dy * dx); + for(int off = 0 ; off < dy * dx ; ++off){ + rgba[off] = 0xff000000; + } int y; if(dy / VSCALE % 2){ y = dy / VSCALE + 1; @@ -54,6 +56,8 @@ int normal_demo(struct notcurses* nc){ } } } + struct timespec scaled; + timespec_div(&demodelay, dy, &scaled); for(y = 0 ; y < dy / 2 ; ++y){ for(int x = 0 ; x < dx ; ++x){ if(mcell(offset(rgba, dy / 2 - y, x, dx), dy / 2 - y, x, dy, dx)){ @@ -67,11 +71,11 @@ int normal_demo(struct notcurses* nc){ goto err; } DEMO_RENDER(nc); + demo_nanosleep(nc, &scaled); } free(rgba); rgba = NULL; - struct timespec scaled; - timespec_div(&demodelay, 4, &scaled); + timespec_div(&demodelay, 8, &scaled); // we can't resize (and thus can't rotate) the standard plane, so dup it n = ncplane_dup(nstd, NULL); if(n == NULL){ diff --git a/src/lib/fill.c b/src/lib/fill.c index 23a7ead0a..1a4f0209c 100644 --- a/src/lib/fill.c +++ b/src/lib/fill.c @@ -504,9 +504,7 @@ static int rotate_merge(ncplane* n, ncplane* newp){ int dimy, dimx; ncplane_dim_yx(newp, &dimy, &dimx); -fprintf(stderr, "NEWPlen: %d/%d\n", dimy, dimx); int ret = ncplane_resize(n, 0, 0, 0, 0, 0, 0, dimy, dimx); -fprintf(stderr, "nlen: %d/%d\n", ncplane_dim_y(n), ncplane_dim_x(n)); if(ret == 0){ for(int y = 0 ; y < dimy ; ++y){ for(int x = 0 ; x < dimx ; ++x){