diff options
| author | Ray <[email protected]> | 2022-06-05 11:34:23 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2022-06-05 11:34:23 +0200 |
| commit | 865a44adda0a3b32b39c0f20a85b45f5001f274b (patch) | |
| tree | 1be0c26c6da793fdb1a7d2ca13dbe7d70262332e /src | |
| parent | cda89ebb58767271f7194fcfa6855ac6b7442ec7 (diff) | |
| download | raylib-865a44adda0a3b32b39c0f20a85b45f5001f274b.tar.gz raylib-865a44adda0a3b32b39c0f20a85b45f5001f274b.zip | |
REVIEWED: Mouse device support on `PLATFORM_DRM` #2381
Diffstat (limited to 'src')
| -rw-r--r-- | src/rcore.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rcore.c b/src/rcore.c index 85954e60..4acb6988 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -6058,12 +6058,13 @@ static void ConfigureEvdevDevice(char *device) fd = open(device, O_RDONLY | O_NONBLOCK); if (fd < 0) { - TRACELOG(LOG_WARNING, "RPI: Failed to open input device %s", device); + TRACELOG(LOG_WARNING, "RPI: Failed to open input device: %s", device); return; } worker->fd = fd; // Grab number on the end of the devices name "event<N>" + // TODO: Grab number on the end of the device name "mouse<N>" int devNum = 0; char *ptrDevName = strrchr(device, 't'); worker->eventNum = -1; @@ -6072,6 +6073,7 @@ static void ConfigureEvdevDevice(char *device) { if (sscanf(ptrDevName, "t%d", &devNum) == 1) worker->eventNum = devNum; } + else worker->eventNum = 0; // HACK for mouse0 device! // At this point we have a connection to the device, but we don't yet know what the device is. // It could be many things, even as simple as a power button... |
