v1.16.3 refinements continue

Keyboard handling in JavaScript is a nightmare; mapping physical keyboard events to simulated keyboard events is a nightmare within a nightmare
This commit is contained in:
Jeff Parsons 2014-12-11 00:46:12 -08:00 committed by jeffpar
commit 16aca36dbf
6 changed files with 1778 additions and 1692 deletions

View file

@ -2070,22 +2070,24 @@ Video.prototype.getInput = function(mouse)
*/
Video.prototype.lockPointer = function(fLock)
{
var fSuccess = false;
if (this.inputScreen) {
if (fLock) {
if (this.inputScreen.lockPointer) {
this.inputScreen.lockPointer();
this.mouse.notifyPointerLocked(true);
return true;
fSuccess = true;
}
} else {
if (this.inputScreen.unlockPointer) {
this.inputScreen.unlockPointer();
this.mouse.notifyPointerLocked(false);
return true;
fSuccess = true;
}
}
this.setFocus();
}
return false;
return fSuccess;
};
/**