From ed6d94481035fb23416690b4c6cf3f1fef3f3cf3 Mon Sep 17 00:00:00 2001 From: Chris Thrasher Date: Wed, 26 Oct 2022 12:54:01 -0600 Subject: [PATCH] Always trigger drmModeSetCrtc --- src/SFML/Window/DRM/DRMContext.cpp | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/SFML/Window/DRM/DRMContext.cpp b/src/SFML/Window/DRM/DRMContext.cpp index e36875ba..c449b8f8 100644 --- a/src/SFML/Window/DRM/DRMContext.cpp +++ b/src/SFML/Window/DRM/DRMContext.cpp @@ -102,18 +102,14 @@ namespace if (!initialized) return; - /* Avoid a modeswitch if possible */ - if (drmNode.mode != &drmNode.originalCrtc->mode) - drmModeSetCrtc(drmNode.fileDescriptor, - drmNode.originalCrtc->crtc_id, - drmNode.originalCrtc->buffer_id, - drmNode.originalCrtc->x, - drmNode.originalCrtc->y, - &drmNode.connectorId, - 1, - &drmNode.originalCrtc->mode); - else if (getenv("SFML_DRM_DEBUG")) - printf("DRM keeping the same mode since using the original one\n"); + drmModeSetCrtc(drmNode.fileDescriptor, + drmNode.originalCrtc->crtc_id, + drmNode.originalCrtc->buffer_id, + drmNode.originalCrtc->x, + drmNode.originalCrtc->y, + &drmNode.connectorId, + 1, + &drmNode.originalCrtc->mode); drmModeFreeConnector(drmNode.savedConnector); drmModeFreeEncoder(drmNode.savedEncoder);