Skip to content

Commit 42022c3

Browse files
authored
fix: In certain cases the connector status is reported UNKNOWN, should be conisdered as CONNECTED (#4305)
Co-authored-by: Michal Jaskolski <michal.jaskolski@hexagon.com>
1 parent 59b44a4 commit 42022c3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/platforms/rcore_drm.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -763,8 +763,10 @@ int InitPlatform(void)
763763

764764
drmModeConnector *con = drmModeGetConnector(platform.fd, res->connectors[i]);
765765
TRACELOG(LOG_TRACE, "DISPLAY: Connector modes detected: %i", con->count_modes);
766-
767-
if ((con->connection == DRM_MODE_CONNECTED) && (con->encoder_id))
766+
767+
// In certain cases the status of the conneciton is reported as UKNOWN, but it is still connected.
768+
// This might be a hardware or software limitation like on Raspberry Pi Zero with composite output.
769+
if (((con->connection == DRM_MODE_CONNECTED) || (con->connection == DRM_MODE_UNKNOWNCONNECTION)) && (con->encoder_id))
768770
{
769771
TRACELOG(LOG_TRACE, "DISPLAY: DRM mode connected");
770772
platform.connector = con;

0 commit comments

Comments
 (0)