mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-02 09:40:15 +00:00
statepixel: don't use alternate screen #1704
This commit is contained in:
parent
aecd9242ec
commit
7aea2147d4
@ -18,6 +18,9 @@ across_row(struct notcurses* nc, int y, struct ncplane* n, struct ncplane* t,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// we should see the 1x1 white cell move across the face of the sprixel, hiding
|
||||||
|
// that cell of the sprixel, but leaving all others as they were. there ought
|
||||||
|
// be no flicker.
|
||||||
static int
|
static int
|
||||||
handle(struct notcurses* nc, const char* fn){
|
handle(struct notcurses* nc, const char* fn){
|
||||||
struct ncvisual* ncv = ncvisual_from_file(fn);
|
struct ncvisual* ncv = ncvisual_from_file(fn);
|
||||||
@ -57,6 +60,7 @@ handle(struct notcurses* nc, const char* fn){
|
|||||||
if(across_row(nc, y, n, t, &ds)){
|
if(across_row(nc, y, n, t, &ds)){
|
||||||
ncplane_destroy(n);
|
ncplane_destroy(n);
|
||||||
ncvisual_destroy(ncv);
|
ncvisual_destroy(ncv);
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// now make it big and throw it over the bottom
|
// now make it big and throw it over the bottom
|
||||||
@ -87,7 +91,9 @@ int main(int argc, char **argv){
|
|||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
char** a = argv + 1;
|
char** a = argv + 1;
|
||||||
struct notcurses_options opts = { };
|
struct notcurses_options opts = {
|
||||||
|
.flags = NCOPTION_NO_ALTERNATE_SCREEN,
|
||||||
|
};
|
||||||
struct notcurses* nc = notcurses_init(&opts, NULL);
|
struct notcurses* nc = notcurses_init(&opts, NULL);
|
||||||
if(notcurses_check_pixel_support(nc) <= 0){
|
if(notcurses_check_pixel_support(nc) <= 0){
|
||||||
notcurses_stop(nc);
|
notcurses_stop(nc);
|
||||||
|
Loading…
Reference in New Issue
Block a user