Use proper socket helpers for FBU header
Let's not duplicate this stuff when we have convenience functions.
This commit is contained in:
parent
e01dd27be4
commit
aaa4eb8c3c
12
core/rfb.js
12
core/rfb.js
|
@ -2486,13 +2486,11 @@ export default class RFB extends EventTargetMixin {
|
|||
if (this._sock.rQwait("rect header", 12)) { return false; }
|
||||
/* New FramebufferUpdate */
|
||||
|
||||
const hdr = this._sock.rQshiftBytes(12);
|
||||
this._FBU.x = (hdr[0] << 8) + hdr[1];
|
||||
this._FBU.y = (hdr[2] << 8) + hdr[3];
|
||||
this._FBU.width = (hdr[4] << 8) + hdr[5];
|
||||
this._FBU.height = (hdr[6] << 8) + hdr[7];
|
||||
this._FBU.encoding = parseInt((hdr[8] << 24) + (hdr[9] << 16) +
|
||||
(hdr[10] << 8) + hdr[11], 10);
|
||||
this._FBU.x = this._sock.rQshift16();
|
||||
this._FBU.y = this._sock.rQshift16();
|
||||
this._FBU.width = this._sock.rQshift16();
|
||||
this._FBU.height = this._sock.rQshift16();
|
||||
this._FBU.encoding = this._sock.rQshift32();
|
||||
}
|
||||
|
||||
if (!this._handleRect()) {
|
||||
|
|
Loading…
Reference in New Issue