| 543 | #ifdef AMII_GRAPHICS |
| 544 | |
| 545 | int |
| 546 | amikbhit(void) |
| 547 | { |
| 548 | struct IntuiMessage *message; |
| 549 | while (KbdBuffered < KBDBUFFER / 2) { |
| 550 | #ifdef AMIFLUSH |
| 551 | message = (struct IntuiMessage *) GetFMsg(HackPort); |
| 552 | #else |
| 553 | message = (struct IntuiMessage *) GetMsg(HackPort); |
| 554 | #endif |
| 555 | if (message) { |
| 556 | ProcessMessage(message); |
| 557 | if (lastevent.type != WEUNK && lastevent.type != WEKEY) |
| 558 | break; |
| 559 | } else |
| 560 | break; |
| 561 | } |
| 562 | return (lastevent.type == WEUNK) ? KbdBuffered : -1; |
| 563 | } |
| 564 | |
| 565 | /* |
| 566 | * Get a character from the keyboard buffer, waiting if not available. |
no test coverage detected