14#include <QDialogButtonBox>
31 : QDialog(parent), game_(game), gameId_(game ? game->id :
""), profileService_(profileService),
32 isGlobalMode_(false), themeManager_(themeManager ? themeManager : &
ThemeManager::instance())
35 game ? QString(
"Performance Profiles - %1").arg(QString::fromStdString(game->
name))
36 :
"Performance Profiles");
42 &PerformanceProfileDialog::applyTheme);
52 : QDialog(parent), profileService_(profileService), libraryController_(libraryController),
53 isGlobalMode_(true), themeManager_(themeManager ? themeManager : &
ThemeManager::instance())
55 setWindowTitle(
"Performance Profile Manager");
61 &PerformanceProfileDialog::applyTheme);
70void PerformanceProfileDialog::setupUI()
74 auto* mainLayout =
new QVBoxLayout(
this);
75 mainLayout->setSpacing(12);
76 mainLayout->setContentsMargins(16, 16, 16, 16);
79 if (isGlobalMode_ && libraryController_)
81 auto* gameLayout =
new QHBoxLayout();
82 auto* gameLabel =
new QLabel(
"Game:",
this);
83 gameCombo_ =
new QComboBox(
this);
84 gameCombo_->addItem(
"-- Global Profiles --", QString());
87 for (
const auto* g : games)
89 gameCombo_->addItem(QString::fromStdString(g->name), QString::fromStdString(g->id));
92 connect(gameCombo_, QOverload<int>::of(&QComboBox::currentIndexChanged),
this,
93 &PerformanceProfileDialog::onGameSelected);
95 gameLayout->addWidget(gameLabel);
96 gameLayout->addWidget(gameCombo_, 1);
97 mainLayout->addLayout(gameLayout);
101 auto* splitter =
new QSplitter(Qt::Horizontal,
this);
102 splitter->setChildrenCollapsible(
false);
105 auto* leftPanel =
new QWidget(
this);
106 auto* leftLayout =
new QVBoxLayout(leftPanel);
107 leftLayout->setContentsMargins(0, 0, 0, 0);
108 leftLayout->setSpacing(8);
110 auto* listLabel =
new QLabel(
"Profiles",
this);
111 listLabel->setStyleSheet(
"font-weight: bold; font-size: 13px;");
112 leftLayout->addWidget(listLabel);
115 leftLayout->addWidget(profileList_, 1);
118 auto* listBtnLayout =
new QHBoxLayout();
119 createBtn_ =
new QPushButton(
"+ New",
this);
120 createBtn_->setCursor(Qt::PointingHandCursor);
121 deleteBtn_ =
new QPushButton(
"Delete",
this);
122 deleteBtn_->setCursor(Qt::PointingHandCursor);
123 deleteBtn_->setEnabled(
false);
125 connect(createBtn_, &QPushButton::clicked,
this, &PerformanceProfileDialog::onCreateProfile);
126 connect(deleteBtn_, &QPushButton::clicked,
this, &PerformanceProfileDialog::onDeleteProfile);
128 listBtnLayout->addWidget(createBtn_);
129 listBtnLayout->addWidget(deleteBtn_);
130 listBtnLayout->addStretch();
131 leftLayout->addLayout(listBtnLayout);
133 splitter->addWidget(leftPanel);
136 setupProfileEditor();
137 splitter->addWidget(editorPanel_);
139 splitter->setSizes({250, 550});
140 mainLayout->addWidget(splitter, 1);
143 auto* buttonLayout =
new QHBoxLayout();
144 buttonLayout->addStretch();
146 applyBtn_ =
new QPushButton(
"Apply to Game",
this);
147 applyBtn_->setCursor(Qt::PointingHandCursor);
148 applyBtn_->setEnabled(
false);
149 connect(applyBtn_, &QPushButton::clicked,
this, &PerformanceProfileDialog::onApplyProfile);
151 closeBtn_ =
new QPushButton(
"Close",
this);
152 closeBtn_->setCursor(Qt::PointingHandCursor);
153 connect(closeBtn_, &QPushButton::clicked,
this, &QDialog::accept);
155 buttonLayout->addWidget(applyBtn_);
156 buttonLayout->addWidget(closeBtn_);
157 mainLayout->addLayout(buttonLayout);
160void PerformanceProfileDialog::setupProfileList()
162 profileList_ =
new QListWidget(
this);
163 profileList_->setMinimumWidth(200);
164 profileList_->setSelectionMode(QAbstractItemView::SingleSelection);
166 connect(profileList_, &QListWidget::currentItemChanged,
this,
167 &PerformanceProfileDialog::onProfileSelected);
170void PerformanceProfileDialog::setupProfileEditor()
172 editorPanel_ =
new QWidget(
this);
173 auto* editorLayout =
new QVBoxLayout(editorPanel_);
174 editorLayout->setContentsMargins(8, 0, 0, 0);
175 editorLayout->setSpacing(12);
178 auto* scrollArea =
new QScrollArea(
this);
179 scrollArea->setWidgetResizable(
true);
180 scrollArea->setFrameShape(QFrame::NoFrame);
182 auto* scrollContent =
new QWidget();
183 auto* contentLayout =
new QVBoxLayout(scrollContent);
184 contentLayout->setSpacing(16);
187 auto* basicGroup =
new QGroupBox(
"Profile Settings",
this);
188 auto* basicLayout =
new QFormLayout(basicGroup);
189 basicLayout->setSpacing(8);
191 nameEdit_ =
new QLineEdit(
this);
192 nameEdit_->setPlaceholderText(
"Profile name");
193 connect(nameEdit_, &QLineEdit::textChanged,
this, &PerformanceProfileDialog::onSettingsChanged);
194 basicLayout->addRow(
"Name:", nameEdit_);
196 descEdit_ =
new QTextEdit(
this);
197 descEdit_->setMaximumHeight(60);
198 descEdit_->setPlaceholderText(
"Optional description");
199 connect(descEdit_, &QTextEdit::textChanged,
this, &PerformanceProfileDialog::onSettingsChanged);
200 basicLayout->addRow(
"Description:", descEdit_);
202 presetCombo_ =
new QComboBox(
this);
203 presetCombo_->addItem(
"Custom", -1);
204 presetCombo_->addItem(
"Default (Balanced)", 0);
205 presetCombo_->addItem(
"High Performance", 1);
206 presetCombo_->addItem(
"Battery Saver", 2);
207 presetCombo_->addItem(
"Streaming/Recording", 3);
208 connect(presetCombo_, QOverload<int>::of(&QComboBox::currentIndexChanged),
this,
209 &PerformanceProfileDialog::onPresetSelected);
210 basicLayout->addRow(
"Preset:", presetCombo_);
212 contentLayout->addWidget(basicGroup);
215 displayGroup_ =
new QGroupBox(
"Display & Overlays",
this);
216 auto* displayLayout =
new QVBoxLayout(displayGroup_);
218 mangoHudCheck_ =
new QCheckBox(
"Enable MangoHud (FPS overlay)",
this);
219 connect(mangoHudCheck_, &QCheckBox::toggled,
this,
220 &PerformanceProfileDialog::onSettingsChanged);
221 displayLayout->addWidget(mangoHudCheck_);
223 gameModCheck_ =
new QCheckBox(
"Enable GameMode (performance optimizations)",
this);
224 connect(gameModCheck_, &QCheckBox::toggled,
this, &PerformanceProfileDialog::onSettingsChanged);
225 displayLayout->addWidget(gameModCheck_);
227 gamescopeCheck_ =
new QCheckBox(
"Enable Gamescope (compositor)",
this);
228 connect(gamescopeCheck_, &QCheckBox::toggled,
this,
231 gamescopeGroup_->setEnabled(checked);
234 displayLayout->addWidget(gamescopeCheck_);
236 vkbasaltCheck_ =
new QCheckBox(
"Enable vkBasalt (post-processing)",
this);
237 connect(vkbasaltCheck_, &QCheckBox::toggled,
this,
238 &PerformanceProfileDialog::onSettingsChanged);
239 displayLayout->addWidget(vkbasaltCheck_);
241 contentLayout->addWidget(displayGroup_);
244 gamescopeGroup_ =
new QGroupBox(
"Gamescope Settings",
this);
245 gamescopeGroup_->setEnabled(
false);
246 auto* gsLayout =
new QFormLayout(gamescopeGroup_);
248 gamescopeWidthSpin_ =
new QSpinBox(
this);
249 gamescopeWidthSpin_->setRange(640, 7680);
250 gamescopeWidthSpin_->setValue(1920);
251 gamescopeWidthSpin_->setSuffix(
" px");
252 connect(gamescopeWidthSpin_, QOverload<int>::of(&QSpinBox::valueChanged),
this,
253 &PerformanceProfileDialog::onSettingsChanged);
254 gsLayout->addRow(
"Width:", gamescopeWidthSpin_);
256 gamescopeHeightSpin_ =
new QSpinBox(
this);
257 gamescopeHeightSpin_->setRange(480, 4320);
258 gamescopeHeightSpin_->setValue(1080);
259 gamescopeHeightSpin_->setSuffix(
" px");
260 connect(gamescopeHeightSpin_, QOverload<int>::of(&QSpinBox::valueChanged),
this,
261 &PerformanceProfileDialog::onSettingsChanged);
262 gsLayout->addRow(
"Height:", gamescopeHeightSpin_);
264 gamescopeFullscreenCheck_ =
new QCheckBox(
this);
265 connect(gamescopeFullscreenCheck_, &QCheckBox::toggled,
this,
266 &PerformanceProfileDialog::onSettingsChanged);
267 gsLayout->addRow(
"Fullscreen:", gamescopeFullscreenCheck_);
269 gamescopeBorderlessCheck_ =
new QCheckBox(
this);
270 connect(gamescopeBorderlessCheck_, &QCheckBox::toggled,
this,
271 &PerformanceProfileDialog::onSettingsChanged);
272 gsLayout->addRow(
"Borderless:", gamescopeBorderlessCheck_);
274 gamescopeScalerCombo_ =
new QComboBox(
this);
275 gamescopeScalerCombo_->addItem(
"Auto",
"auto");
276 gamescopeScalerCombo_->addItem(
"Integer",
"integer");
277 gamescopeScalerCombo_->addItem(
"Fit",
"fit");
278 gamescopeScalerCombo_->addItem(
"Fill",
"fill");
279 gamescopeScalerCombo_->addItem(
"Stretch",
"stretch");
280 connect(gamescopeScalerCombo_, QOverload<int>::of(&QComboBox::currentIndexChanged),
this,
281 &PerformanceProfileDialog::onSettingsChanged);
282 gsLayout->addRow(
"Scaler:", gamescopeScalerCombo_);
284 gamescopeFpsLimitSpin_ =
new QSpinBox(
this);
285 gamescopeFpsLimitSpin_->setRange(0, 360);
286 gamescopeFpsLimitSpin_->setValue(0);
287 gamescopeFpsLimitSpin_->setSpecialValueText(
"Unlimited");
288 gamescopeFpsLimitSpin_->setSuffix(
" FPS");
289 connect(gamescopeFpsLimitSpin_, QOverload<int>::of(&QSpinBox::valueChanged),
this,
290 &PerformanceProfileDialog::onSettingsChanged);
291 gsLayout->addRow(
"FPS Limit:", gamescopeFpsLimitSpin_);
293 contentLayout->addWidget(gamescopeGroup_);
296 wineGroup_ =
new QGroupBox(
"Wine/Proton Settings",
this);
297 auto* wineLayout =
new QVBoxLayout(wineGroup_);
299 fsyncCheck_ =
new QCheckBox(
"Enable Fsync (fast synchronization)",
this);
300 connect(fsyncCheck_, &QCheckBox::toggled,
this, &PerformanceProfileDialog::onSettingsChanged);
301 wineLayout->addWidget(fsyncCheck_);
303 esyncCheck_ =
new QCheckBox(
"Enable Esync (eventfd synchronization)",
this);
304 connect(esyncCheck_, &QCheckBox::toggled,
this, &PerformanceProfileDialog::onSettingsChanged);
305 wineLayout->addWidget(esyncCheck_);
307 ntsyncCheck_ =
new QCheckBox(
"Enable NTSync (kernel 6.14+, experimental)",
this);
308 connect(ntsyncCheck_, &QCheckBox::toggled,
this, &PerformanceProfileDialog::onSettingsChanged);
309 wineLayout->addWidget(ntsyncCheck_);
311 dxvkAsyncCheck_ =
new QCheckBox(
"DXVK Async shader compilation",
this);
312 connect(dxvkAsyncCheck_, &QCheckBox::toggled,
this,
313 &PerformanceProfileDialog::onSettingsChanged);
314 wineLayout->addWidget(dxvkAsyncCheck_);
316 dxvkHudCheck_ =
new QCheckBox(
"DXVK HUD (show Vulkan stats)",
this);
317 connect(dxvkHudCheck_, &QCheckBox::toggled,
this, &PerformanceProfileDialog::onSettingsChanged);
318 wineLayout->addWidget(dxvkHudCheck_);
320 contentLayout->addWidget(wineGroup_);
323 envGroup_ =
new QGroupBox(
"Custom Environment Variables",
this);
324 auto* envLayout =
new QVBoxLayout(envGroup_);
326 auto* envHint =
new QLabel(
"One variable per line: VAR_NAME=value",
this);
327 envHint->setStyleSheet(
"color: gray; font-size: 11px;");
328 envLayout->addWidget(envHint);
330 envVarsEdit_ =
new QTextEdit(
this);
331 envVarsEdit_->setMaximumHeight(80);
332 envVarsEdit_->setPlaceholderText(
"MESA_GL_VERSION_OVERRIDE=4.6\nDXVK_ASYNC=1");
333 connect(envVarsEdit_, &QTextEdit::textChanged,
this,
334 &PerformanceProfileDialog::onSettingsChanged);
335 envLayout->addWidget(envVarsEdit_);
337 contentLayout->addWidget(envGroup_);
339 contentLayout->addStretch();
341 scrollArea->setWidget(scrollContent);
342 editorLayout->addWidget(scrollArea);
349void PerformanceProfileDialog::refreshProfileList()
351 profileList_->clear();
353 if (!profileService_)
356 std::vector<PerformanceProfile> profiles;
363 profiles = profileService_->getGlobalProfiles();
367 profiles = profileService_->getProfiles(gameId_);
370 else if (!gameId_.empty())
372 profiles = profileService_->getProfiles(gameId_);
376 std::string activeId;
377 if (!gameId_.empty())
379 auto active = profileService_->getActiveProfile(gameId_);
382 activeId = active->id;
386 for (
const auto& profile : profiles)
388 auto* item =
new QListWidgetItem(QString::fromStdString(profile.name));
389 item->setData(Qt::UserRole, QString::fromStdString(profile.id));
391 if (profile.id == activeId)
393 item->setText(QString::fromStdString(profile.name) +
" ★");
394 auto font = item->font();
399 profileList_->addItem(item);
402 updateButtonStates();
405void PerformanceProfileDialog::loadProfileSettings(
const std::string& profileId)
407 if (!profileService_ || profileId.empty())
410 std::optional<PerformanceProfile> profile;
412 if (isGlobalMode_ && gameId_.empty())
415 auto globals = profileService_->getGlobalProfiles();
416 for (
const auto& p : globals)
418 if (p.id == profileId)
427 profile = profileService_->getProfile(gameId_.empty() ?
"__global__" : gameId_, profileId);
434 nameEdit_->blockSignals(
true);
435 descEdit_->blockSignals(
true);
437 nameEdit_->setText(QString::fromStdString(profile->name));
438 descEdit_->setText(QString::fromStdString(profile->description));
441 mangoHudCheck_->setChecked(profile->wrappers.enableMangoHud);
442 gameModCheck_->setChecked(profile->wrappers.enableGameMode);
443 gamescopeCheck_->setChecked(profile->framerate.useGamescope);
444 vkbasaltCheck_->setChecked(profile->wrappers.enableVkBasalt);
447 gamescopeGroup_->setEnabled(profile->framerate.useGamescope);
448 gamescopeWidthSpin_->setValue(
449 profile->scaling.internalWidth > 0 ? profile->scaling.internalWidth : 1920);
450 gamescopeHeightSpin_->setValue(
451 profile->scaling.internalHeight > 0 ? profile->scaling.internalHeight : 1080);
452 gamescopeFullscreenCheck_->setChecked(
true);
453 gamescopeBorderlessCheck_->setChecked(
false);
454 gamescopeFpsLimitSpin_->setValue(profile->framerate.fpsLimit);
457 fsyncCheck_->setChecked(profile->sync.enableFsync);
458 esyncCheck_->setChecked(profile->sync.enableEsync);
459 ntsyncCheck_->setChecked(profile->sync.enableNTSync);
461 dxvkAsyncCheck_->setChecked(profile->environmentVariables.count(
"DXVK_ASYNC") > 0);
462 dxvkHudCheck_->setChecked(profile->environmentVariables.count(
"DXVK_HUD") > 0);
466 for (
const auto& [key, value] : profile->environmentVariables)
469 if (key ==
"DXVK_ASYNC" || key ==
"DXVK_HUD")
471 envText += QString::fromStdString(key) +
"=" + QString::fromStdString(value) +
"\n";
473 envVarsEdit_->setText(envText.trimmed());
475 nameEdit_->blockSignals(
false);
476 descEdit_->blockSignals(
false);
479 presetCombo_->setCurrentIndex(0);
482void PerformanceProfileDialog::saveCurrentProfile()
484 if (!profileService_ || currentProfileId_.empty())
487 auto profile = buildProfileFromUI();
488 profile.id = currentProfileId_;
491 profileService_->updateProfile(isGlobalMode_ && gameId_.empty() ?
"__global__" : gameId_,
495 refreshProfileList();
498 for (
int i = 0; i < profileList_->count(); ++i)
500 if (profileList_->item(i)->data(Qt::UserRole).toString().toStdString() == currentProfileId_)
502 profileList_->setCurrentRow(i);
510 PerformanceProfile profile;
512 profile.
name = nameEdit_->text().toStdString();
513 profile.
description = descEdit_->toPlainText().toStdString();
534 QString envText = envVarsEdit_->toPlainText();
535 for (
const QString& line : envText.split(
'\n', Qt::SkipEmptyParts))
537 qsizetype eqPos = line.indexOf(
'=');
540 QString key = line.left(
static_cast<int>(eqPos)).trimmed();
541 QString value = line.mid(
static_cast<int>(eqPos) + 1).trimmed();
547 if (dxvkAsyncCheck_->isChecked())
551 if (dxvkHudCheck_->isChecked())
563void PerformanceProfileDialog::onProfileSelected(QListWidgetItem* current,
564 QListWidgetItem* previous)
569 if (isDirty_ && !currentProfileId_.empty())
572 QMessageBox::question(
this,
"Save Changes",
"Save changes to the current profile?",
573 QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel);
575 if (reply == QMessageBox::Yes)
577 saveCurrentProfile();
579 else if (reply == QMessageBox::Cancel)
582 for (
int i = 0; i < profileList_->count(); ++i)
584 if (profileList_->item(i)->data(Qt::UserRole).toString().toStdString() ==
587 profileList_->blockSignals(
true);
588 profileList_->setCurrentRow(i);
589 profileList_->blockSignals(
false);
598 currentProfileId_.clear();
599 editorPanel_->setEnabled(
false);
600 updateButtonStates();
604 currentProfileId_ = current->data(Qt::UserRole).toString().toStdString();
605 editorPanel_->setEnabled(
true);
606 loadProfileSettings(currentProfileId_);
607 updateButtonStates();
610void PerformanceProfileDialog::onCreateProfile()
612 if (!profileService_)
616 QString baseName =
"New Profile";
618 QString name = baseName;
620 auto existingProfiles = isGlobalMode_ && gameId_.empty()
621 ? profileService_->getGlobalProfiles()
622 : profileService_->getProfiles(gameId_);
627 for (
const auto& p : existingProfiles)
629 if (p.name == name.toStdString())
637 name = QString(
"%1 %2").arg(baseName).arg(++counter);
641 auto profile = profileService_->getDefaultProfile();
642 profile.
id = QUuid::createUuid().toString(QUuid::WithoutBraces).toStdString();
643 profile.
name = name.toStdString();
645 bool success =
false;
646 if (isGlobalMode_ && gameId_.empty())
648 success = profileService_->createGlobalProfile(profile);
652 success = profileService_->createProfile(gameId_, profile);
657 refreshProfileList();
660 for (
int i = 0; i < profileList_->count(); ++i)
662 if (profileList_->item(i)->data(Qt::UserRole).toString().toStdString() == profile.
id)
664 profileList_->setCurrentRow(i);
665 nameEdit_->selectAll();
666 nameEdit_->setFocus();
673void PerformanceProfileDialog::onDeleteProfile()
675 if (!profileService_ || currentProfileId_.empty())
678 auto reply = QMessageBox::question(
this,
"Delete Profile",
679 QString(
"Delete profile '%1'?").arg(nameEdit_->text()),
680 QMessageBox::Yes | QMessageBox::No);
682 if (reply != QMessageBox::Yes)
686 bool success = profileService_->deleteProfile(
687 isGlobalMode_ && gameId_.empty() ?
"__global__" : gameId_, currentProfileId_);
691 currentProfileId_.clear();
693 refreshProfileList();
697void PerformanceProfileDialog::onApplyProfile()
699 if (!profileService_ || currentProfileId_.empty() || gameId_.empty())
705 saveCurrentProfile();
709 profileService_->setActiveProfile(gameId_, currentProfileId_);
713 refreshProfileList();
715 QMessageBox::information(
716 this,
"Profile Applied",
717 QString(
"Profile '%1' is now active for this game.").arg(nameEdit_->text()));
720void PerformanceProfileDialog::onPresetSelected(
int index)
722 if (!profileService_ || index <= 0)
725 int presetType = presetCombo_->itemData(index).toInt();
729 auto preset = profileService_->createFromPreset(
static_cast<PerformancePreset>(presetType));
732 mangoHudCheck_->setChecked(preset.wrappers.enableMangoHud);
733 gameModCheck_->setChecked(preset.wrappers.enableGameMode);
734 gamescopeCheck_->setChecked(preset.framerate.useGamescope);
735 vkbasaltCheck_->setChecked(preset.wrappers.enableVkBasalt);
737 fsyncCheck_->setChecked(preset.sync.enableFsync);
738 esyncCheck_->setChecked(preset.sync.enableEsync);
739 ntsyncCheck_->setChecked(preset.sync.enableNTSync);
742 dxvkAsyncCheck_->setChecked(preset.environmentVariables.count(
"DXVK_ASYNC") > 0);
743 dxvkHudCheck_->setChecked(preset.environmentVariables.count(
"DXVK_HUD") > 0);
748void PerformanceProfileDialog::onSettingsChanged()
751 presetCombo_->setCurrentIndex(0);
752 updateButtonStates();
755void PerformanceProfileDialog::onGameSelected(
int index)
760 QString
id = gameCombo_->itemData(index).toString();
761 gameId_ =
id.toStdString();
762 refreshProfileList();
765void PerformanceProfileDialog::updateButtonStates()
767 bool hasSelection = !currentProfileId_.empty();
768 bool hasGame = !gameId_.empty();
770 deleteBtn_->setEnabled(hasSelection);
771 applyBtn_->setEnabled(hasSelection && hasGame);
772 editorPanel_->setEnabled(hasSelection);
777 return currentProfileId_;
784void PerformanceProfileDialog::applyTheme()
789 QString(
"QDialog { background-color: %1; }"
790 "QGroupBox { font-weight: bold; border: 1px solid %2; border-radius: 4px; "
791 " margin-top: 8px; padding-top: 8px; }"
792 "QGroupBox::title { subcontrol-origin: margin; left: 10px; padding: 0 3px; }"
793 "QLineEdit, QTextEdit, QSpinBox, QComboBox { "
794 " background-color: %3; border: 1px solid %2; border-radius: 4px; padding: 4px; }"
795 "QLineEdit:focus, QTextEdit:focus, QSpinBox:focus, QComboBox:focus { "
796 " border-color: %4; }"
797 "QPushButton { background-color: %5; border: 1px solid %2; border-radius: 4px; "
798 " padding: 6px 16px; }"
799 "QPushButton:hover { background-color: %6; border-color: %4; }"
800 "QPushButton:pressed { background-color: %4; }"
801 "QListWidget { background-color: %3; border: 1px solid %2; border-radius: 4px; }"
802 "QListWidget::item { padding: 6px; }"
803 "QListWidget::item:selected { background-color: %4; color: %7; }"
804 "QCheckBox { spacing: 6px; }"
805 "QScrollArea { border: none; }")
816 applyBtn_->setStyleSheet(
817 QString(
"QPushButton { background-color: %1; color: %2; font-weight: bold; }"
818 "QPushButton:hover { background-color: %3; }"
819 "QPushButton:disabled { background-color: %4; color: %5; }")
Complete representation of a game in the library.
std::string name
Display name shown in UI.
void themeChanged()
Emitted when theme or accent color changes.
const ThemeColors & colors() const
Get effective colors (with accent customization applied).
std::vector< Game * > getAllGames()
Get all games (non-const for process tracking).
int fpsLimit
FPS limit (0 = unlimited).
bool useGamescope
Use Gamescope compositor.
int internalWidth
Internal render width (0 = native).
int internalHeight
Internal render height (0 = native).
bool enableNTSync
Use NTSync (experimental, kernel 6.14+).
bool enableEsync
Use Esync if Fsync unavailable.
bool enableFsync
Use Fsync if available.
bool enableGameMode
Feral GameMode.
bool enableVkBasalt
VkBasalt post-processing.
bool enableMangoHud
MangoHud overlay.