X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/ledger2?a=blobdiff_plain;f=src%2Frexit.c;h=c96adc9076133b82fd88ddee32039feb16f99ae8;hb=c2cef1f0fa8fc32907d6f7fcdb4268c117dee71c;hp=0b673af4c2934a2e0457aa91d3c4019d5af60374;hpb=2dccba703435158681552b8a8aefccab79eb13f3;p=plomrogue diff --git a/src/rexit.c b/src/rexit.c index 0b673af..c96adc9 100644 --- a/src/rexit.c +++ b/src/rexit.c @@ -4,13 +4,12 @@ #include /* for exit(), free(), defines EXIT_SUCESS, EXIT_FAILURE */ #include /* for printf(), perror() */ #include /* for uint8_t */ -#include /* for endwin() */ #include /* for errno */ #include "main.h" /* for world global */ #include "map.h" /* for Map struct */ #include "keybindings.h" /* for free_keybindings() */ #include "command_db.h" /* for free_command_db() */ -#include "windows.h" /* for Win struct, free_win(), free_winmeta() */ +#include "windows.h" /* for Win struct, free_win(), free_winmeta_and_endwin() */ #include "map_objects.h" /* for free_map_objects, free_map_object_defs() */ #include "misc.h" /* for unload_interface_conf() */ #include "map_object_actions.h" /* for free_map_object_actions() */ @@ -25,10 +24,6 @@ static void cleanup(); static void cleanup() { - if (cleanup_flags & CLEANUP_NCURSES) - { - endwin(); - } if (cleanup_flags & CLEANUP_MAP_OBJECTS) { free_map_objects(world.map_objs); @@ -57,9 +52,9 @@ static void cleanup() { unload_interface_conf(); } - if (cleanup_flags & CLEANUP_WIN_META) + if (cleanup_flags & CLEANUP_NCURSES) { - free_winmeta(); + free_winmeta_and_endwin(); } }