diff --git a/src/output.c b/src/output.c index 401639c..72c88cb 100644 --- a/src/output.c +++ b/src/output.c @@ -42,14 +42,14 @@ void output_transform_coord(const struct output* self, break; case WL_OUTPUT_TRANSFORM_90: *dst_x = src_y; - *dst_y = self->width - src_x; + *dst_y = self->height - src_x; break; case WL_OUTPUT_TRANSFORM_180: *dst_x = self->width - src_x; *dst_y = self->height - src_y; break; case WL_OUTPUT_TRANSFORM_270: - *dst_x = self->height - src_y; + *dst_x = self->width - src_y; *dst_y = src_x; break; case WL_OUTPUT_TRANSFORM_FLIPPED: @@ -57,16 +57,16 @@ void output_transform_coord(const struct output* self, *dst_y = src_y; break; case WL_OUTPUT_TRANSFORM_FLIPPED_90: - *dst_x = self->height - src_y; - *dst_y = self->width - src_x; + *dst_x = src_y; + *dst_y = src_x; break; case WL_OUTPUT_TRANSFORM_FLIPPED_180: *dst_x = src_x; *dst_y = self->height - src_y; break; case WL_OUTPUT_TRANSFORM_FLIPPED_270: - *dst_x = src_y; - *dst_y = src_x; + *dst_x = self->width - src_y; + *dst_y = self->height - src_x; break; } } diff --git a/src/render.c b/src/render.c index 3237b36..e0a4759 100644 --- a/src/render.c +++ b/src/render.c @@ -73,32 +73,32 @@ static const float transforms[][4] = { 0.0f, 1.0f, }, [WL_OUTPUT_TRANSFORM_90] = { - 0.0f, -1.0f, - 1.0f, 0.0f, + 0.0f, 1.0f, + -1.0f, 0.0f, }, [WL_OUTPUT_TRANSFORM_180] = { -1.0f, 0.0f, 0.0f, -1.0f, }, [WL_OUTPUT_TRANSFORM_270] = { - 0.0f, 1.0f, - -1.0f, 0.0f, + 0.0f, -1.0f, + 1.0f, 0.0f, }, [WL_OUTPUT_TRANSFORM_FLIPPED] = { -1.0f, 0.0f, 0.0f, 1.0f, }, [WL_OUTPUT_TRANSFORM_FLIPPED_90] = { - 0.0f, -1.0f, - -1.0f, 0.0f, + 0.0f, 1.0f, + 1.0f, 0.0f, }, [WL_OUTPUT_TRANSFORM_FLIPPED_180] = { 1.0f, 0.0f, 0.0f, -1.0f, }, [WL_OUTPUT_TRANSFORM_FLIPPED_270] = { - 0.0f, 1.0f, - 1.0f, 0.0f, + 0.0f, -1.0f, + -1.0f, 0.0f, }, };