Build JoypadLinux
sandbox detection method only with udev
Fixes an `unused-function` warning when building with `udev=no`.
This commit is contained in:
parent
4c677c88e9
commit
51dfdfab96
1 changed files with 2 additions and 0 deletions
|
@ -74,6 +74,7 @@ void JoypadLinux::Joypad::reset() {
|
|||
events.clear();
|
||||
}
|
||||
|
||||
#ifdef UDEV_ENABLED
|
||||
// This function is derived from SDL:
|
||||
// https://github.com/libsdl-org/SDL/blob/main/src/core/linux/SDL_sandbox.c#L28-L45
|
||||
static bool detect_sandbox() {
|
||||
|
@ -93,6 +94,7 @@ static bool detect_sandbox() {
|
|||
|
||||
return false;
|
||||
}
|
||||
#endif // UDEV_ENABLED
|
||||
|
||||
JoypadLinux::JoypadLinux(Input *in) {
|
||||
#ifdef UDEV_ENABLED
|
||||
|
|
Loading…
Reference in a new issue