From 308e87fc1113b277c4b66cfa79afad15d30a55e4 Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Fri, 3 Jun 2011 22:12:06 +0000 Subject: [PATCH] The ioctl for reading mouse parameters was missing the structure size. This would cause it to randomly fail and exit the loop, resulting in the mouse going unresponsive. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41894 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/input_server/devices/mouse/MouseInputDevice.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/add-ons/input_server/devices/mouse/MouseInputDevice.cpp b/src/add-ons/input_server/devices/mouse/MouseInputDevice.cpp index 34551742f6..1ab78801dd 100644 --- a/src/add-ons/input_server/devices/mouse/MouseInputDevice.cpp +++ b/src/add-ons/input_server/devices/mouse/MouseInputDevice.cpp @@ -393,7 +393,8 @@ MouseDevice::_ControlThread() nextTransferTime += kTransferDelay; #endif - if (ioctl(fDevice, MS_READ, &movements) != B_OK) { + if (ioctl(fDevice, MS_READ, &movements, sizeof(movements)) != B_OK) { + LOG_ERR("Mouse device exiting, %s\n", strerror(errno)); _ControlThreadCleanup(); // TOAST! return;