aboutsummaryrefslogtreecommitdiff
path: root/application/MultiMC.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'application/MultiMC.cpp')
-rw-r--r--application/MultiMC.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/application/MultiMC.cpp b/application/MultiMC.cpp
index 86f426f8..a8d26498 100644
--- a/application/MultiMC.cpp
+++ b/application/MultiMC.cpp
@@ -146,6 +146,27 @@ MultiMC::MultiMC(int &argc, char **argv) : QApplication(argc, argv)
startTime = QDateTime::currentDateTime();
+#ifdef Q_OS_LINUX
+ {
+ QFile osrelease("/proc/sys/kernel/osrelease");
+ if (osrelease.open(QFile::ReadOnly | QFile::Text)) {
+ QTextStream in(&osrelease);
+ auto contents = in.readAll();
+ if(
+ contents.contains("WSL", Qt::CaseInsensitive) ||
+ contents.contains("Microsoft", Qt::CaseInsensitive)
+ ) {
+ showFatalErrorMessage(
+ "Unsupported system detected!",
+ "Linux-on-Windows distributions are not supported.\n\n"
+ "Please use the Windows MultiMC binary when playing on Windows."
+ );
+ return;
+ }
+ }
+ }
+#endif
+
// Don't quit on hiding the last window
this->setQuitOnLastWindowClosed(false);