made this a little bit less weird
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12906 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -192,9 +192,10 @@ handle_keyboard_interrupt(void *data)
|
|||||||
keyInfo.timestamp = system_time();
|
keyInfo.timestamp = system_time();
|
||||||
keyInfo.scancode = scancode;
|
keyInfo.scancode = scancode;
|
||||||
|
|
||||||
while (packet_buffer_write(sKeyBuffer, (uint8 *)&keyInfo, sizeof(keyInfo)) == 0) {
|
if (packet_buffer_write(sKeyBuffer, (uint8 *)&keyInfo, sizeof(keyInfo)) == 0) {
|
||||||
// if there is no space left in the buffer, we start dropping old key strokes
|
// If there is no space left in the buffer, we drop this key stroke. We avoid
|
||||||
packet_buffer_flush(sKeyBuffer, sizeof(keyInfo));
|
// dropping old key strokes, to not destroy what already was typed.
|
||||||
|
return B_HANDLED_INTERRUPT;
|
||||||
}
|
}
|
||||||
|
|
||||||
release_sem_etc(sKeyboardSem, 1, B_DO_NOT_RESCHEDULE);
|
release_sem_etc(sKeyboardSem, 1, B_DO_NOT_RESCHEDULE);
|
||||||
|
|||||||
Reference in New Issue
Block a user