This commit is contained in:
Lauri Kasanen
2022-07-26 10:38:14 +00:00
committed by Matthew McClaskey
parent ba902f8194
commit 3b40a92548
72 changed files with 3314 additions and 52 deletions

View File

@@ -38,9 +38,12 @@ void TightEncoder::writeMonoRect(int width, int height,
assert(palette.size() == 2);
os = conn->getOutStream();
os = conn->getOutStream(conn->cp.supportsUdp);
os->writeU8((streamId | tightExplicitFilter) << 4);
if (conn->cp.supportsUdp)
os->writeU8(((streamId | tightExplicitFilter) << 4) | (1 << streamId));
else
os->writeU8((streamId | tightExplicitFilter) << 4);
os->writeU8(tightFilterPalette);
// Write the palette
@@ -125,9 +128,12 @@ void TightEncoder::writeIndexedRect(int width, int height,
assert(palette.size() > 0);
assert(palette.size() <= 256);
os = conn->getOutStream();
os = conn->getOutStream(conn->cp.supportsUdp);
os->writeU8((streamId | tightExplicitFilter) << 4);
if (conn->cp.supportsUdp)
os->writeU8(((streamId | tightExplicitFilter) << 4) | (1 << streamId));
else
os->writeU8((streamId | tightExplicitFilter) << 4);
os->writeU8(tightFilterPalette);
// Write the palette