mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2024-11-08 09:14:10 +01:00
Fix color channels for VMware alpha cursors
The red and blue channels were incorrectly swapped.
This commit is contained in:
parent
1c38b6f120
commit
c1160d1468
@ -1842,9 +1842,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
|
||||
}
|
||||
|
||||
|
@ -2243,7 +2243,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,
|
||||
@ -2261,12 +2261,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,
|
||||
|
Loading…
Reference in New Issue
Block a user