mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-08-22 07:01:30 +00:00
[common] clipboard: enlarge transfer buffers
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
#include <stdint.h>
|
||||
|
||||
static constexpr uint32_t LG_CLIPBOARD_MAPPING_MAGIC = 0x4c474342U;
|
||||
static constexpr uint32_t LG_CLIPBOARD_MAPPING_VERSION = 2U;
|
||||
static constexpr uint32_t LG_CLIPBOARD_MAPPING_VERSION = 3U;
|
||||
|
||||
struct ClipboardRingSlot
|
||||
{
|
||||
|
||||
@@ -40,7 +40,7 @@ class CLGMPHost;
|
||||
class CLGMPClipboardTransport final : public IClipboardSource
|
||||
{
|
||||
private:
|
||||
static constexpr unsigned MEMORY_COUNT = 8;
|
||||
static constexpr unsigned MEMORY_COUNT = KVMFR_CLIPBOARD_SLOT_COUNT;
|
||||
static constexpr unsigned INTERNAL_TARGET_COUNT =
|
||||
CLGMPClipboardFiles::MAX_ACQUISITIONS +
|
||||
CLGMPClipboardFiles::MAX_REQUESTS + 3;
|
||||
|
||||
@@ -457,7 +457,7 @@ namespace
|
||||
std::vector<uint8_t> buffer;
|
||||
try
|
||||
{
|
||||
buffer.resize(KVMFR_CLIPBOARD_DATA_BYTES);
|
||||
buffer.resize(KVMFR_CLIPBOARD_REPRESENTATION_BYTES);
|
||||
}
|
||||
catch (const std::bad_alloc&)
|
||||
{
|
||||
@@ -1653,7 +1653,8 @@ void CClipboardManager::ProcessSendData(Work&& work)
|
||||
return;
|
||||
}
|
||||
const size_t length = static_cast<size_t>((std::min<uint64_t>)(
|
||||
KVMFR_CLIPBOARD_DATA_BYTES, total - work.record.offset));
|
||||
KVMFR_CLIPBOARD_REPRESENTATION_BYTES,
|
||||
total - work.record.offset));
|
||||
std::vector<uint8_t> data;
|
||||
if (length)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user