From b8843395acd03520b7630b6a1dc19f151f42382d Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 10 Feb 2024 02:47:01 +0100 Subject: Add screen rotation support (tested on amd/intel) screen rotation in wayland is best effort, wayland doesn't give the necessary information to make it robust. --- src/egl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/egl.c') diff --git a/src/egl.c b/src/egl.c index f1e3885..7971dbd 100644 --- a/src/egl.c +++ b/src/egl.c @@ -23,10 +23,10 @@ static void output_handle_geometry(void *data, struct wl_output *wl_output, (void)subpixel; (void)make; (void)model; - (void)transform; gsr_wayland_output *gsr_output = data; gsr_output->pos.x = x; gsr_output->pos.y = y; + gsr_output->transform = transform; } static void output_handle_mode(void *data, struct wl_output *wl_output, uint32_t flags, int32_t width, int32_t height, int32_t refresh) { @@ -101,6 +101,7 @@ static void registry_add_object(void *data, struct wl_registry *registry, uint32 .output = wl_registry_bind(registry, name, &wl_output_interface, 4), .pos = { .x = 0, .y = 0 }, .size = { .x = 0, .y = 0 }, + .transform = 0, .name = NULL, }; wl_output_add_listener(gsr_output->output, &output_listener, gsr_output); @@ -322,6 +323,7 @@ static bool gsr_egl_load_gl(gsr_egl *self, void *library) { { (void**)&self->glBlendFunc, "glBlendFunc" }, { (void**)&self->glGetUniformLocation, "glGetUniformLocation" }, { (void**)&self->glUniform1f, "glUniform1f" }, + { (void**)&self->glUniform2f, "glUniform2f" }, { NULL, NULL } }; -- cgit v1.2.3