mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-18 12:28:40 +00:00
Tighten Steam process detection tests
This commit is contained in:
1 parent
2938c63d2c
commit
f3383d226c
2 files changed
+2
-1
No files matched your search
@@ -3,7 +3,6 @@ package com.droiddeck.launcher.session
|
||||
import java.io.File
|
||||
|
||||
object SteamGameProcess {
|
||||
// Compatibilidade com telas que precisam detectar qualquer jogo Steam.
|
||||
fun matches(cmdline: ByteArray): Boolean {
|
||||
val args = String(cmdline).split('\u0000')
|
||||
return args.indices.any { i ->
|
||||
|
||||
@@ -36,6 +36,8 @@ class SteamGameProcessTest {
|
||||
process("100", "pgrep", "-a", "-f", "SteamLaunch AppId=[0-9]")
|
||||
process("self", "reaper", "SteamLaunch", "AppId=1")
|
||||
assertFalse(SteamGameProcess.running("976310", proc))
|
||||
assertFalse(SteamGameProcess.running("1", proc))
|
||||
process("101", "reaper", "SteamLaunch", "AppId=1")
|
||||
assertTrue(SteamGameProcess.running("1", proc))
|
||||
process("200", "reaper", "SteamLaunch", "AppId=976310", "--", "proton", "waitforexitandrun", "MK11.exe")
|
||||
assertTrue(SteamGameProcess.running("976310", proc))
|
||||
|
||||
Reference in new issue
Block a user