When Emulate3Button is active, do not set select() timeout in states when
it is not needed. No need to kick CPU every 20ms without a purpose. Reviewed by: philip@
This commit is contained in:
parent
e645e40d6b
commit
5972528548
@ -1090,7 +1090,8 @@ moused(void)
|
||||
FD_SET(rodent.mremcfd, &fds);
|
||||
|
||||
c = select(FD_SETSIZE, &fds, NULL, NULL,
|
||||
(rodent.flags & Emulate3Button) ? &timeout : NULL);
|
||||
((rodent.flags & Emulate3Button) &&
|
||||
S_DELAYED(mouse_button_state)) ? &timeout : NULL);
|
||||
if (c < 0) { /* error */
|
||||
logwarn("failed to read from mouse");
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user