diff --git a/ui/Cargo.lock b/ui/Cargo.lock index 6ca026a..12b4239 100644 --- a/ui/Cargo.lock +++ b/ui/Cargo.lock @@ -690,7 +690,6 @@ dependencies = [ "libadwaita", "proc-maps", "procfs", - "regex", "serde", "toml 0.9.2", ] diff --git a/ui/Cargo.toml b/ui/Cargo.toml index f71a00b..f8593f9 100644 --- a/ui/Cargo.toml +++ b/ui/Cargo.toml @@ -11,7 +11,6 @@ toml = "0.9.2" anyhow = "1.0" procfs = "0.17.0" proc-maps = "0.4.0" -regex = "1.11.1" [build-dependencies] glib-build-tools = "0.21.0" diff --git a/ui/src/utils.rs b/ui/src/utils.rs index 024b68c..17a8048 100644 --- a/ui/src/utils.rs +++ b/ui/src/utils.rs @@ -26,7 +26,7 @@ pub fn find_vulkan_processes() -> ProcResult> { let pid = process.pid(); - // By default, assume Linux process, and use comm + // By default, assume Linux process, and use /proc/self/comm let mut name = process.stat()?.comm; // Solely just for checking if it's a Proton or Wine process @@ -35,13 +35,13 @@ pub fn find_vulkan_processes() -> ProcResult> { // If this is a Proton or Wine process with .exe, - // then extract just the .exe name with RegEx + // then just get filename from /proc/self/maps if cmdline.contains(".exe") { for map in &maps { if let Some(path) = map.filename() { let path_str = path.to_string_lossy().to_lowercase(); if path_str.contains(".exe") && - !path_str.contains("wine") && + !path_str.contains("wine") && // Make sure .exe is not from Wine path_str.contains('/') || path_str.contains('\\') {