Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into develop
This commit is contained in:
commit
ef6cbdfa2a
@ -203,7 +203,6 @@ void BlockedModsDialog::watchPath(QString path, bool watch_recursive)
|
|||||||
if (!to_watch.isDir() || !watch_recursive)
|
if (!to_watch.isDir() || !watch_recursive)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
QDirIterator it(to_watch_path, QDir::Filter::Dirs | QDir::Filter::NoDotAndDotDot, QDirIterator::NoIteratorFlags);
|
QDirIterator it(to_watch_path, QDir::Filter::Dirs | QDir::Filter::NoDotAndDotDot, QDirIterator::NoIteratorFlags);
|
||||||
while (it.hasNext()) {
|
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
|
||||||
@ -302,11 +301,35 @@ bool BlockedModsDialog::checkValidPath(QString path)
|
|||||||
{
|
{
|
||||||
const QFileInfo file = QFileInfo(path);
|
const QFileInfo file = QFileInfo(path);
|
||||||
const QString filename = file.fileName();
|
const QString filename = file.fileName();
|
||||||
QString laxFilename(filename);
|
|
||||||
laxFilename.replace('+', ' ');
|
|
||||||
|
|
||||||
auto compare = [](QString fsfilename, QString metadataFilename) {
|
auto compare = [](QString fsFilename, QString metadataFilename) {
|
||||||
return metadataFilename.compare(fsfilename, Qt::CaseInsensitive) == 0;
|
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<QChar> 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) {
|
for (auto& mod : m_mods) {
|
||||||
@ -314,7 +337,7 @@ bool BlockedModsDialog::checkValidPath(QString path)
|
|||||||
qDebug() << "[Blocked Mods Dialog] Name match found:" << mod.name << "| From path:" << path;
|
qDebug() << "[Blocked Mods Dialog] Name match found:" << mod.name << "| From path:" << path;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (compare(laxFilename, mod.name)) {
|
if (laxCompare(filename, mod.name)) {
|
||||||
qDebug() << "[Blocked Mods Dialog] Lax name match found:" << mod.name << "| From path:" << path;
|
qDebug() << "[Blocked Mods Dialog] Lax name match found:" << mod.name << "| From path:" << path;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,6 @@
|
|||||||
MinecraftPage::MinecraftPage(QWidget *parent) : QWidget(parent), ui(new Ui::MinecraftPage)
|
MinecraftPage::MinecraftPage(QWidget *parent) : QWidget(parent), ui(new Ui::MinecraftPage)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
ui->tabWidget->tabBar()->hide();
|
|
||||||
loadSettings();
|
loadSettings();
|
||||||
updateCheckboxStuff();
|
updateCheckboxStuff();
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>936</width>
|
<width>936</width>
|
||||||
<height>1134</height>
|
<height>541</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -39,7 +39,7 @@
|
|||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="minecraftTab">
|
<widget class="QWidget" name="minecraftTab">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string notr="true">Minecraft</string>
|
<string notr="true">General</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
<item>
|
<item>
|
||||||
@ -111,68 +111,6 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="nativeLibWorkaroundGroupBox">
|
|
||||||
<property name="title">
|
|
||||||
<string>Native library workarounds</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="useNativeGLFWCheck">
|
|
||||||
<property name="text">
|
|
||||||
<string>Use system installation of &GLFW</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="useNativeOpenALCheck">
|
|
||||||
<property name="text">
|
|
||||||
<string>Use system installation of &OpenAL</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="perfomanceGroupBox">
|
|
||||||
<property name="title">
|
|
||||||
<string>Performance</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="enableFeralGamemodeCheck">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string><html><head/><body><p>Enable Feral Interactive's GameMode, to potentially improve gaming performance.</p></body></html></string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Enable Feral GameMode</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="enableMangoHud">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string><html><head/><body><p>Enable MangoHud's advanced performance overlay.</p></body></html></string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Enable MangoHud</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="useDiscreteGpuCheck">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string><html><head/><body><p>Use the discrete GPU instead of the primary GPU.</p></body></html></string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Use discrete GPU</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="gameTimeGroupBox">
|
<widget class="QGroupBox" name="gameTimeGroupBox">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
@ -247,6 +185,88 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QWidget" name="tab">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Tweaks</string>
|
||||||
|
</attribute>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_12">
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="nativeLibWorkaroundGroupBox">
|
||||||
|
<property name="title">
|
||||||
|
<string>Native library workarounds</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_11">
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="useNativeGLFWCheck">
|
||||||
|
<property name="text">
|
||||||
|
<string>Use system installation of &GLFW</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="useNativeOpenALCheck">
|
||||||
|
<property name="text">
|
||||||
|
<string>Use system installation of &OpenAL</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="perfomanceGroupBox">
|
||||||
|
<property name="title">
|
||||||
|
<string>Performance</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="enableFeralGamemodeCheck">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><html><head/><body><p>Enable Feral Interactive's GameMode, to potentially improve gaming performance.</p></body></html></string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Enable Feral GameMode</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="enableMangoHud">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><html><head/><body><p>Enable MangoHud's advanced performance overlay.</p></body></html></string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Enable MangoHud</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="useDiscreteGpuCheck">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><html><head/><body><p>Use the discrete GPU instead of the primary GPU.</p></body></html></string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Use discrete GPU</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
@ -255,11 +275,6 @@
|
|||||||
<tabstop>maximizedCheckBox</tabstop>
|
<tabstop>maximizedCheckBox</tabstop>
|
||||||
<tabstop>windowWidthSpinBox</tabstop>
|
<tabstop>windowWidthSpinBox</tabstop>
|
||||||
<tabstop>windowHeightSpinBox</tabstop>
|
<tabstop>windowHeightSpinBox</tabstop>
|
||||||
<tabstop>useNativeGLFWCheck</tabstop>
|
|
||||||
<tabstop>useNativeOpenALCheck</tabstop>
|
|
||||||
<tabstop>enableFeralGamemodeCheck</tabstop>
|
|
||||||
<tabstop>enableMangoHud</tabstop>
|
|
||||||
<tabstop>useDiscreteGpuCheck</tabstop>
|
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user