summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2022-11-28 10:23:21 +0100
committerJacopo Mondi <jacopo@jmondi.org>2022-12-01 11:26:44 +0100
commitf6abad798620fd0d8096a40747c64090f20b3251 (patch)
treec2efca0de8fbe03c638199e8ea2205dc3b3cf0e6
parent2af93b5d2c21db70e5798a88f8086501c9e85859 (diff)
[HACK] cam: sdl: Software rotate the rendered image
As long as the sensor and the ISP do not support flips/transpose, software-rotate the image at display time using SDL2. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
-rw-r--r--src/apps/cam/sdl_sink.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/apps/cam/sdl_sink.cpp b/src/apps/cam/sdl_sink.cpp
index a2f4abc1..933decfc 100644
--- a/src/apps/cam/sdl_sink.cpp
+++ b/src/apps/cam/sdl_sink.cpp
@@ -210,6 +210,6 @@ void SDLSink::renderBuffer(FrameBuffer *buffer)
texture_->update(planes);
SDL_RenderClear(renderer_);
- SDL_RenderCopy(renderer_, texture_->get(), nullptr, nullptr);
+ SDL_RenderCopyEx(renderer_, texture_->get(), nullptr, nullptr, 90.0, nullptr, SDL_FLIP_NONE);
SDL_RenderPresent(renderer_);
}