mirror of
https://github.com/PancakeTAS/lsfg-vk.git
synced 2025-10-30 07:01:10 +00:00
feat(exe): fix comments, remove regex dependency
This commit is contained in:
parent
ec59c072b5
commit
26e4dc5827
3 changed files with 3 additions and 5 deletions
1
ui/Cargo.lock
generated
1
ui/Cargo.lock
generated
|
|
@ -690,7 +690,6 @@ dependencies = [
|
|||
"libadwaita",
|
||||
"proc-maps",
|
||||
"procfs",
|
||||
"regex",
|
||||
"serde",
|
||||
"toml 0.9.2",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ pub fn find_vulkan_processes() -> ProcResult<Vec<(String, String)>> {
|
|||
|
||||
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<Vec<(String, String)>> {
|
|||
|
||||
|
||||
// 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('\\') {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue