Align with neatvnc API changes

pull/42/head
Andri Yngvason 2020-07-06 16:43:15 +00:00
parent 7fb2215c0f
commit 52e30e795b
3 changed files with 7 additions and 7 deletions

View File

@ -138,7 +138,7 @@ int main(int argc, char* argv[])
memset(addr, 0xff, width * height * 4);
struct aml* aml = aml_new(NULL, 0);
struct aml* aml = aml_new();
aml_set_default(aml);
struct nvnc* server = nvnc_open("127.0.0.1", 5900);

View File

@ -44,7 +44,7 @@ int main(int argc, char* argv[])
return 1;
}
struct aml* aml = aml_new(NULL, 0);
struct aml* aml = aml_new();
aml_set_default(aml);
struct nvnc* server = nvnc_open("127.0.0.1", 5900);

View File

@ -41,17 +41,17 @@ static int stream__try_tls_accept(struct stream* self);
static inline void stream__poll_r(struct stream* self)
{
aml_set_event_mask(self->handler, POLLIN);
aml_set_event_mask(self->handler, AML_EVENT_READ);
}
static inline void stream__poll_w(struct stream* self)
{
aml_set_event_mask(self->handler, POLLOUT);
aml_set_event_mask(self->handler, AML_EVENT_WRITE);
}
static inline void stream__poll_rw(struct stream* self)
{
aml_set_event_mask(self->handler, POLLIN | POLLOUT);
aml_set_event_mask(self->handler, AML_EVENT_READ | AML_EVENT_WRITE);
}
static void stream_req__finish(struct stream_req* req,
@ -267,10 +267,10 @@ static void stream__on_event(void* obj)
struct stream* self = aml_get_userdata(obj);
uint32_t events = aml_get_revents(obj);
if (events & POLLIN)
if (events & AML_EVENT_READ)
stream__on_readable(self);
if (events & POLLOUT)
if (events & AML_EVENT_WRITE)
stream__on_writable(self);
}