From: Oliver Schmidt Date: Tue, 21 Nov 2017 22:03:50 +0000 (+0100) Subject: Make use of C library waitvsync(). X-Git-Tag: V2.17~68 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ab54f920245c1ba0447cff1e3c6b93253438f043;p=cc65 Make use of C library waitvsync(). --- diff --git a/samples/fire.c b/samples/fire.c index 44eb07c88..40eff0707 100644 --- a/samples/fire.c +++ b/samples/fire.c @@ -17,6 +17,7 @@ #include /* for memset */ #include #include +#include @@ -60,9 +61,9 @@ #ifdef DOVSYNC -# define waitvsync() while ((signed char)VIC.ctrl1 >= 0) +# define WAITVSYNC() waitvsync() #else -# define waitvsync() +# define WAITVSYNC() #endif @@ -203,12 +204,12 @@ int main (void) while (!kbhit()) { /* Build page 1, then make it visible */ fire (SCREEN1); - waitvsync (); + WAITVSYNC (); outb (&VIC.addr, PAGE1); /* Build page 2, then make it visible */ fire (SCREEN2); - waitvsync (); + WAITVSYNC (); outb (&VIC.addr, PAGE2); /* Count frames */