diff --git a/VERSION b/VERSION index 1873aba9..6a130c38 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -B1-191-gfc0dbd8782+1 \ No newline at end of file +B1-192-g18cc8d7cab+1 \ No newline at end of file diff --git a/obs/lg.c b/obs/lg.c index 346f1281..febedc9a 100644 --- a/obs/lg.c +++ b/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); }