mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 05:27:20 +00:00
[obs] update to use new LGMP interface
This commit is contained in:
parent
18cc8d7cab
commit
21987cb423
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 New Issue
Block a user