From 1836ac3c6b2abd5dce487f1d7589cfe7466c0fd2 Mon Sep 17 00:00:00 2001 From: Ben Bridle Date: Fri, 19 Sep 2025 12:02:54 +1200 Subject: Gate gamepad support behind a feature flag This is to make it possible to compile bedrock-pc without gamepad support, which is useful when the target platform doesn't have the libraries for udev (required by the gilrs dependency). This commit is a bit of a hack, it'd be nice to implement this better some day. --- src/devices/input_device.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/devices/input_device.rs') diff --git a/src/devices/input_device.rs b/src/devices/input_device.rs index d4e0cb0..3ebeb4c 100644 --- a/src/devices/input_device.rs +++ b/src/devices/input_device.rs @@ -132,6 +132,7 @@ impl InputDevice { } } + #[cfg(feature = "gamepad")] pub fn on_gamepad_event(&mut self, event: gilrs::Event) { if let Some(g) = self.gamepad_1.register(event.id) { self.wake |= g.process_event(&event); return; } -- cgit v1.2.3-70-g09d2