mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-02 09:40:15 +00:00
jungle/normal: improve behavior under ASCII mode #696
This commit is contained in:
parent
a10ba4dac6
commit
2b89b0850c
@ -26590,6 +26590,11 @@ int jungle_demo(struct notcurses* nc){
|
||||
if(!notcurses_canchangecolor(nc)){
|
||||
return 0; // skip
|
||||
}
|
||||
// FIXME once we rewrite the garbage below using a modern ncvisual, we
|
||||
// can rely on blitter degradation, and run this in ASCII mode.
|
||||
if(!notcurses_canutf8(nc)){
|
||||
return 0;
|
||||
}
|
||||
struct timespec start, now;
|
||||
clock_gettime(CLOCK_MONOTONIC_RAW, &start);
|
||||
size_t have = 0, out = 0;
|
||||
@ -26623,6 +26628,7 @@ int jungle_demo(struct notcurses* nc){
|
||||
}
|
||||
int dimx, dimy;
|
||||
struct ncplane* n = notcurses_stddim_yx(nc, &dimy, &dimx);
|
||||
// FIXME rewrite all of this using modern ncvisual, sheesh
|
||||
dimy *= 2; // use half blocks
|
||||
const int xiter = ORIGWIDTH / dimx + !!(ORIGWIDTH % dimx);
|
||||
const int yiter = ORIGHEIGHT / dimy + !!(ORIGHEIGHT % dimy);
|
||||
|
@ -196,10 +196,12 @@ int normal_demo(struct notcurses* nc){
|
||||
if(n == NULL){
|
||||
goto err;
|
||||
}
|
||||
ncplane_erase(nstd);
|
||||
ncplane_cursor_move_yx(n, 0, 0);
|
||||
if(rotate_plane(nc, n)){
|
||||
goto err;
|
||||
if(notcurses_canutf8(nc)){
|
||||
ncplane_erase(nstd);
|
||||
ncplane_cursor_move_yx(n, 0, 0);
|
||||
if(rotate_plane(nc, n)){
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
ncplane_cursor_move_yx(n, 0, 0);
|
||||
uint64_t tl, tr, bl, br;
|
||||
|
Loading…
Reference in New Issue
Block a user