fix(session): look up the launched game without rescanning the library (#1595)

This commit is contained in:
kingokksa authored and GitHub committed 2026-10-27 15:53:31 -04:00
1 parent 2d19c31872
commit 4f58230a20
1 file changed
+2 -1
@@ -51,7 +51,8 @@ object NoSteamLaunch {
fun addedGame(context: Context, game: Library.SteamGame): AddedGames.Game? {
val id = game.appId.toLong() and 0xFFFFFFFFL
return AddedGames.scan(context).firstOrNull { settingsId(it) == id }
val one = game.gameFiles?.let { AddedGames.single(context, it.path) }
return one?.takeIf { settingsId(it) == id } ?: AddedGames.scan(context).firstOrNull { settingsId(it) == id }
}
fun nameFor(program: String?, args: List<String>): String? = when (program) {