mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-31 17:57:10 +00:00
[obs] update to use new LGMP interface
This commit is contained in:
parent
18cc8d7cab
commit
21987cb423
2 changed files with 16 additions and 2 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
B1-191-gfc0dbd8782+1
|
||||
B1-192-g18cc8d7cab+1
|
16
obs/lg.c
16
obs/lg.c
|
@ -165,9 +165,23 @@ static void lgUpdate(void * data, obs_data_t * settings)
|
|||
|
||||
this->state = STATE_OPEN;
|
||||
|
||||
if (lgmpClientInit(this->shmDev.mem, this->shmDev.size, &this->lgmp) != LGMP_OK)
|
||||
uint32_t udataSize;
|
||||
KVMFR * udata;
|
||||
|
||||
if (lgmpClientInit(this->shmDev.mem, this->shmDev.size, &this->lgmp,
|
||||
&udataSize, (uint8_t **)&udata) != LGMP_OK)
|
||||
return;
|
||||
|
||||
if (udataSize != sizeof(KVMFR) ||
|
||||
memcmp(udata->magic, KVMFR_MAGIC, sizeof(udata->magic)) != 0 ||
|
||||
udata->version != KVMFR_VERSION)
|
||||
{
|
||||
printf("The host application is not compatible with this client\n");
|
||||
printf("Expected KVMFR version %d\n", KVMFR_VERSION);
|
||||
printf("This is not a Looking Glass error, do not report this\n");
|
||||
return;
|
||||
}
|
||||
|
||||
this->state = STATE_STARTING;
|
||||
pthread_create(&this->frameThread, NULL, frameThread, this);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue