Fixed checkSoftKeysToRelease(), although the iOS soft keyboard still sucks
This commit is contained in:
parent
999828da4e
commit
c59678f37d
3 changed files with 9 additions and 9 deletions
|
|
@ -90,9 +90,9 @@ var Z={ia:{ba:130,Hb:1,Gb:2,Fb:4,Eb:8,Ib:16,ib:32,Pc:64,oc:128}},lc={"1p":49,"2p
|
|||
Y.prototype.R=function(a,b,c){var d=this,e=a+"-"+b;if(void 0===this.w[e]){if("led"==a&&nc[b])return this.w[e]=c,!0;switch(b){case "kbd":return c.onkeydown=function(a){return oc(d,a,!0)},c.onkeyup=function(a){return oc(d,a,!1)},!0;default:if(void 0!==lc[b])return this.w[e]=c,a=function(a,b){return function(){pc(a,b,!0)}}(this,b),b=function(a,b){return function(){pc(a,b,!1)}}(this,b),"ontouchstart"in window?(c.ontouchstart=a,c.ontouchend=b):(c.onmousedown=a,c.onmouseup=c.onmouseout=b),!0}}return!1};
|
||||
Y.prototype.ha=function(a,b,c,d){this.K=d;this.D=Oa(a,"ChipSet");this.T=this.D.T;switch(this.T){case cc.X:this.b=Z}this.b&&(Za(b,this,this.b.Sa),$a(b,this,this.b.Ta))};Y.prototype.Y=function(a,b){if(!b)if(!a)this.reset();else if(!this.restore(a))return!1;return!0};Y.prototype.ea=function(a){return a?this.save():!0};Z.za=[[0]];Y.prototype.reset=function(){this.l={};this.a={};this.b&&!this.restore(this.b.za)&&this.I("reset error")};
|
||||
Y.prototype.save=function(){var a=new I(this);switch(this.T){case cc.X:K(a,0,[this.c])}return a.data()};Y.prototype.restore=function(a){var b;if(a&&(b=a[0])&&b.length)switch(this.T){case X.X:return!0;case cc.X:return this.c=b[0],qc(this),!0}return!1};function qc(a){for(var b in nc){var c=a.w["led-"+b];if(c){var d=nc[b],e=!!(a.c&d);d&d-1&&(e=!(a.c&~d));c.style.backgroundColor=e?"#ff0000":"#000000"}}}
|
||||
function oc(a,b,c){var d=!0,e;a:{e=b.keyCode;e=mc[e]||e;for(var f in lc)if(lc[f]===e){e=f;break a}e=null}e&&(d=pc(a,e,c));d||b.preventDefault();return d}
|
||||
function oc(a,b,c){var d=!0,e;a:{e=b.keyCode;e=mc[e]||e;for(var f in lc)if(lc[f]===e){e=f;break a}e=null}e&&(d=pc(a,e,c),b.preventDefault());return d}
|
||||
function pc(a,b,c){if(c)a.l[b]=Date.now(),delete a.a[b];else{var d=a.l[b];if(d&&100>Date.now()-d)return a.a[b]=d,rc(a),!0;delete a.l[b]}if(a.D)switch(b){case "1p":dc(a.D,X.ja.Jb,c);break;case "2p":dc(a.D,X.ja.Nb,c);break;case "coin":dc(a.D,X.ja.Db,c);break;case "left":dc(a.D,X.ja.Lb,c);break;case "right":dc(a.D,X.ja.Mb,c);break;case "fire":dc(a.D,X.ja.Kb,c)}return!0}
|
||||
function rc(a){var b=-1,c=Object.keys(a.a),d;for(d in c)if(c=100-(Date.now()-a.a[d]),0<c){if(0>b||b>c)b=c}else delete a.a[d],pc(a,d,!1);0<=b&&setTimeout(function(){rc(a)},b)}Y.prototype.f=function(a,b){this.c=b;qc(this)};Z.Sa={};Z.Ta={130:Y.prototype.f};ta(function(){for(var a=D(document,"pc8080","keyboard"),b=0;b<a.length;b++){var c=a[b],d=C(c),d=new Y(d);Ia(d,c)}});
|
||||
function rc(a){for(var b=-1,c=Object.keys(a.a),d=0;d<c.length;d++){var e=c[d],f=100-(Date.now()-a.a[e]);if(0<f){if(0>b||b>f)b=f}else delete a.a[e],pc(a,e,!1)}0<=b&&setTimeout(function(){rc(a)},b)}Y.prototype.f=function(a,b){this.c=b;qc(this)};Z.Sa={};Z.Ta={130:Y.prototype.f};ta(function(){for(var a=D(document,"pc8080","keyboard"),b=0;b<a.length;b++){var c=a[b],d=C(c),d=new Y(d);Ia(d,c)}});
|
||||
function sc(a,b,c,d,e){var f=this;this.lb=oa("Gecko/");var h=["","moz","ms","webkit"];u.call(this,"Video",a,sc);this.s=a.screenWidth;this.o=a.screenHeight;this.V=a.bufferAddr;this.Yb=a.bufferRAM;var g=a.bufferFormat;this.F=g&&tc[g.toLowerCase()]||vc;this.Ja=a.bufferCols;this.fa=a.bufferRows;this.Rb=this.M=a.cellWidth||1;this.J=a.cellHeight||1;this.Wa=null;this.oa=a.bufferBits||1;this.Zb=a.bufferLeft||0;if(this.c=a.bufferRotate)this.c=this.c%360,0<this.c&&(this.c-=360),-90!=this.c&&(this.I("unsupported buffer rotation: "+
|
||||
this.c),this.c=0);this.ub=a.interruptRate;this.ac=a.refreshRate||60;this.m=b;this.f=c;this.$=(this.cc=d)||b||null;this.Sb=this.s;this.Tb=this.o;this.hb=this.s/this.Ja|0;this.kb=this.o/this.fa|0;1<this.J&&this.fa++;b=a.smoothing;(c=ya.smoothing)&&(b="true"==c);if(null!=b)for(c=0;c<h.length;c++)if(d=(d=h[c])?d+"ImageSmoothingEnabled":"imageSmoothingEnabled",void 0!==this.f[d]){this.f[d]=b;break}if(this.g=a.screenRotate)this.g=this.g%360,0<this.g&&(this.g-=360),-90!=this.g?(this.I("unsupported screen rotation: "+
|
||||
this.g),this.g=0):(this.f.translate(0,this.o),this.f.rotate(this.g*Math.PI/180),this.f.scale(this.o/this.s,this.s/this.o));if(this.b=e)if(this.b.qa=e.requestFullscreen||e.msRequestFullscreen||e.mozRequestFullScreen||e.webkitRequestFullscreen,this.b.qa){for(c=0;c<h.length;c++)if(d=h[c]+"fullscreenchange","on"+d in document){document.addEventListener(d,function(){wc(f,document.fullscreenElement||document.msFullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement?!0:!1)},!1);
|
||||
|
|
|
|||
Loading…
Reference in a new issue