X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fdos%2Fkeyb.c;h=55b90134de8715c902aa3c04f581ae73197967cc;hb=b0159ee29e4e616e4506d3cea5aee6ecc97aa93a;hp=36a6021a8e288cfcf115f6916d14bad0fd37dfb3;hpb=6819a099c49a569221321a46a52811aead65d20e;p=dosdemo
diff --git a/src/dos/keyb.c b/src/dos/keyb.c
index 36a6021..55b9013 100644
--- a/src/dos/keyb.c
+++ b/src/dos/keyb.c
@@ -28,7 +28,6 @@ along with the program. If not, see
#include
#endif
#ifdef __DJGPP__
-#include
#include
#include
#include
@@ -36,6 +35,7 @@ along with the program. If not, see
#include "keyb.h"
#include "scancode.h"
+#include "inttypes.h"
#define KB_INTR 0x9
#define KB_PORT 0x60
@@ -161,10 +161,12 @@ void kb_wait(void)
{
int key;
while((key = kb_getkey()) == -1) {
+#ifdef USE_HLT
/* put the processor to sleep while waiting for keypresses, but first
* make sure interrupts are enabled, or we'll sleep forever
*/
halt();
+#endif
}
kb_putback(key);
}