Remove stale static cache from Proton discovery

This commit is contained in:
Marco Allegretti 2026-03-23 13:07:27 +01:00
parent 40a7b823ba
commit e216acc3df

View file

@ -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()