From 6ee30b23088fc9e1625d1a70ee794e6fb8d24e71 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Mon, 7 Nov 2022 20:59:36 +1100 Subject: [PATCH] [client] update for the new LGMP interface prototypes --- client/src/core.c | 9 +++++---- client/src/main.c | 3 ++- client/src/main.h | 1 + common/include/common/KVMFR.h | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/client/src/core.c b/client/src/core.c index 8a6ccdd7..9eadcbaa 100644 --- a/client/src/core.c +++ b/client/src/core.c @@ -478,10 +478,11 @@ void core_handleMouseNormal(double ex, double ey) if (!g_state.stopVideo && g_state.kvmfrFeatures & KVMFR_FEATURE_SETCURSORPOS) { - const KVMFRSetCursorPos msg = { - .msg.type = KVMFR_MESSAGE_SETCURSORPOS, - .x = round(guest.x), - .y = round(guest.y) + const KVMFRMessage_SetCursorPos msg = { + .msg.type = KVMFR_MESSAGE_SETCURSORPOS, + .msg.clientID = g_state.clientID, + .x = round(guest.x), + .y = round(guest.y) }; uint32_t setPosSerial; diff --git a/client/src/main.c b/client/src/main.c index fe61dd58..f0154a4f 100644 --- a/client/src/main.c +++ b/client/src/main.c @@ -1433,7 +1433,8 @@ restart: initialSpiceEnable = 0; } - status = lgmpClientSessionInit(g_state.lgmp, &udataSize, (uint8_t **)&udata); + status = lgmpClientSessionInit(g_state.lgmp, &udataSize, (uint8_t **)&udata, + &g_state.clientID); switch(status) { case LGMP_OK: diff --git a/client/src/main.h b/client/src/main.h index 3f9b6a2f..d68a45a9 100644 --- a/client/src/main.h +++ b/client/src/main.h @@ -121,6 +121,7 @@ struct AppState struct IVSHMEM shm; PLGMPClient lgmp; + uint32_t clientID; PLGMPClientQueue pointerQueue; LG_Lock pointerQueueLock; KVMFRFeatureFlags kvmfrFeatures; diff --git a/common/include/common/KVMFR.h b/common/include/common/KVMFR.h index b6c06b85..4026d817 100644 --- a/common/include/common/KVMFR.h +++ b/common/include/common/KVMFR.h @@ -167,7 +167,7 @@ typedef struct KVMFRMessage_SetCursorPos KVMFRMessage msg; int32_t x, y; } -KVMFRSetCursorPos; +KVMFRMessage_SetCursorPos; typedef struct KVMFRMessage_FrameTime {