Skip to content

Commit 03815ec

Browse files
committed
RPI4: Improve DRM card check #1723
1 parent 9a0accd commit 03815ec

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3810,7 +3810,7 @@ static bool InitGraphicsDevice(int width, int height)
38103810
#else
38113811
TRACELOG(LOG_INFO, "DISPLAY: No graphic card set, trying card1");
38123812
CORE.Window.fd = open("/dev/dri/card1", O_RDWR); // VideoCore VI (Raspberry Pi 4)
3813-
if (-1 == CORE.Window.fd)
3813+
if ((-1 == CORE.Window.fd) || (drmModeGetResources(CORE.Window.fd) == NULL))
38143814
{
38153815
TRACELOG(LOG_INFO, "DISPLAY: Failed to open graphic card1, trying card0");
38163816
CORE.Window.fd = open("/dev/dri/card0", O_RDWR); // VideoCore IV (Raspberry Pi 1-3)

0 commit comments

Comments
 (0)