mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-07-16 04:12:03 +00:00
[client/obs] update LGMP to detect version missmatch since struct change
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
This commit is contained in:
committed by
Geoffrey McRae
parent
bc96319b94
commit
11b3ac00a8
24
obs/lg.c
24
obs/lg.c
@@ -490,15 +490,31 @@ static void lgUpdate(void * data, obs_data_t * settings)
|
||||
uint32_t udataSize;
|
||||
KVMFR * udata;
|
||||
|
||||
if (lgmpClientInit(this->shmDev.mem, this->shmDev.size, &this->lgmp)
|
||||
!= LGMP_OK)
|
||||
LGMP_STATUS status;
|
||||
if ((status = lgmpClientInit(this->shmDev.mem, this->shmDev.size,
|
||||
&this->lgmp)) != LGMP_OK)
|
||||
{
|
||||
printf("lgmpClientInit: %s\n", lgmpStatusString(status));
|
||||
return;
|
||||
}
|
||||
|
||||
usleep(200000);
|
||||
|
||||
if (lgmpClientSessionInit(this->lgmp, &udataSize, (uint8_t **)&udata, NULL)
|
||||
!= LGMP_OK)
|
||||
uint32_t remoteVersion;
|
||||
if ((status = lgmpClientSessionInit(this->lgmp, &udataSize,
|
||||
(uint8_t **)&udata, NULL, &remoteVersion)) != LGMP_OK)
|
||||
{
|
||||
printf("lgmpClientSessionInit: %s", lgmpStatusString(status));
|
||||
if (status == LGMP_ERR_INVALID_VERSION)
|
||||
{
|
||||
printf("The host application is not compatible with this client\n");
|
||||
printf("Expected LGMP version %u but got %u\n",
|
||||
LGMP_PROTOCOL_VERSION, remoteVersion);
|
||||
printf("This is not a Looking Glass error, do not report this");
|
||||
}
|
||||
printf("\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (udataSize < sizeof(KVMFR) ||
|
||||
memcmp(udata->magic, KVMFR_MAGIC, sizeof(udata->magic)) != 0 ||
|
||||
|
||||
Reference in New Issue
Block a user