support rotation

This commit is contained in:
Gerrit Brehmer 2019-12-08 22:36:58 +01:00
parent f3767f7667
commit f0323fd3a5
1 changed files with 7 additions and 2 deletions

View File

@ -1164,8 +1164,13 @@ export default class RFB extends EventTargetMixin {
if (this._sock.rQwait("server initialization", 24)) { return false; }
/* Screen size */
const width = this._sock.rQshift16();
const height = this._sock.rQshift16();
if (this._rotate === 'right' || this._rotate === 'left') {
this._fb_height = this._sock.rQshift16();
this._fb_width = this._sock.rQshift16();
} else {
this._fb_width = this._sock.rQshift16();
this._fb_height = this._sock.rQshift16();
}
/* PIXEL_FORMAT */
const bpp = this._sock.rQshift8();