From 5fbd4202373fa0bf0f120eaa805caa6b40c5e2b4 Mon Sep 17 00:00:00 2001 From: Joshua Tam <297250+joshuatam@users.noreply.github.com> Date: Mon, 23 Dec 2024 00:34:48 +0900 Subject: [PATCH] do not apply rotation if the screen is not portrait screen --- src/Backends/DRMBackend.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Backends/DRMBackend.cpp b/src/Backends/DRMBackend.cpp index 397f5de19f..f24ee77430 100644 --- a/src/Backends/DRMBackend.cpp +++ b/src/Backends/DRMBackend.cpp @@ -3031,11 +3031,13 @@ 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; case GAMESCOPE_PANEL_ORIENTATION_90: