diff options
| author | Ray <[email protected]> | 2021-04-22 21:01:48 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2021-04-22 21:01:48 +0200 |
| commit | 03815ec4fe0676030838bb91907bf211b178e86e (patch) | |
| tree | d64fb8d3d0dfd8be62c3178a0c0eef4ee713fda6 /src | |
| parent | 9a0accddb87fa312c11b44479b258ac5b2b4b8a4 (diff) | |
| download | raylib-03815ec4fe0676030838bb91907bf211b178e86e.tar.gz raylib-03815ec4fe0676030838bb91907bf211b178e86e.zip | |
RPI4: Improve DRM card check #1723
Diffstat (limited to 'src')
| -rw-r--r-- | src/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) |
