mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-20 03:38:28 +00:00
Added SDL_HINT_EVDEV_DEVICES
This commit is contained in:
parent
6f399c3beb
commit
afde1cc9c2
2 changed files with 16 additions and 1 deletions
|
@ -685,6 +685,21 @@ extern "C" {
|
||||||
*/
|
*/
|
||||||
#define SDL_HINT_ENABLE_SCREEN_KEYBOARD "SDL_ENABLE_SCREEN_KEYBOARD"
|
#define SDL_HINT_ENABLE_SCREEN_KEYBOARD "SDL_ENABLE_SCREEN_KEYBOARD"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A variable containing a list of evdev devices to use if udev is not available.
|
||||||
|
*
|
||||||
|
* The list of devices is in the form:
|
||||||
|
*
|
||||||
|
* deviceclass:path[,deviceclass:path[,...]]
|
||||||
|
*
|
||||||
|
* where device class is an integer representing the SDL_UDEV_deviceclass and path is the full path to the event device.
|
||||||
|
*
|
||||||
|
* This hint should be set before SDL is initialized.
|
||||||
|
*
|
||||||
|
* \since This hint is available since SDL 3.0.0.
|
||||||
|
*/
|
||||||
|
#define SDL_HINT_EVDEV_DEVICES "SDL_EVDEV_DEVICES"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A variable controlling verbosity of the logging of SDL events pushed onto
|
* A variable controlling verbosity of the logging of SDL events pushed onto
|
||||||
* the internal queue.
|
* the internal queue.
|
||||||
|
|
|
@ -198,7 +198,7 @@ int SDL_EVDEV_Init(void)
|
||||||
where device class is an integer representing the
|
where device class is an integer representing the
|
||||||
SDL_UDEV_deviceclass and path is the full path to
|
SDL_UDEV_deviceclass and path is the full path to
|
||||||
the event device. */
|
the event device. */
|
||||||
const char *devices = SDL_getenv("SDL_EVDEV_DEVICES");
|
const char *devices = SDL_GetHint(SDL_HINT_EVDEV_DEVICES);
|
||||||
if (devices) {
|
if (devices) {
|
||||||
/* Assume this is the old use of the env var and it is not in
|
/* Assume this is the old use of the env var and it is not in
|
||||||
ROM. */
|
ROM. */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue