From da9bddc70ff8544f3294b880d719c4605e87ad97 Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Fri, 10 Jul 2026 15:17:41 -0400 Subject: Handle rotation from codec Signed-off-by: Andrew Opalach --- src/screen/screen.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/screen/screen.c') diff --git a/src/screen/screen.c b/src/screen/screen.c index 21715a6..c0527c3 100644 --- a/src/screen/screen.c +++ b/src/screen/screen.c @@ -670,14 +670,12 @@ static void add_buffer_internal(struct camu_screen *scr, struct camu_video_buffe struct camu_video_format *fmt = &buf->fmt.req; if (buf->view.mode != CAMU_VIEW_NONE) { video.view = buf->view; -#if 0 - } else if (scr->videos.count > 0) { - video.view = al_array_last(scr->videos).view; - video.view.width = fmt->width; - video.view.height = fmt->height; -#endif } else { - camu_view_init(&video.view, fmt->width, fmt->height); + u8 rotation = buf->view.rotation; + if (rotation != CAMU_VIEW_ROTATION_0) { + log_info("Buffer has initial rotation of %s degrees.", camu_view_rotation_name(rotation)); + } + camu_view_init(&video.view, fmt->width, fmt->height, rotation); } camu_view_calculate(&video.view, scr->width, scr->height); al_array_push(scr->videos, video); -- cgit v1.2.3-101-g0448