fix bug #140
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16324 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -753,18 +753,22 @@ KeyboardInputDevice::DeviceWatcher(void *arg)
|
|||||||
|
|
||||||
if (numBytes2<=0) {
|
if (numBytes2<=0) {
|
||||||
numBytes2 = 1;
|
numBytes2 = 1;
|
||||||
|
delete[] str2;
|
||||||
str2 = str;
|
str2 = str;
|
||||||
}
|
} else
|
||||||
|
delete[] str;
|
||||||
|
|
||||||
if (is_keydown && (lastKeyCode == keycode)) {
|
if (is_keydown && (lastKeyCode == keycode)) {
|
||||||
repeatCount++;
|
repeatCount++;
|
||||||
msg->AddInt32("be:key_repeat", repeatCount);
|
msg->AddInt32("be:key_repeat", repeatCount);
|
||||||
} else
|
} else
|
||||||
repeatCount = 1;
|
repeatCount = 1;
|
||||||
}
|
} else
|
||||||
|
delete[] str;
|
||||||
|
|
||||||
if (numBytes2>0)
|
if (numBytes2>0)
|
||||||
msg->AddInt32("raw_char", (uint32)((uint8)str2[0] & 0x7f));
|
msg->AddInt32("raw_char", (uint32)((uint8)str2[0] & 0x7f));
|
||||||
|
delete[] str2;
|
||||||
|
|
||||||
if (dev->owner->EnqueueMessage(msg)!=B_OK)
|
if (dev->owner->EnqueueMessage(msg)!=B_OK)
|
||||||
delete msg;
|
delete msg;
|
||||||
|
|||||||
Reference in New Issue
Block a user