File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 88
99#include "common.h"
1010
11+ #ifdef __EMX__
12+ #define INCL_DOS
13+ #define INCL_KBD
14+ #define INCL_VIO
15+ #include <os2.h>
16+ #include <stdlib.h>
17+ #include <conio.h>
18+ int kbhit (void ) {
19+ KBDKEYINFO k ;
20+ if (KbdPeek (& k , 0 ))
21+ return 0 ;
22+ return (k .fbStatus & KBDTRF_FINAL_CHAR_IN );
23+ }
24+ #endif
1125#if defined(_WIN32 ) || defined(__OS2__ ) || defined(__DJGPP__ ) || defined(_DOS )
1226#include <conio.h>
1327#endif
@@ -70,7 +84,7 @@ static int read_key(void)
7084 char key ;
7185 int ret = 0 ;
7286
73- #if defined(_WIN32 ) || defined(__OS2__ ) || defined(__DJGPP__ ) || defined(_DOS )
87+ #if defined(_WIN32 ) || defined(__OS2__ ) || defined(__EMX__ ) || defined( __DJGPP__ ) || defined(_DOS )
7488 if (kbhit ()) {
7589 key = getch ();
7690 ret = 1 ;
You can’t perform that action at this time.
0 commit comments