Skip to content

Commit e9856e2

Browse files
samvvfeschber
andcommitted
Fix CLI backend overrides
Co-authored-by: Ferdinand Schober <[email protected]>
1 parent 883d162 commit e9856e2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/config.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,9 @@ impl From<CaptureBackend> for input_capture::Backend {
172172

173173
#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize, ValueEnum)]
174174
pub enum EmulationBackend {
175+
#[cfg(all(target_os = "linux", feature = "evdev_emulation"))]
176+
#[serde(rename = "evdev")]
177+
Evdev,
175178
#[cfg(all(unix, feature = "wlroots_emulation", not(target_os = "macos")))]
176179
#[serde(rename = "wlroots")]
177180
Wlroots,
@@ -197,6 +200,8 @@ pub enum EmulationBackend {
197200
impl From<EmulationBackend> for input_emulation::Backend {
198201
fn from(backend: EmulationBackend) -> Self {
199202
match backend {
203+
#[cfg(all(target_os = "linux", feature = "evdev_emulation"))]
204+
EmulationBackend::Evdev => Self::Evdev,
200205
#[cfg(all(unix, feature = "wlroots_emulation", not(target_os = "macos")))]
201206
EmulationBackend::Wlroots => Self::Wlroots,
202207
#[cfg(all(unix, feature = "libei_emulation", not(target_os = "macos")))]
@@ -217,6 +222,8 @@ impl From<EmulationBackend> for input_emulation::Backend {
217222
impl Display for EmulationBackend {
218223
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
219224
match self {
225+
#[cfg(all(target_os = "linux", feature = "evdev_emulation"))]
226+
EmulationBackend::Evdev => write!(f, "evdev"),
220227
#[cfg(all(unix, feature = "wlroots_emulation", not(target_os = "macos")))]
221228
EmulationBackend::Wlroots => write!(f, "wlroots"),
222229
#[cfg(all(unix, feature = "libei_emulation", not(target_os = "macos")))]

0 commit comments

Comments
 (0)