aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/pages
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2022-09-05 17:45:17 +0200
committerGitHub <noreply@github.com>2022-09-05 17:45:17 +0200
commit8e3356f11a81cba394f57567e7521c3ccc2c3afa (patch)
tree12c44b9a4eeb96a63e433dd88b8eba5d6c45ac8b /launcher/ui/pages
parent2f167b1512dc0c3b80731ae412d55ee897da14fd (diff)
parentd82bb29919d1cc6a9ead4a4e4a18d7b02c5221eb (diff)
downloadPrismLauncher-8e3356f11a81cba394f57567e7521c3ccc2c3afa.tar.gz
PrismLauncher-8e3356f11a81cba394f57567e7521c3ccc2c3afa.tar.bz2
PrismLauncher-8e3356f11a81cba394f57567e7521c3ccc2c3afa.zip
Merge pull request #1034 from Scrumplex/detect-performance-features
Diffstat (limited to 'launcher/ui/pages')
-rw-r--r--launcher/ui/pages/global/AccountListPage.cpp2
-rw-r--r--launcher/ui/pages/global/MinecraftPage.cpp10
-rw-r--r--launcher/ui/pages/instance/InstanceSettingsPage.cpp14
3 files changed, 23 insertions, 3 deletions
diff --git a/launcher/ui/pages/global/AccountListPage.cpp b/launcher/ui/pages/global/AccountListPage.cpp
index fcc43add..a4f4dfb9 100644
--- a/launcher/ui/pages/global/AccountListPage.cpp
+++ b/launcher/ui/pages/global/AccountListPage.cpp
@@ -96,7 +96,7 @@ AccountListPage::AccountListPage(QWidget *parent)
updateButtonStates();
// Xbox authentication won't work without a client identifier, so disable the button if it is missing
- if (~APPLICATION->currentCapabilities() & Application::SupportsMSA) {
+ if (~APPLICATION->capabilities() & Application::SupportsMSA) {
ui->actionAddMicrosoft->setVisible(false);
ui->actionAddMicrosoft->setToolTip(tr("No Microsoft Authentication client ID was set."));
}
diff --git a/launcher/ui/pages/global/MinecraftPage.cpp b/launcher/ui/pages/global/MinecraftPage.cpp
index e3ac7e7c..cc597fe0 100644
--- a/launcher/ui/pages/global/MinecraftPage.cpp
+++ b/launcher/ui/pages/global/MinecraftPage.cpp
@@ -122,6 +122,16 @@ void MinecraftPage::loadSettings()
ui->perfomanceGroupBox->setVisible(false);
#endif
+ if (!(APPLICATION->capabilities() & Application::SupportsGameMode)) {
+ ui->enableFeralGamemodeCheck->setDisabled(true);
+ ui->enableFeralGamemodeCheck->setToolTip(tr("Feral Interactive's GameMode could not be found on your system."));
+ }
+
+ if (!(APPLICATION->capabilities() & Application::SupportsMangoHud)) {
+ ui->enableMangoHud->setDisabled(true);
+ ui->enableMangoHud->setToolTip(tr("MangoHud could not be found on your system."));
+ }
+
ui->showGameTime->setChecked(s->get("ShowGameTime").toBool());
ui->showGlobalGameTime->setChecked(s->get("ShowGlobalGameTime").toBool());
ui->recordGameTime->setChecked(s->get("RecordGameTime").toBool());
diff --git a/launcher/ui/pages/instance/InstanceSettingsPage.cpp b/launcher/ui/pages/instance/InstanceSettingsPage.cpp
index f11cf992..03910745 100644
--- a/launcher/ui/pages/instance/InstanceSettingsPage.cpp
+++ b/launcher/ui/pages/instance/InstanceSettingsPage.cpp
@@ -348,9 +348,19 @@ void InstanceSettingsPage::loadSettings()
ui->enableMangoHud->setChecked(m_settings->get("EnableMangoHud").toBool());
ui->useDiscreteGpuCheck->setChecked(m_settings->get("UseDiscreteGpu").toBool());
- #if !defined(Q_OS_LINUX)
+#if !defined(Q_OS_LINUX)
ui->settingsTabs->setTabVisible(ui->settingsTabs->indexOf(ui->performancePage), false);
- #endif
+#endif
+
+ if (!(APPLICATION->capabilities() & Application::SupportsGameMode)) {
+ ui->enableFeralGamemodeCheck->setDisabled(true);
+ ui->enableFeralGamemodeCheck->setToolTip(tr("Feral Interactive's GameMode could not be found on your system."));
+ }
+
+ if (!(APPLICATION->capabilities() & Application::SupportsMangoHud)) {
+ ui->enableMangoHud->setDisabled(true);
+ ui->enableMangoHud->setToolTip(tr("MangoHud could not be found on your system."));
+ }
// Miscellanous
ui->gameTimeGroupBox->setChecked(m_settings->get("OverrideGameTime").toBool());