From 42022c3531e4ca6739fd0ecc760c882eabf4493a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Jask=C3=B3lski?= Date: Tue, 3 Sep 2024 14:38:12 +0200 Subject: [PATCH] fix: In certain cases the connector status is reported UNKNOWN, should be conisdered as CONNECTED (#4305) Co-authored-by: Michal Jaskolski --- src/platforms/rcore_drm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/platforms/rcore_drm.c b/src/platforms/rcore_drm.c index 43dc19c7..ee287583 100644 --- a/src/platforms/rcore_drm.c +++ b/src/platforms/rcore_drm.c @@ -763,8 +763,10 @@ int InitPlatform(void) drmModeConnector *con = drmModeGetConnector(platform.fd, res->connectors[i]); TRACELOG(LOG_TRACE, "DISPLAY: Connector modes detected: %i", con->count_modes); - - if ((con->connection == DRM_MODE_CONNECTED) && (con->encoder_id)) + + // In certain cases the status of the conneciton is reported as UKNOWN, but it is still connected. + // This might be a hardware or software limitation like on Raspberry Pi Zero with composite output. + if (((con->connection == DRM_MODE_CONNECTED) || (con->connection == DRM_MODE_UNKNOWNCONNECTION)) && (con->encoder_id)) { TRACELOG(LOG_TRACE, "DISPLAY: DRM mode connected"); platform.connector = con;