From 3d7c4f63ea182508ceabbd79de2b04c0b28f6088 Mon Sep 17 00:00:00 2001 From: gered Date: Mon, 30 Jan 2023 18:51:24 -0500 Subject: [PATCH] match more environments forgot about the BSDs, which i guess all have KDE available for them too? never used BSD myself! --- libretrogd/src/system/mod.rs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/libretrogd/src/system/mod.rs b/libretrogd/src/system/mod.rs index ef92d1a..d2f5d01 100644 --- a/libretrogd/src/system/mod.rs +++ b/libretrogd/src/system/mod.rs @@ -40,13 +40,14 @@ fn is_x11_compositor_skipping_problematic() -> bool { configurations could be added here and/or this could/should be updated with a better method to check for this. */ - if std::env::consts::OS == "linux" { - match std::env::var("XDG_SESSION_DESKTOP") { - Ok(value) => value.eq_ignore_ascii_case("KDE"), - Err(_) => false - } - } else { - false + match std::env::consts::OS { + "linux"|"freebsd"|"netbsd"|"openbsd" => { + match std::env::var("XDG_SESSION_DESKTOP") { + Ok(value) => value.eq_ignore_ascii_case("KDE"), + Err(_) => false + } + }, + _ => false, } }