From 1072f7d6f7f343b4dcc48739d482f01a2abc24fb Mon Sep 17 00:00:00 2001
From: Oliver Schmidt 
Date: Mon, 20 Jul 2015 07:46:18 +0200
Subject: [PATCH] Made hello program compatible with joystick-only target(s).
---
 samples/hello.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/samples/hello.c b/samples/hello.c
index 90a1d4bdc..749a9d859 100644
--- a/samples/hello.c
+++ b/samples/hello.c
@@ -10,7 +10,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 
 
 
@@ -68,15 +68,23 @@ int main (void)
     gotoxy ((XSize - strlen (Text)) / 2, YSize / 2);
     cprintf ("%s", Text);
 
+#if defined(__NES__)
+
+    /* 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;
 }
-
-
-
-- 
2.39.5