aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/InstanceWindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/ui/InstanceWindow.cpp')
-rw-r--r--launcher/ui/InstanceWindow.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/launcher/ui/InstanceWindow.cpp b/launcher/ui/InstanceWindow.cpp
index 5bf42bb5..09ce0d67 100644
--- a/launcher/ui/InstanceWindow.cpp
+++ b/launcher/ui/InstanceWindow.cpp
@@ -166,7 +166,13 @@ void InstanceWindow::updateLaunchButtons()
else
{
m_launchOfflineButton->setEnabled(true);
- m_launchDemoButton->setEnabled(true);
+
+ // Disable demo-mode if not available.
+ auto instance = dynamic_cast<MinecraftInstance*>(m_instance.get());
+ if (instance) {
+ m_launchDemoButton->setEnabled(instance->supportsDemo());
+ }
+
m_killButton->setText(tr("Launch"));
m_killButton->setObjectName("launchButton");
m_killButton->setToolTip(tr("Launch the instance"));