From 531f62a5aef36c3f2abaa25cb096ac658b9057f6 Mon Sep 17 00:00:00 2001 From: nick black Date: Sun, 11 Jul 2021 00:21:54 -0400 Subject: [PATCH] notcurses-demo: remove stray notcurses_refresh() calls --- src/demo/chunli.c | 4 ++-- src/demo/whiteout.c | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/demo/chunli.c b/src/demo/chunli.c index 45125df30..ec1b000bd 100644 --- a/src/demo/chunli.c +++ b/src/demo/chunli.c @@ -13,10 +13,10 @@ chunli_draw(struct notcurses* nc, const char* ext, int count, const nccell* b){ chunli chuns[CHUNS]; char file[20]; int dimx, dimy; + ncplane_dim_yx(notcurses_stdplane_const(nc), &dimy, &dimx); struct timespec iterdelay; timespec_div(&demodelay, 10, &iterdelay); for(int i = 0 ; i < count ; ++i){ - notcurses_refresh(nc, &dimy, &dimx); snprintf(file, sizeof(file), "chunli%d.%s", i + 1, ext); chuns[i].path = find_data(file); chuns[i].ncv = ncvisual_from_file(chuns[i].path); @@ -50,7 +50,7 @@ int chunli_demo(struct notcurses* nc){ struct timespec iterdelay; timespec_div(&demodelay, 10, &iterdelay); int ret, dimx, dimy; - notcurses_refresh(nc, &dimy, &dimx); + ncplane_dim_yx(notcurses_stdplane_const(nc), &dimy, &dimx); nccell b = CELL_TRIVIAL_INITIALIZER; nccell_set_fg_alpha(&b, NCALPHA_TRANSPARENT); nccell_set_bg_alpha(&b, NCALPHA_TRANSPARENT); diff --git a/src/demo/whiteout.c b/src/demo/whiteout.c index e2397b6e3..7c50f153f 100644 --- a/src/demo/whiteout.c +++ b/src/demo/whiteout.c @@ -591,7 +591,6 @@ int witherworm_demo(struct notcurses* nc){ DEMO_RENDER(nc); } }while(key == NCKEY_RESIZE); - notcurses_refresh(nc, NULL, NULL); } ncplane_set_scrolling(n, false); return 0;