mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-02 09:40:15 +00:00
demo: preserve plot/hud/etc. on shutdown
If we're using -k to inhibit use of the alternate screen for notcurses-demo, we want to see what was on the screen when we quit. If we're actually quitting, don't destroy these components manually, so they remain visible.
This commit is contained in:
parent
a7f59e4fab
commit
9b7238fdc9
@ -584,6 +584,7 @@ int main(int argc, char** argv){
|
|||||||
if(ext_demos(nc, spec, ignore_failures)){
|
if(ext_demos(nc, spec, ignore_failures)){
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
if(restart_demos){
|
||||||
if(hud_destroy()){ // destroy here since notcurses_drop_planes will kill it
|
if(hud_destroy()){ // destroy here since notcurses_drop_planes will kill it
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
@ -591,6 +592,7 @@ int main(int argc, char** argv){
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
about_destroy(nc);
|
about_destroy(nc);
|
||||||
|
}
|
||||||
}while(restart_demos);
|
}while(restart_demos);
|
||||||
ncmenu_destroy(menu);
|
ncmenu_destroy(menu);
|
||||||
if(stop_input()){
|
if(stop_input()){
|
||||||
|
Loading…
Reference in New Issue
Block a user