Added experimental feature NEW_KEYBOARD_HIT.

This commit is contained in:
Bart House
2019-07-09 22:30:34 -07:00
parent 0e8163e341
commit bc65112ce0
14 changed files with 199 additions and 3 deletions

View File

@@ -374,7 +374,11 @@ boolean resuming;
if (multi >= 0 && occupation) {
#if defined(MICRO) || defined(WIN32)
abort_lev = 0;
#ifdef NEW_KEYBOARD_HIT
if (keyboard_hit()) {
#else
if (kbhit()) {
#endif
if ((ch = pgetchar()) == ABORT)
abort_lev++;
else

View File

@@ -523,6 +523,9 @@ static void NDECL(hup_void_ndecl);
static void FDECL(hup_void_fdecl_int, (int));
static void FDECL(hup_void_fdecl_winid, (winid));
static void FDECL(hup_void_fdecl_constchar_p, (const char *));
#ifdef NEW_KEYBOARD_HIT
static boolean NDECL(hup_keyboard_hit);
#endif
static struct window_procs hup_procs = {
"hup", 0L, 0L, hup_init_nhwindows,
@@ -570,6 +573,9 @@ static struct window_procs hup_procs = {
hup_void_ndecl, /* status_finish */
genl_status_enablefield, hup_status_update,
genl_can_suspend_no,
#ifdef NEW_KEYBOARD_HIT
hup_keyboard_hit
#endif
};
static void FDECL((*previnterface_exit_nhwindows), (const char *)) = 0;
@@ -624,6 +630,14 @@ hup_nhgetch(VOID_ARGS)
return '\033'; /* ESC */
}
#ifdef NEW_KEYBOARD_HIT
static boolean
hup_keyboard_hit(VOID_ARGS)
{
return FALSE;
}
#endif
/*ARGSUSED*/
static char
hup_yn_function(prompt, resp, deflt)