diff options
-rw-r--r-- | app/ui.js | 2 | ||||
-rw-r--r-- | core/rfb.js | 4 | ||||
-rw-r--r-- | tests/test.rfb.js | 6 |
3 files changed, 6 insertions, 6 deletions
@@ -61,7 +61,7 @@ const UI = { // Translate the DOM l10n.translateDOM(); - WebUtil.fetchJSON('../package.json') + WebUtil.fetchJSON('./package.json') .then((packageInfo) => { Array.from(document.getElementsByClassName('noVNC_version')).forEach(el => el.innerText = packageInfo.version); }) diff --git a/core/rfb.js b/core/rfb.js index f0d2a79..9e6881f 100644 --- a/core/rfb.js +++ b/core/rfb.js @@ -1835,9 +1835,9 @@ export default class RFB extends EventTargetMixin { for (let pixel = 0; pixel < (w * h); pixel++) { let data = this._sock.rQshift32(); - rgba[(pixel * 4) ] = data >> 8 & 0xff; //r + rgba[(pixel * 4) ] = data >> 24 & 0xff; //r rgba[(pixel * 4) + 1 ] = data >> 16 & 0xff; //g - rgba[(pixel * 4) + 2 ] = data >> 24 & 0xff; //b + rgba[(pixel * 4) + 2 ] = data >> 8 & 0xff; //b rgba[(pixel * 4) + 3 ] = data & 0xff; //a } diff --git a/tests/test.rfb.js b/tests/test.rfb.js index 42f4fbc..bb690ce 100644 --- a/tests/test.rfb.js +++ b/tests/test.rfb.js @@ -2303,7 +2303,7 @@ describe('Remote Frame Buffer Protocol Client', function () { }); it('should update the cursor when type is alpha', function () { - let data = [0xee, 0x55, 0xff, 0x00, // bgra + let data = [0xee, 0x55, 0xff, 0x00, // rgba 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0x22, 0x00, 0xff, 0x00, 0x22, @@ -2321,12 +2321,12 @@ describe('Remote Frame Buffer Protocol Client', function () { push8(rect, data[i]); } - let expected_rgba = [0xff, 0x55, 0xee, 0x00, + let expected_rgba = [0xee, 0x55, 0xff, 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0x22, 0x00, 0xff, 0x00, 0x22, 0x00, 0xff, 0x00, 0x22, - 0xff, 0x00, 0x00, 0xee]; + 0x00, 0x00, 0xff, 0xee]; send_fbu_msg([{ x: hotx, y: hoty, width: w, height: h, |