forked from mirrors/kolyah35-minecraft-pe-0.6.1
the whole game
This commit is contained in:
parent
816e9060b4
commit
f0617a5d22
2069 changed files with 581500 additions and 0 deletions
27
src/raknet/Getche.cpp
Executable file
27
src/raknet/Getche.cpp
Executable file
|
|
@ -0,0 +1,27 @@
|
|||
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include <conio.h> /* getche() */
|
||||
#elif defined(__S3E__)
|
||||
|
||||
#else
|
||||
|
||||
#include "Getche.h"
|
||||
|
||||
char getche()
|
||||
{
|
||||
|
||||
|
||||
struct termios oldt,
|
||||
newt;
|
||||
char ch;
|
||||
tcgetattr( STDIN_FILENO, &oldt );
|
||||
newt = oldt;
|
||||
newt.c_lflag &= ~( ICANON | ECHO );
|
||||
tcsetattr( STDIN_FILENO, TCSANOW, &newt );
|
||||
ch = getchar();
|
||||
tcsetattr( STDIN_FILENO, TCSANOW, &oldt );
|
||||
return ch;
|
||||
|
||||
}
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue