Skip to content
Snippets Groups Projects
Commit 4513085c authored by deuce's avatar deuce
Browse files

Support incoming DoorWay keys. In fact, if you recieve a NULL, always

ASSume that it's part of a DoorWay key.
parent b5e6a0ef
No related branches found
No related tags found
No related merge requests found
...@@ -487,6 +487,7 @@ void ansi_textattr(int attr) ...@@ -487,6 +487,7 @@ void ansi_textattr(int attr)
static void ansi_keyparse(void *par) static void ansi_keyparse(void *par)
{ {
int gotesc=0; int gotesc=0;
int gotnull=0;
char seq[64]; char seq[64];
int ch; int ch;
int i; int i;
...@@ -525,6 +526,18 @@ static void ansi_keyparse(void *par) ...@@ -525,6 +526,18 @@ static void ansi_keyparse(void *par)
sem_wait(&got_key); sem_wait(&got_key);
ch=ansi_raw_inch; ch=ansi_raw_inch;
if(gotnull) {
ansi_inch=ch<<8;
sem_post(&got_input);
/* Two-byte code, need to post twice and wait for one to
be received */
sem_wait(&used_input);
sem_wait(&goahead);
sem_post(&got_input);
sem_wait(&used_input);
gotnull=0;
continue;
}
switch(gotesc) { switch(gotesc) {
case 1: /* Escape Sequence */ case 1: /* Escape Sequence */
...@@ -594,6 +607,11 @@ static void ansi_keyparse(void *par) ...@@ -594,6 +607,11 @@ static void ansi_keyparse(void *par)
sem_post(&goahead); sem_post(&goahead);
break; break;
} }
if(ch==0) {
/* Got a NULL. ASSume this is a doorway mode char */
gotnull=1;
break;
}
ansi_inch=ch; ansi_inch=ch;
sem_post(&got_input); sem_post(&got_input);
sem_wait(&used_input); sem_wait(&used_input);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment