mirror of
https://invent.kde.org/marcoa/a-la-karte.git
synced 2026-03-27 01:03:09 +00:00
Remove stale static cache from Proton discovery
This commit is contained in:
parent
40a7b823ba
commit
e216acc3df
1 changed files with 3 additions and 12 deletions
|
|
@ -204,14 +204,6 @@ static QString findSteamClientInstallPathFromProton(const QString &protonExe)
|
||||||
|
|
||||||
static QString discoverDefaultProtonExecutable()
|
static QString discoverDefaultProtonExecutable()
|
||||||
{
|
{
|
||||||
static bool done = false;
|
|
||||||
static QString cached;
|
|
||||||
|
|
||||||
if (done) {
|
|
||||||
return cached;
|
|
||||||
}
|
|
||||||
done = true;
|
|
||||||
|
|
||||||
QStringList candidates;
|
QStringList candidates;
|
||||||
for (const QString &root : steamCandidateRoots()) {
|
for (const QString &root : steamCandidateRoots()) {
|
||||||
const QString compatTools = root + QStringLiteral("/compatibilitytools.d");
|
const QString compatTools = root + QStringLiteral("/compatibilitytools.d");
|
||||||
|
|
@ -247,16 +239,15 @@ static QString discoverDefaultProtonExecutable()
|
||||||
|
|
||||||
for (const QString &c : candidates) {
|
for (const QString &c : candidates) {
|
||||||
if (c.contains(QStringLiteral("Proton - Experimental"))) {
|
if (c.contains(QStringLiteral("Proton - Experimental"))) {
|
||||||
cached = c;
|
return c;
|
||||||
return cached;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!candidates.isEmpty()) {
|
if (!candidates.isEmpty()) {
|
||||||
cached = candidates.constLast();
|
return candidates.constLast();
|
||||||
}
|
}
|
||||||
|
|
||||||
return cached;
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
static QStringList steamCandidateRoots()
|
static QStringList steamCandidateRoots()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue