From ab54f920245c1ba0447cff1e3c6b93253438f043 Mon Sep 17 00:00:00 2001
From: Oliver Schmidt
Date: Tue, 21 Nov 2017 23:03:50 +0100
Subject: [PATCH] Make use of C library waitvsync().
---
samples/fire.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
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 */
--
2.39.5