|
|
@ -297,8 +297,9 @@ notcurses_render_internal(notcurses* nc, struct crender* rvec){
|
|
|
|
if(reshape_shadow_fb(nc)){
|
|
|
|
if(reshape_shadow_fb(nc)){
|
|
|
|
return -1;
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
int dimy, dimx;
|
|
|
|
// don't use ncplane_dim_yx()/ncplane_yx() here, lest we deadlock
|
|
|
|
notcurses_term_dim_yx(nc, &dimy, &dimx);
|
|
|
|
int dimy = nc->stdscr->leny;
|
|
|
|
|
|
|
|
int dimx = nc->stdscr->lenx;
|
|
|
|
cell* fb = malloc(sizeof(*fb) * dimy * dimx);
|
|
|
|
cell* fb = malloc(sizeof(*fb) * dimy * dimx);
|
|
|
|
for(int y = 0 ; y < dimy ; ++y){
|
|
|
|
for(int y = 0 ; y < dimy ; ++y){
|
|
|
|
for(int x = 0 ; x < dimx ; ++x){
|
|
|
|
for(int x = 0 ; x < dimx ; ++x){
|
|
|
@ -677,12 +678,12 @@ int notcurses_render(notcurses* nc){
|
|
|
|
bytes = notcurses_rasterize(nc, crender);
|
|
|
|
bytes = notcurses_rasterize(nc, crender);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
free(crender);
|
|
|
|
free(crender);
|
|
|
|
int dimy, dimx;
|
|
|
|
|
|
|
|
notcurses_resize(nc, &dimy, &dimx);
|
|
|
|
|
|
|
|
clock_gettime(CLOCK_MONOTONIC_RAW, &done);
|
|
|
|
clock_gettime(CLOCK_MONOTONIC_RAW, &done);
|
|
|
|
update_render_stats(&done, &start, &nc->stats, bytes);
|
|
|
|
update_render_stats(&done, &start, &nc->stats, bytes);
|
|
|
|
ret = bytes >= 0 ? 0 : -1;
|
|
|
|
ret = bytes >= 0 ? 0 : -1;
|
|
|
|
pthread_cleanup_pop(1);
|
|
|
|
pthread_cleanup_pop(1);
|
|
|
|
|
|
|
|
int dimy, dimx;
|
|
|
|
|
|
|
|
notcurses_resize(nc, &dimy, &dimx);
|
|
|
|
return ret;
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|