1
0
mirror of https://github.com/cc65/cc65.git synced 2024-05-31 22:41:32 +00:00

Made hello program compatible with joystick-only target(s).

This commit is contained in:
Oliver Schmidt 2015-07-20 07:46:18 +02:00
parent 71530f3f5d
commit 1072f7d6f7

View 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__)
/* 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;
}