mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
fix: use "Discrete" key from switcheroo if present
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
parent
031015b332
commit
f6096d21db
1 changed files with 2 additions and 1 deletions
|
|
@ -131,7 +131,8 @@
|
|||
for (const auto& gpu : gpus) {
|
||||
QString name = qvariant_cast<QString>(gpu[QStringLiteral("Name")]);
|
||||
bool defaultGpu = qvariant_cast<bool>(gpu[QStringLiteral("Default")]);
|
||||
if (!defaultGpu) {
|
||||
bool discrete = qvariant_cast<bool>(gpu.value(QStringLiteral("Discrete"), !defaultGpu));
|
||||
if (discrete) {
|
||||
QStringList envList = qvariant_cast<QStringList>(gpu[QStringLiteral("Environment")]);
|
||||
for (int i = 0; i + 1 < envList.size(); i += 2) {
|
||||
env.insert(envList[i], envList[i + 1]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue