aboutsummaryrefslogtreecommitdiff
path: root/src/egl.c
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-02-10 02:47:01 +0100
committerdec05eba <dec05eba@protonmail.com>2024-02-10 03:48:43 +0100
commitb8843395acd03520b7630b6a1dc19f151f42382d (patch)
treef8da6cf22229ba44916de608c9bb46bfddcd8e79 /src/egl.c
parentac73d9cb13ea7e4694b6b013de426cefddae4ca7 (diff)
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.
Diffstat (limited to 'src/egl.c')
-rw-r--r--src/egl.c4
1 files changed, 3 insertions, 1 deletions
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 }
};