projects
/
retroray
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
stop appending repeat keys to the input buffer
[retroray]
/
src
/
dos
/
keyb.c
diff --git
a/src/dos/keyb.c
b/src/dos/keyb.c
index
6b00866
..
8789ea7
100644
(file)
--- a/
src/dos/keyb.c
+++ b/
src/dos/keyb.c
@@
-73,7
+73,7
@@
static unsigned char keystate[512];
void kb_init(void)
{
if(DONE_INIT) {
void kb_init(void)
{
if(DONE_INIT) {
- fprintf(stderr, "keyboard driver already initialized!\n");
+ errormsg("keyboard driver already initialized!\n");
return;
}
return;
}
@@
-238,7
+238,7
@@
static void INTERRUPT kbintr()
c = (keystate[KEY_LSHIFT] | keystate[KEY_RSHIFT]) ? scantbl_shift[code] : key;
}
c = (keystate[KEY_LSHIFT] | keystate[KEY_RSHIFT]) ? scantbl_shift[code] : key;
}
- if(press) {
+ if(press && !keystate[key]) {
/* append to buffer */
last_key = c;
buffer[buf_widx] = c;
/* append to buffer */
last_key = c;
buffer[buf_widx] = c;