Skip to content

Commit 520e2e6

Browse files
committed
Catch poll zero
1 parent 21b3f2a commit 520e2e6

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

src/input/InputPlugin.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,13 @@ var InputPlugin = new Class({
547547
return false;
548548
}
549549

550-
if (this.pollRate > 0)
550+
var rate = this.pollRate;
551+
552+
if (rate === -1)
553+
{
554+
return false;
555+
}
556+
else if (rate > 0)
551557
{
552558
this._pollTimer -= delta;
553559

@@ -562,10 +568,6 @@ var InputPlugin = new Class({
562568
return false;
563569
}
564570
}
565-
else
566-
{
567-
return false;
568-
}
569571

570572
// We got this far? Then we should poll for movement
571573
var manager = this.manager;

0 commit comments

Comments
 (0)