mirror of
https://github.com/godotengine/godot.git
synced 2024-11-26 06:03:38 +00:00
Build JoypadLinux
sandbox detection method only with udev
Fixes an `unused-function` warning when building with `udev=no`.
(cherry picked from commit 51dfdfab96
)
This commit is contained in:
parent
a2e4df43a3
commit
212190ae49
@ -79,6 +79,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() {
|
||||
@ -98,6 +99,7 @@ static bool detect_sandbox() {
|
||||
|
||||
return false;
|
||||
}
|
||||
#endif // UDEV_ENABLED
|
||||
|
||||
JoypadLinux::JoypadLinux(InputDefault *in) {
|
||||
#ifdef UDEV_ENABLED
|
||||
|
Loading…
Reference in New Issue
Block a user