From bf16f3fe7d75c4d7b7bbc6f080930d72c6a93e6b Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Sat, 9 Feb 2019 04:10:36 +0100 Subject: [PATCH] Atari: Exit_handler --- src/main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main.c b/src/main.c index c06fb317..73259c35 100644 --- a/src/main.c +++ b/src/main.c @@ -592,6 +592,13 @@ CT_ASSERT(sizeof(T_Components)==3); // when sizeof(T_Palette) is not 768. CT_ASSERT(sizeof(T_Palette)==768); +#if defined(__MINT__) +static void Exit_handler(void) +{ + printf("Press any key to quit.\n"); + (void)Cnecin(); +} +#endif /** * Initialize the program. @@ -621,6 +628,7 @@ int Init_program(int argc,char * argv[]) printf(" /|\\ GrafX2 %.19s\n", Program_version); printf(" compilation date: %.16s\n", __DATE__); printf("===============================\n"); + atexit(Exit_handler); #endif #ifdef ENABLE_FILENAMES_ICONV