Skip to content

Commit 3831a9e

Browse files
committed
do not apply rotation if the screen is not portrait screen
1 parent ffbb731 commit 3831a9e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/Backends/DRMBackend.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3031,10 +3031,12 @@ bool drm_set_mode( struct drm_t *drm, const drmModeModeInfo *mode )
30313031
g_nOutputWidth = mode->hdisplay;
30323032
g_nOutputHeight = mode->vdisplay;
30333033

3034-
if (g_bUseRotationShader) {
3034+
if (g_bUseRotationShader && mode->vdisplay > mode->hdisplay) {
30353035
g_bRotated = true;
30363036
g_nOutputWidth = mode->vdisplay;
30373037
g_nOutputHeight = mode->hdisplay;
3038+
} else {
3039+
g_bUseRotationShader = false;
30383040
}
30393041

30403042
break;

0 commit comments

Comments
 (0)