Space Invaders works on the desktop now
This commit is contained in:
parent
bc7ec763ca
commit
f09189c121
9 changed files with 269 additions and 116 deletions
|
|
@ -245,6 +245,16 @@ Video.prototype.initBus = function(cmp, bus, cpu, dbg)
|
|||
this.nPixelsPerCell = (16 / this.nBitsPerPixel)|0;
|
||||
this.initCache();
|
||||
}
|
||||
|
||||
/*
|
||||
* If we have an associated keyboard, then ensure that the keyboard will be notified whenever the canvas
|
||||
* gets focus and receives input.
|
||||
*/
|
||||
this.kbd = cmp.getMachineComponent("Keyboard");
|
||||
if (this.kbd && this.canvasScreen) {
|
||||
this.kbd.setBinding(this.textareaScreen? "textarea" : "canvas", "kbd", this.inputScreen);
|
||||
}
|
||||
|
||||
this.setReady();
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue