From b9460ab724fb8df18d22cb0e10cf6e07646fc1cf Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Fri, 25 Dec 2020 12:21:29 +0100 Subject: Stop using wlr_texture_get_size Just use wlr_texture.{width,height} directly. --- examples/touch.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'examples') diff --git a/examples/touch.c b/examples/touch.c index 3d18dfd0..7f8980e1 100644 --- a/examples/touch.c +++ b/examples/touch.c @@ -78,13 +78,10 @@ static void output_frame_notify(struct wl_listener *listener, void *data) { wlr_renderer_begin(sample->renderer, wlr_output->width, wlr_output->height); wlr_renderer_clear(sample->renderer, (float[]){0.25f, 0.25f, 0.25f, 1}); - int tex_width, tex_height; - wlr_texture_get_size(sample->cat_texture, &tex_width, &tex_height); - struct touch_point *p; wl_list_for_each(p, &sample->touch_points, link) { - int x = (int)(p->x * width) - tex_width / 2; - int y = (int)(p->y * height) - tex_height / 2; + int x = (int)(p->x * width) - sample->cat_texture->width / 2; + int y = (int)(p->y * height) - sample->cat_texture->height / 2; wlr_render_texture(sample->renderer, sample->cat_texture, wlr_output->transform_matrix, x, y, 1.0f); } -- cgit v1.2.3