I can't do a simple scanf ?!
in the example/wii/template/source/template.c I've added after the hello world! :
printf("Hello World!");
char cmd[32];
scanf("%s", cmd);
printf("you said -> %s\n", cmd);
the scanf don't wait the user input and the program continue...
It's the same with gets or fgets
the output is
you said -> Ç? (? is the mars symbol [
en.wikipedia.org])
I'm very happy that the wii reconize my virility, but I'd perfer that it wait for input...
After that I've flushed the input buffer with a
int c = 0;
while (c != '\n' && c != EOF){c = getchar();}
but the scanf don't wait more, the only differance is that the output is empty
you said ->
I've added -lwiikeyboard in the Makefile, so the LIBS is now :
LIBS := -lwiiuse -lbte -logc -lm -lwiikeyboard
any ideas ?
Edited 1 time(s). Last edit at 05/26/2010 03:36PM by TheDrev.