You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, thank you for creating and maintaining raylib—it's an amazing library that makes graphics programming fun and accessible!
While working on a project using raylib with the DRM backend (PLATFORM=DRM), I noticed that the DRM backend currently supports:
Only 1 mouse
Only 1 keyboard
A limited, configurable number of gamepads (default: 4).
To address this, I myself implemented dynamic support for multiple mouse and keyboard devices in a custom Raylib source. My approach involved:
Making mouseFd and keyboardFd pointers to dynamically allocated arrays.
Using RL_REALLOC to adjust the array size as new devices are configured.
I would like to clarify if the current limitation on device counts is intentional or simply a design decision. Additionally, I’m considering creating a pull request for this enhancement and would like feedback on whether it would be desirable. Specifically:
Should I implement this dynamic support for all devices (mouse, keyboard, gamepads)?
Or should I implement fixed, configurable amount for mouse and keyboard like gamepads are implemented
Are there specific concerns or guidelines I should be aware of?
Environment
Operating System: Arch Linux
Platform Backend: DRM
Other details are likely not relevant to this issue but can be provided if necessary.
The text was updated successfully, but these errors were encountered:
In my opinion (and as far as I known), the limitation is probably a combination of lack of need (niche use case) and lack of backend support: GLFW (the default backend) doesn't support it (ref, ref, ref). SDL2 doesn't support it for keyboard (ref), just for mouse (ref). SDL3 does support it (ref, ref). The web API doesn't support it (ref, ref).
Regarding the PR, this change would cause a disparity between platforms and a breaking change (side note: raylib tries to avoid pointers, unless absolutely necessary, to keep the library easy and accessible for learning/new users). I'd suggest waiting for @raysan5 reply before spending the time drafting it.
I'm sure that GLFW does support multiple mouse and keyboard, it just can't distinguish them, this what your ref's say. Maybe there was a misunderstanding. I didn't ask for support to distinguish which mouse or keyboard is being used, the DRM backend polls only the last device it finds for each category (mouse, keyboard) except the gamepads which have a limited but configurable amount. And I wanted to know if this is intentional or should be changed. And regarding pointers they will only be used internally when polling so it won't change any APIs.
Please, before submitting a new issue verify and check:
Issue description
First of all, thank you for creating and maintaining raylib—it's an amazing library that makes graphics programming fun and accessible!
While working on a project using raylib with the DRM backend (PLATFORM=DRM), I noticed that the DRM backend currently supports:
To address this, I myself implemented dynamic support for multiple mouse and keyboard devices in a custom Raylib source. My approach involved:
I would like to clarify if the current limitation on device counts is intentional or simply a design decision. Additionally, I’m considering creating a pull request for this enhancement and would like feedback on whether it would be desirable. Specifically:
Environment
Operating System: Arch Linux
Platform Backend: DRM
Other details are likely not relevant to this issue but can be provided if necessary.
The text was updated successfully, but these errors were encountered: