summaryrefslogtreecommitdiff
path: root/userspace/snake.c
diff options
context:
space:
mode:
Diffstat (limited to 'userspace/snake.c')
-rw-r--r--userspace/snake.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/userspace/snake.c b/userspace/snake.c
index aedf191..8352d1b 100644
--- a/userspace/snake.c
+++ b/userspace/snake.c
@@ -3,11 +3,23 @@
int main()
{
printf("Hello I am FoolSnake 0.1\n");
- printf("setvbuf returned %i",setvbuf(stdin,NULL,_IONBF,0));
+ printf("setvbuf returned %i\n",setvbuf(stdin,NULL,_IONBF,0));
+
+ fool_tune(1,0,0); // activate gaming mode
while(1)
{
- printf("%c",fgetc(stdin));
+ while(!has_data_waiting())
+ {
+
+ }
+
+ char c=fgetc(stdin);
+ printf("[%c]\n",c);
+ if(c=='q')break;
+
}
+
+ fool_tune(0,0,0); // de-activate gaming mode
}