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:
parent
c0abfaa942
commit
16aca36dbf
6 changed files with 1778 additions and 1692 deletions
|
|
@ -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;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue