mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-07-15 20:02:05 +00:00
Compare commits
1 Commits
gnif-hdr-e
...
gnif-lgmp-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e13a6e9350 |
@@ -1438,6 +1438,7 @@ static int lg_run(void)
|
|||||||
core_setGrab(true);
|
core_setGrab(true);
|
||||||
|
|
||||||
uint32_t udataSize;
|
uint32_t udataSize;
|
||||||
|
uint32_t remoteVersion;
|
||||||
KVMFR *udata;
|
KVMFR *udata;
|
||||||
int waitCount = 0;
|
int waitCount = 0;
|
||||||
|
|
||||||
@@ -1462,7 +1463,7 @@ restart:
|
|||||||
}
|
}
|
||||||
|
|
||||||
status = lgmpClientSessionInit(g_state.lgmp, &udataSize, (uint8_t **)&udata,
|
status = lgmpClientSessionInit(g_state.lgmp, &udataSize, (uint8_t **)&udata,
|
||||||
NULL);
|
NULL, &remoteVersion);
|
||||||
switch(status)
|
switch(status)
|
||||||
{
|
{
|
||||||
case LGMP_OK:
|
case LGMP_OK:
|
||||||
@@ -1480,6 +1481,8 @@ restart:
|
|||||||
"Please download and install the matching version."
|
"Please download and install the matching version."
|
||||||
);
|
);
|
||||||
|
|
||||||
|
DEBUG_INFO("LGMP host:%u client:%u",
|
||||||
|
remoteVersion, LGMP_PROTOCOL_VERSION);
|
||||||
DEBUG_INFO("Waiting for you to upgrade the host application");
|
DEBUG_INFO("Waiting for you to upgrade the host application");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
24
obs/lg.c
24
obs/lg.c
@@ -490,15 +490,31 @@ static void lgUpdate(void * data, obs_data_t * settings)
|
|||||||
uint32_t udataSize;
|
uint32_t udataSize;
|
||||||
KVMFR * udata;
|
KVMFR * udata;
|
||||||
|
|
||||||
if (lgmpClientInit(this->shmDev.mem, this->shmDev.size, &this->lgmp)
|
LGMP_STATUS status;
|
||||||
!= LGMP_OK)
|
if ((status = lgmpClientInit(this->shmDev.mem, this->shmDev.size,
|
||||||
|
&this->lgmp)) != LGMP_OK)
|
||||||
|
{
|
||||||
|
printf("lgmpClientInit: %s\n", lgmpStatusString(status));
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
usleep(200000);
|
usleep(200000);
|
||||||
|
|
||||||
if (lgmpClientSessionInit(this->lgmp, &udataSize, (uint8_t **)&udata, NULL)
|
uint32_t remoteVersion;
|
||||||
!= LGMP_OK)
|
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;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (udataSize < sizeof(KVMFR) ||
|
if (udataSize < sizeof(KVMFR) ||
|
||||||
memcmp(udata->magic, KVMFR_MAGIC, sizeof(udata->magic)) != 0 ||
|
memcmp(udata->magic, KVMFR_MAGIC, sizeof(udata->magic)) != 0 ||
|
||||||
|
|||||||
Submodule repos/LGMP updated: cee2933221...149c731050
Reference in New Issue
Block a user