Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/neutrinolabs/ulalaca-xrdp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGyuhwan Park <unstabler@unstabler.pl>2022-06-11 23:12:44 +0300
committerGyuhwan Park <unstabler@unstabler.pl>2022-06-11 23:12:44 +0300
commit49d51ef3ab1a1bbf77e1fec8f64b24fd26b23c64 (patch)
tree1198bb523e11da07c7c2c5fbd5bf76fc2e07b32c
parentf06a16646ebb8cbb3e949cf86fb54696daa92ed7 (diff)
fix: improve compatibility with mstsc.exe
-rw-r--r--ulalaca.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/ulalaca.cpp b/ulalaca.cpp
index 618bf7e..f5f8777 100644
--- a/ulalaca.cpp
+++ b/ulalaca.cpp
@@ -251,15 +251,16 @@ int XrdpUlalaca::decideCopyRectSize() const {
bool isRFXCodec = _clientInfo.rfx_codec_id != 0;
bool isJPEGCodec = _clientInfo.jpeg_codec_id != 0;
bool isH264Codec = _clientInfo.h264_codec_id != 0;
+ bool isGFXH264Codec = _clientInfo.capture_code & 3;
- if (isRFXCodec || isJPEGCodec) {
- return 64;
- }
- if (isH264Codec) {
- // return 256;
+ if (isH264Codec || isGFXH264Codec) {
return RECT_SIZE_BYPASS_CREATE;
}
+
+ if (isRFXCodec || isJPEGCodec) {
+ return 64;
+ }
return RECT_SIZE_BYPASS_CREATE;
}
@@ -269,6 +270,7 @@ std::unique_ptr<std::vector<XrdpUlalaca::Rect>> XrdpUlalaca::createCopyRects(
int rectSize
) const {
auto blocks = std::make_unique<std::vector<Rect>>();
+ blocks->reserve(128);
if (rectSize == RECT_SIZE_BYPASS_CREATE) {
std::copy(dirtyRects.begin(), dirtyRects.end(), std::back_insert_iterator(*blocks));