From b39f38350fc9462829d4b0c8a8b0b48209a8195a Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Sun, 25 Jul 2021 13:40:44 +1000 Subject: [PATCH] [common] kvmfr: add a new `frameSerial` field to the KVMFRFrame struct This new field is used so that when a new client connects an already connected client can identify any repeated frame that is sent and ignore it. --- common/include/common/KVMFR.h | 3 ++- host/src/app.c | 2 ++ repos/PureSpice | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/common/include/common/KVMFR.h b/common/include/common/KVMFR.h index b65416c0..71f72ffc 100644 --- a/common/include/common/KVMFR.h +++ b/common/include/common/KVMFR.h @@ -28,7 +28,7 @@ #include "types.h" #define KVMFR_MAGIC "KVMFR---" -#define KVMFR_VERSION 12 +#define KVMFR_VERSION 13 #define KVMFR_MAX_DAMAGE_RECTS 64 @@ -69,6 +69,7 @@ KVMFRCursor; typedef struct KVMFRFrame { uint32_t formatVer; // the frame format version number + uint32_t frameSerial; // the unique frame number FrameType type; // the frame data type uint32_t width; // the frame width uint32_t height; // the frame height diff --git a/host/src/app.c b/host/src/app.c index 0dbc3e06..cc3e6688 100644 --- a/host/src/app.c +++ b/host/src/app.c @@ -94,6 +94,7 @@ struct app PLGMPMemory frameMemory[LGMP_Q_FRAME_LEN]; unsigned int frameIndex; bool frameValid; + uint32_t frameSerial; CaptureInterface * iface; @@ -229,6 +230,7 @@ static bool sendFrame(void) } fi->formatVer = frame.formatVer; + fi->frameSerial = app.frameSerial++; fi->width = frame.width; fi->height = frame.height; fi->realHeight = frame.realHeight; diff --git a/repos/PureSpice b/repos/PureSpice index d9b92c57..dde2d242 160000 --- a/repos/PureSpice +++ b/repos/PureSpice @@ -1 +1 @@ -Subproject commit d9b92c57a264ea86cf9dd462795fce76af003768 +Subproject commit dde2d2427b574b28ad8669804aeb8236681cde94