mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04: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,13 +584,15 @@ int main(int argc, char** argv){
|
||||
if(ext_demos(nc, spec, ignore_failures)){
|
||||
goto err;
|
||||
}
|
||||
if(hud_destroy()){ // destroy here since notcurses_drop_planes will kill it
|
||||
goto err;
|
||||
if(restart_demos){
|
||||
if(hud_destroy()){ // destroy here since notcurses_drop_planes will kill it
|
||||
goto err;
|
||||
}
|
||||
if(fpsgraph_stop(nc)){
|
||||
goto err;
|
||||
}
|
||||
about_destroy(nc);
|
||||
}
|
||||
if(fpsgraph_stop(nc)){
|
||||
goto err;
|
||||
}
|
||||
about_destroy(nc);
|
||||
}while(restart_demos);
|
||||
ncmenu_destroy(menu);
|
||||
if(stop_input()){
|
||||
|
Loading…
x
Reference in New Issue
Block a user