diff --git a/multiplatformLib.c b/multiplatformLib.c index f4b90a01e2f9a48c8e420e50c1c75bb44b96857a..a3e9d09256f284ca8b539b75bf288731554787d3 100644 --- a/multiplatformLib.c +++ b/multiplatformLib.c @@ -17,8 +17,10 @@ //This package is designed to do the basic operations like get char without waiting for enter or sleep //and be able to compile on multiple OS like linux and windows. +//returns the char or EOF +int getNextChar(){ -//get next character if available +} struct Vec2i getWindowSize(){ diff --git a/tests/xperiments.c b/tests/xperiments.c index 72a3203ebfc8a1de7af77ee802ccbc8b66ebe4aa..48d24fa6ed1c37831f90f356e3febcabbbaac9f3 100644 --- a/tests/xperiments.c +++ b/tests/xperiments.c @@ -48,9 +48,14 @@ void xp3(){ } void xp4(){ - Sleep(1000); - char c = _getch(); - printf("\nchar: %c\n", c); + int i; + char c; + Sleep(5000); + while(_kbhit()){ + c = getch(); + printf("%c", c); + } + } int main(int argc, char const *argv[])