Skip to content

Commit

Permalink
Use Lutris DB platform value over spec
Browse files Browse the repository at this point in the history
It is unlikely that this would ever change for a game so it's less important to ensure that we're prioritising the correct source, but while we could likely try to infer the platform from what fields are used in the spec and what form they're in, the database contains an explicit value which is more likely to be used when deciding how to launch a game than an inference process.

We also never set `platform` in `scan_spec` so this is also a minor optimisation.
  • Loading branch information
nihaals authored Jun 24, 2024
1 parent 2085997 commit 8e10fea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scan/launchers/lutris.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ impl Pending {
// Lutris updates the spec, but not the database,
// so we prefer the spec version.
prefix: spec.prefix.or(db.prefix),
platform: spec.platform.or(db.platform),
platform: db.platform.or(spec.platform),
install_dir: spec.install_dir.or(db.install_dir),
}
}
Expand Down

0 comments on commit 8e10fea

Please # to comment.