aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/pages
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2022-08-08 21:03:02 +0200
committerSefa Eyeoglu <contact@scrumplex.net>2022-08-08 21:16:37 +0200
commit68f3f98bc3974667812ed778d572a0aeb0c89bec (patch)
tree3b097a452c15cbd267a771c338081e3f05395e93 /launcher/ui/pages
parentf873cd5b1aa17fe8119f27cc5d9b9eba10bd42bf (diff)
downloadPrismLauncher-68f3f98bc3974667812ed778d572a0aeb0c89bec.tar.gz
PrismLauncher-68f3f98bc3974667812ed778d572a0aeb0c89bec.tar.bz2
PrismLauncher-68f3f98bc3974667812ed778d572a0aeb0c89bec.zip
feat: detect GameMode and MangoHud's presence
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
Diffstat (limited to 'launcher/ui/pages')
-rw-r--r--launcher/ui/pages/global/MinecraftPage.cpp10
-rw-r--r--launcher/ui/pages/instance/InstanceSettingsPage.cpp14
2 files changed, 22 insertions, 2 deletions
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());