summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRay <[email protected]>2021-04-22 21:01:48 +0200
committerRay <[email protected]>2021-04-22 21:01:48 +0200
commit03815ec4fe0676030838bb91907bf211b178e86e (patch)
treed64fb8d3d0dfd8be62c3178a0c0eef4ee713fda6 /src
parent9a0accddb87fa312c11b44479b258ac5b2b4b8a4 (diff)
downloadraylib-03815ec4fe0676030838bb91907bf211b178e86e.tar.gz
raylib-03815ec4fe0676030838bb91907bf211b178e86e.zip
RPI4: Improve DRM card check #1723
Diffstat (limited to 'src')
-rw-r--r--src/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core.c b/src/core.c
index 247a7932..f4bd6acc 100644
--- a/src/core.c
+++ b/src/core.c
@@ -3810,7 +3810,7 @@ static bool InitGraphicsDevice(int width, int height)
#else
TRACELOG(LOG_INFO, "DISPLAY: No graphic card set, trying card1");
CORE.Window.fd = open("/dev/dri/card1", O_RDWR); // VideoCore VI (Raspberry Pi 4)
- if (-1 == CORE.Window.fd)
+ if ((-1 == CORE.Window.fd) || (drmModeGetResources(CORE.Window.fd) == NULL))
{
TRACELOG(LOG_INFO, "DISPLAY: Failed to open graphic card1, trying card0");
CORE.Window.fd = open("/dev/dri/card0", O_RDWR); // VideoCore IV (Raspberry Pi 1-3)