Prevent input_server from hogging the CPU when input devices fail.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14476 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -339,8 +339,10 @@ MouseInputDevice::DeviceWatcher(void *arg)
|
||||
BMessage *message = NULL;
|
||||
while (dev->active) {
|
||||
memset(&movements, 0, sizeof(movements));
|
||||
if (ioctl(dev->fd, MS_READ, &movements) < B_OK)
|
||||
if (ioctl(dev->fd, MS_READ, &movements) != B_OK) {
|
||||
snooze(10000); // this is a realtime thread, and something is wrong...
|
||||
continue;
|
||||
}
|
||||
|
||||
uint32 buttons = buttons_state ^ movements.buttons;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user