[obs] update to use new LGMP interface

This commit is contained in:
Geoffrey McRae 2020-05-17 12:04:41 +10:00
parent 18cc8d7cab
commit 21987cb423
2 changed files with 16 additions and 2 deletions

View File

@ -1 +1 @@
B1-191-gfc0dbd8782+1 B1-192-g18cc8d7cab+1

View File

@ -165,9 +165,23 @@ static void lgUpdate(void * data, obs_data_t * settings)
this->state = STATE_OPEN; 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; 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; this->state = STATE_STARTING;
pthread_create(&this->frameThread, NULL, frameThread, this); pthread_create(&this->frameThread, NULL, frameThread, this);
} }