mirror of
https://invent.kde.org/marcoa/a-la-karte.git
synced 2026-03-26 17:03:08 +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 bool done = false;
|
||||
static QString cached;
|
||||
|
||||
if (done) {
|
||||
return cached;
|
||||
}
|
||||
done = true;
|
||||
|
||||
QStringList candidates;
|
||||
for (const QString &root : steamCandidateRoots()) {
|
||||
const QString compatTools = root + QStringLiteral("/compatibilitytools.d");
|
||||
|
|
@ -247,16 +239,15 @@ static QString discoverDefaultProtonExecutable()
|
|||
|
||||
for (const QString &c : candidates) {
|
||||
if (c.contains(QStringLiteral("Proton - Experimental"))) {
|
||||
cached = c;
|
||||
return cached;
|
||||
return c;
|
||||
}
|
||||
}
|
||||
|
||||
if (!candidates.isEmpty()) {
|
||||
cached = candidates.constLast();
|
||||
return candidates.constLast();
|
||||
}
|
||||
|
||||
return cached;
|
||||
return {};
|
||||
}
|
||||
|
||||
static QStringList steamCandidateRoots()
|
||||
|
|
|
|||
Loading…
Reference in a new issue