Skip to content

Commit 58f8198

Browse files
authored
Merge branch 'raysan5:master' into master
2 parents e6843aa + d0e638c commit 58f8198

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/platforms/rcore_drm.c

+8-4
Original file line numberDiff line numberDiff line change
@@ -735,20 +735,24 @@ int InitPlatform(void)
735735

736736
#if defined(DEFAULT_GRAPHIC_DEVICE_DRM)
737737
platform.fd = open(DEFAULT_GRAPHIC_DEVICE_DRM, O_RDWR);
738+
if (platform.fd != -1) TRACELOG(LOG_INFO, "DISPLAY: Default graphic device DRM opened successfully");
738739
#else
739-
TRACELOG(LOG_INFO, "DISPLAY: No graphic card set, trying platform-gpu-card");
740+
TRACELOG(LOG_WARNING, "DISPLAY: No graphic card set, trying platform-gpu-card");
740741
platform.fd = open("/dev/dri/by-path/platform-gpu-card", O_RDWR); // VideoCore VI (Raspberry Pi 4)
742+
if (platform.fd != -1) TRACELOG(LOG_INFO, "DISPLAY: platform-gpu-card opened successfully");
741743

742744
if ((platform.fd == -1) || (drmModeGetResources(platform.fd) == NULL))
743745
{
744-
TRACELOG(LOG_INFO, "DISPLAY: Failed to open platform-gpu-card, trying card1");
746+
TRACELOG(LOG_WARNING, "DISPLAY: Failed to open platform-gpu-card, trying card1");
745747
platform.fd = open("/dev/dri/card1", O_RDWR); // Other Embedded
748+
if (platform.fd != -1) TRACELOG(LOG_INFO, "DISPLAY: card1 opened successfully");
746749
}
747750

748751
if ((platform.fd == -1) || (drmModeGetResources(platform.fd) == NULL))
749752
{
750-
TRACELOG(LOG_INFO, "DISPLAY: Failed to open graphic card1, trying card0");
753+
TRACELOG(LOG_WARNING, "DISPLAY: Failed to open graphic card1, trying card0");
751754
platform.fd = open("/dev/dri/card0", O_RDWR); // VideoCore IV (Raspberry Pi 1-3)
755+
if (platform.fd != -1) TRACELOG(LOG_INFO, "DISPLAY: card0 opened successfully");
752756
}
753757
#endif
754758

@@ -1399,7 +1403,7 @@ static void ConfigureEvdevDevice(char *device)
13991403
int fd = open(device, O_RDONLY | O_NONBLOCK);
14001404
if (fd < 0)
14011405
{
1402-
TRACELOG(LOG_WARNING, "DRM: Failed to open input device: %s", device);
1406+
TRACELOG(LOG_WARNING, "SYSTEM: Failed to open input device: %s", device);
14031407
return;
14041408
}
14051409

0 commit comments

Comments
 (0)