Skip to content

Commit

Permalink
do not apply rotation if the screen is not portrait screen
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuatam committed Dec 22, 2024
1 parent ffbb731 commit 3831a9e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Backends/DRMBackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3831a9e

Please sign in to comment.