diff options
Diffstat (limited to 'src/common/backend.c')
| -rw-r--r-- | src/common/backend.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/common/backend.c b/src/common/backend.c index b15233f..bb5ae33 100644 --- a/src/common/backend.c +++ b/src/common/backend.c @@ -322,6 +322,15 @@ bool yasl_surface_poll_event(struct yasl_surface *s, struct yasl_event *ev) return input_queue_pop(&s->input, ev); } +bool yasl_surface_read_pixels(struct yasl_surface *s, uint32_t *out, size_t cap, + struct yasl_vector2i *size) +{ + if (!size) return false; + *size = (struct yasl_vector2i){0}; + if (!s || (!out && cap) || !s->display->ops->surface_read_pixels) return false; + return s->display->ops->surface_read_pixels(s, out, cap, size); +} + bool yasl_surface_set_pointer_mode(struct yasl_surface *s, enum yasl_pointer_mode mode) { if (!s || (mode != YASL_POINTER_NORMAL && mode != YASL_POINTER_RELATIVE)) |
