]> git.sur5r.net Git - cc65/blobdiff - samples/hello.c
Merge pull request #249 from polluks/master
[cc65] / samples / hello.c
index 90a1d4bdcee00562653ab64d1085c11b400db85c..78c28af89ca6b1b705e70c60ae9361c58dd20910 100644 (file)
@@ -10,7 +10,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <conio.h>
-#include <dbg.h>
+#include <joystick.h>
 
 
 
@@ -68,15 +68,23 @@ int main (void)
     gotoxy ((XSize - strlen (Text)) / 2, YSize / 2);
     cprintf ("%s", Text);
 
+#if defined(__NES__) || defined(__PCE__)
+
+    /* Wait for the user to press a button */
+    joy_install (joy_static_stddrv);
+    while (!joy_read (JOY_1)) ;
+    joy_uninstall ();
+
+#else
+
     /* Wait for the user to press a key */
     (void) cgetc ();
 
+#endif
+
     /* Clear the screen again */
     clrscr ();
 
     /* Done */
     return EXIT_SUCCESS;
 }
-
-
-