From 3831a9eabfbd52a61def785f7558ea65af8fbe4d Mon Sep 17 00:00:00 2001 From: Joshua Tam <297250+joshuatam@users.noreply.github.com> Date: Mon, 23 Dec 2024 00:41:03 +0900 Subject: [PATCH] do not apply rotation if the screen is not portrait screen --- src/Backends/DRMBackend.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Backends/DRMBackend.cpp b/src/Backends/DRMBackend.cpp index 397f5de19f..d8e8e232a6 100644 --- a/src/Backends/DRMBackend.cpp +++ b/src/Backends/DRMBackend.cpp @@ -3031,10 +3031,12 @@ bool drm_set_mode( struct drm_t *drm, const drmModeModeInfo *mode ) g_nOutputWidth = mode->hdisplay; g_nOutputHeight = mode->vdisplay; - if (g_bUseRotationShader) { + if (g_bUseRotationShader && mode->vdisplay > mode->hdisplay) { g_bRotated = true; g_nOutputWidth = mode->vdisplay; g_nOutputHeight = mode->hdisplay; + } else { + g_bUseRotationShader = false; } break;