We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a0accd commit 03815ecCopy full SHA for 03815ec
1 file changed
src/core.c
@@ -3810,7 +3810,7 @@ static bool InitGraphicsDevice(int width, int height)
3810
#else
3811
TRACELOG(LOG_INFO, "DISPLAY: No graphic card set, trying card1");
3812
CORE.Window.fd = open("/dev/dri/card1", O_RDWR); // VideoCore VI (Raspberry Pi 4)
3813
- if (-1 == CORE.Window.fd)
+ if ((-1 == CORE.Window.fd) || (drmModeGetResources(CORE.Window.fd) == NULL))
3814
{
3815
TRACELOG(LOG_INFO, "DISPLAY: Failed to open graphic card1, trying card0");
3816
CORE.Window.fd = open("/dev/dri/card0", O_RDWR); // VideoCore IV (Raspberry Pi 1-3)
0 commit comments