aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLenny McLennington <lennymclennington@protonmail.com>2022-02-13 18:47:54 +0000
committerLenny McLennington <lennymclennington@protonmail.com>2022-02-13 18:47:54 +0000
commit929a035f96ed1fbeeae2515f7d54fd9b004af4f6 (patch)
treef4ec5d771db9398984dc6b8d18541f1010da2da4
parent5779f20fa1633577889b7bda839c5486eb2ba922 (diff)
downloadPrismLauncher-929a035f96ed1fbeeae2515f7d54fd9b004af4f6.tar.gz
PrismLauncher-929a035f96ed1fbeeae2515f7d54fd9b004af4f6.tar.bz2
PrismLauncher-929a035f96ed1fbeeae2515f7d54fd9b004af4f6.zip
Revert "make wsl work"
This reverts commit 5779f20fa1633577889b7bda839c5486eb2ba922.
-rw-r--r--launcher/Application.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/launcher/Application.cpp b/launcher/Application.cpp
index 6bf090e1..a3d6216e 100644
--- a/launcher/Application.cpp
+++ b/launcher/Application.cpp
@@ -192,6 +192,27 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
#endif
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 binary when playing on Windows."
+ );
+ return;
+ }
+ }
+ }
+#endif
+
// Don't quit on hiding the last window
this->setQuitOnLastWindowClosed(false);