From 4c013e59f0e9a481bc63281c0d9e349827419d37 Mon Sep 17 00:00:00 2001
From: DioEgizio <83089242+DioEgizio@users.noreply.github.com>
Date: Sat, 25 Mar 2023 10:45:34 +0100
Subject: [PATCH 1/4] divide minecraftpage into tabs
this way small screen users can use the launcher settings without having window a bigger than their actual screens
Signed-off-by: DioEgizio <83089242+DioEgizio@users.noreply.github.com>
---
launcher/ui/pages/global/MinecraftPage.cpp | 1 -
launcher/ui/pages/global/MinecraftPage.ui | 153 +++++++++++----------
2 files changed, 84 insertions(+), 70 deletions(-)
diff --git a/launcher/ui/pages/global/MinecraftPage.cpp b/launcher/ui/pages/global/MinecraftPage.cpp
index cc597fe0b..eca3e8657 100644
--- a/launcher/ui/pages/global/MinecraftPage.cpp
+++ b/launcher/ui/pages/global/MinecraftPage.cpp
@@ -46,7 +46,6 @@
MinecraftPage::MinecraftPage(QWidget *parent) : QWidget(parent), ui(new Ui::MinecraftPage)
{
ui->setupUi(this);
- ui->tabWidget->tabBar()->hide();
loadSettings();
updateCheckboxStuff();
}
diff --git a/launcher/ui/pages/global/MinecraftPage.ui b/launcher/ui/pages/global/MinecraftPage.ui
index 640f436de..cff071bf5 100644
--- a/launcher/ui/pages/global/MinecraftPage.ui
+++ b/launcher/ui/pages/global/MinecraftPage.ui
@@ -7,7 +7,7 @@
0
0
936
- 1134
+ 541
@@ -39,7 +39,7 @@
- Minecraft
+ General
-
@@ -111,68 +111,6 @@
- -
-
-
- Native library workarounds
-
-
-
-
-
-
- Use system installation of &GLFW
-
-
-
- -
-
-
- Use system installation of &OpenAL
-
-
-
-
-
-
- -
-
-
- Performance
-
-
-
-
-
-
- <html><head/><body><p>Enable Feral Interactive's GameMode, to potentially improve gaming performance.</p></body></html>
-
-
- Enable Feral GameMode
-
-
-
- -
-
-
- <html><head/><body><p>Enable MangoHud's advanced performance overlay.</p></body></html>
-
-
- Enable MangoHud
-
-
-
- -
-
-
- <html><head/><body><p>Use the discrete GPU instead of the primary GPU.</p></body></html>
-
-
- Use discrete GPU
-
-
-
-
-
-
-
@@ -247,6 +185,88 @@
+
+
+ System-related tweaks
+
+
+ -
+
+
+ Native library workarounds
+
+
+
-
+
+
+ Use system installation of &GLFW
+
+
+
+ -
+
+
+ Use system installation of &OpenAL
+
+
+
+
+
+
+ -
+
+
+ Performance
+
+
+
-
+
+
+ <html><head/><body><p>Enable Feral Interactive's GameMode, to potentially improve gaming performance.</p></body></html>
+
+
+ Enable Feral GameMode
+
+
+
+ -
+
+
+ <html><head/><body><p>Enable MangoHud's advanced performance overlay.</p></body></html>
+
+
+ Enable MangoHud
+
+
+
+ -
+
+
+ <html><head/><body><p>Use the discrete GPU instead of the primary GPU.</p></body></html>
+
+
+ Use discrete GPU
+
+
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
@@ -255,11 +275,6 @@
maximizedCheckBox
windowWidthSpinBox
windowHeightSpinBox
- useNativeGLFWCheck
- useNativeOpenALCheck
- enableFeralGamemodeCheck
- enableMangoHud
- useDiscreteGpuCheck
From 5ec4cbf1cbf660d992ddd73c67d31de27c097f54 Mon Sep 17 00:00:00 2001
From: Rachel Powers <508861+Ryex@users.noreply.github.com>
Date: Wed, 3 May 2023 20:31:15 -0700
Subject: [PATCH 2/4] fix add an addtion lax file name match with ` ` replaced
with `+`
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
---
launcher/ui/dialogs/BlockedModsDialog.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/launcher/ui/dialogs/BlockedModsDialog.cpp b/launcher/ui/dialogs/BlockedModsDialog.cpp
index ba453df6a..3e1137c27 100644
--- a/launcher/ui/dialogs/BlockedModsDialog.cpp
+++ b/launcher/ui/dialogs/BlockedModsDialog.cpp
@@ -305,6 +305,9 @@ bool BlockedModsDialog::checkValidPath(QString path)
QString laxFilename(filename);
laxFilename.replace('+', ' ');
+ QString laxFilename2(filename);
+ laxFilename.replace(' ', '+');
+
auto compare = [](QString fsfilename, QString metadataFilename) {
return metadataFilename.compare(fsfilename, Qt::CaseInsensitive) == 0;
};
@@ -314,7 +317,7 @@ bool BlockedModsDialog::checkValidPath(QString path)
qDebug() << "[Blocked Mods Dialog] Name match found:" << mod.name << "| From path:" << path;
return true;
}
- if (compare(laxFilename, mod.name)) {
+ if (compare(laxFilename, mod.name) || compare(laxFilename2, mod.name)) {
qDebug() << "[Blocked Mods Dialog] Lax name match found:" << mod.name << "| From path:" << path;
return true;
}
From e0635955df2d1bf79e1ba61eb02074801b60953f Mon Sep 17 00:00:00 2001
From: Rachel Powers <508861+Ryex@users.noreply.github.com>
Date: Thu, 4 May 2023 13:30:39 -0700
Subject: [PATCH 3/4] fix: super lax compare
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
---
launcher/ui/dialogs/BlockedModsDialog.cpp | 40 +++++++++++++++++------
1 file changed, 30 insertions(+), 10 deletions(-)
diff --git a/launcher/ui/dialogs/BlockedModsDialog.cpp b/launcher/ui/dialogs/BlockedModsDialog.cpp
index 3e1137c27..fdfae5973 100644
--- a/launcher/ui/dialogs/BlockedModsDialog.cpp
+++ b/launcher/ui/dialogs/BlockedModsDialog.cpp
@@ -195,7 +195,7 @@ void BlockedModsDialog::watchPath(QString path, bool watch_recursive)
auto to_watch = QFileInfo(path);
auto to_watch_path = to_watch.canonicalFilePath();
if (m_watcher.directories().contains(to_watch_path))
- return; // don't watch the same path twice (no loops!)
+ return; // don't watch the same path twice (no loops!)
qDebug() << "[Blocked Mods Dialog] Adding Watch Path:" << path;
m_watcher.addPath(to_watch_path);
@@ -203,10 +203,9 @@ void BlockedModsDialog::watchPath(QString path, bool watch_recursive)
if (!to_watch.isDir() || !watch_recursive)
return;
-
QDirIterator it(to_watch_path, QDir::Filter::Dirs | QDir::Filter::NoDotAndDotDot, QDirIterator::NoIteratorFlags);
while (it.hasNext()) {
- QString watch_dir = QDir(it.next()).canonicalPath(); // resolve symlinks and relative paths
+ QString watch_dir = QDir(it.next()).canonicalPath(); // resolve symlinks and relative paths
watchPath(watch_dir, watch_recursive);
}
}
@@ -302,14 +301,35 @@ bool BlockedModsDialog::checkValidPath(QString path)
{
const QFileInfo file = QFileInfo(path);
const QString filename = file.fileName();
- QString laxFilename(filename);
- laxFilename.replace('+', ' ');
- QString laxFilename2(filename);
- laxFilename.replace(' ', '+');
+ auto compare = [](QString fsFilename, QString metadataFilename) {
+ return metadataFilename.compare(fsFilename, Qt::CaseInsensitive) == 0;
+ };
- auto compare = [](QString fsfilename, QString metadataFilename) {
- return metadataFilename.compare(fsfilename, Qt::CaseInsensitive) == 0;
+ // super lax compare (but not fuzzy)
+ // convert to lowercase
+ // convert all speratores to whitespace
+ // simplify sequence of internal whitespace to a single space
+ // efectivly compare two strings ignoring all separators and case
+ auto laxCompare = [](QString fsfilename, QString metadataFilename) {
+ // allowed character seperators
+ QList allowedSeperators = { '-', '+', '.' , '_'};
+
+ // copy in lowercase
+ auto fsName = fsfilename.toLower();
+ auto metaName = metadataFilename.toLower();
+
+ // replace all potential allowed seperatores with whitespace
+ for (auto sep : allowedSeperators) {
+ fsName = fsName.replace(sep, ' ');
+ metaName = metaName.replace(sep, ' ');
+ }
+
+ // remove extraneous whitespace
+ fsName = fsName.simplified();
+ metaName = metaName.simplified();
+
+ return fsName.compare(metaName) == 0;
};
for (auto& mod : m_mods) {
@@ -317,7 +337,7 @@ bool BlockedModsDialog::checkValidPath(QString path)
qDebug() << "[Blocked Mods Dialog] Name match found:" << mod.name << "| From path:" << path;
return true;
}
- if (compare(laxFilename, mod.name) || compare(laxFilename2, mod.name)) {
+ if (laxCompare(filename, mod.name)) {
qDebug() << "[Blocked Mods Dialog] Lax name match found:" << mod.name << "| From path:" << path;
return true;
}
From d38696f411ea0889d4152f999864912f1685120b Mon Sep 17 00:00:00 2001
From: DioEgizio <83089242+DioEgizio@users.noreply.github.com>
Date: Sat, 6 May 2023 07:15:14 +0200
Subject: [PATCH 4/4] Update launcher/ui/pages/global/MinecraftPage.ui
Co-authored-by: Sefa Eyeoglu
Signed-off-by: DioEgizio <83089242+DioEgizio@users.noreply.github.com>
---
launcher/ui/pages/global/MinecraftPage.ui | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/launcher/ui/pages/global/MinecraftPage.ui b/launcher/ui/pages/global/MinecraftPage.ui
index cff071bf5..103881b57 100644
--- a/launcher/ui/pages/global/MinecraftPage.ui
+++ b/launcher/ui/pages/global/MinecraftPage.ui
@@ -187,7 +187,7 @@
- System-related tweaks
+ Tweaks
-