]> git.sur5r.net Git - cc65/blobdiff - samples/mousetest.c
Merge pull request #332 from greg-king5/interrupt-functions
[cc65] / samples / mousetest.c
index 4a849cb989b7c96395cfa11942446c5599c33909..3910d5a0a17d71cfa7ec0c2d3c102bd093916d60 100644 (file)
@@ -17,6 +17,7 @@
 #include <conio.h>
 #include <ctype.h>
 #include <dbg.h>
+#include <cc65.h>
 
 #define max(a,b)  (((a) > (b)) ? (a) : (b))
 #define min(a,b)  (((a) < (b)) ? (a) : (b))
@@ -57,7 +58,9 @@ static void __fastcall__ CheckError (const char* S, unsigned char Error)
         /* Wait for a key-press, so that some platforms can show the error
         ** message before they remove the current screen.
         */
-        cgetc();
+        if (doesclrscrafterexit ()) {
+            cgetc ();
+        }
         exit (EXIT_FAILURE);
     }
 }