diff options
author | Petr Mrázek <peterix@gmail.com> | 2020-09-10 23:10:17 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2020-09-10 23:10:17 +0200 |
commit | 5180536cc3a96ab2e6894fb1a8a5922dae6bcd21 (patch) | |
tree | a3d0d1c36f479ebf48bfa268fbf7d6e487d839b2 /application/pages/instance | |
parent | 27e43d037e3b75862542c6437ccb59e1d42452d5 (diff) | |
download | PrismLauncher-5180536cc3a96ab2e6894fb1a8a5922dae6bcd21.tar.gz PrismLauncher-5180536cc3a96ab2e6894fb1a8a5922dae6bcd21.tar.bz2 PrismLauncher-5180536cc3a96ab2e6894fb1a8a5922dae6bcd21.zip |
NOISSUE add a way to use native system versions of OpenAL and GLFW
If your OS comes with patched/fixed/newer versions of those,
you can now check the checkboxes and stop using the old ones
shipped by Mojang.
Diffstat (limited to 'application/pages/instance')
-rw-r--r-- | application/pages/instance/InstanceSettingsPage.cpp | 19 | ||||
-rw-r--r-- | application/pages/instance/InstanceSettingsPage.ui | 59 |
2 files changed, 76 insertions, 2 deletions
diff --git a/application/pages/instance/InstanceSettingsPage.cpp b/application/pages/instance/InstanceSettingsPage.cpp index b7b0a863..9a39b034 100644 --- a/application/pages/instance/InstanceSettingsPage.cpp +++ b/application/pages/instance/InstanceSettingsPage.cpp @@ -163,6 +163,20 @@ void InstanceSettingsPage::applySettings() m_settings->reset("WrapperCommand"); m_settings->reset("PostExitCommand"); } + + // Workarounds + bool workarounds = ui->nativeWorkaroundsGroupBox->isChecked(); + m_settings->set("OverrideNativeWorkarounds", workarounds); + if(workarounds) + { + m_settings->set("UseNativeOpenAL", ui->useNativeOpenALCheck->isChecked()); + m_settings->set("UseNativeGLFW", ui->useNativeGLFWCheck->isChecked()); + } + else + { + m_settings->reset("UseNativeOpenAL"); + m_settings->reset("UseNativeGLFW"); + } } void InstanceSettingsPage::loadSettings() @@ -219,6 +233,11 @@ void InstanceSettingsPage::loadSettings() m_settings->get("WrapperCommand").toString(), m_settings->get("PostExitCommand").toString() ); + + // Workarounds + ui->nativeWorkaroundsGroupBox->setChecked(m_settings->get("OverrideNativeWorkarounds").toBool()); + ui->useNativeGLFWCheck->setChecked(m_settings->get("UseNativeGLFW").toBool()); + ui->useNativeOpenALCheck->setChecked(m_settings->get("UseNativeOpenAL").toBool()); } void InstanceSettingsPage::on_javaDetectBtn_clicked() diff --git a/application/pages/instance/InstanceSettingsPage.ui b/application/pages/instance/InstanceSettingsPage.ui index d6de53ee..c91570c6 100644 --- a/application/pages/instance/InstanceSettingsPage.ui +++ b/application/pages/instance/InstanceSettingsPage.ui @@ -6,8 +6,8 @@ <rect> <x>0</x> <y>0</y> - <width>738</width> - <height>804</height> + <width>691</width> + <height>581</height> </rect> </property> <layout class="QVBoxLayout" name="verticalLayout"> @@ -364,6 +364,58 @@ </item> </layout> </widget> + <widget class="QWidget" name="workaroundsPage"> + <attribute name="title"> + <string>Workarounds</string> + </attribute> + <layout class="QVBoxLayout" name="verticalLayout_8"> + <item> + <widget class="QGroupBox" name="nativeWorkaroundsGroupBox"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="title"> + <string>Native libraries</string> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="checked"> + <bool>false</bool> + </property> + <layout class="QVBoxLayout" name="verticalLayout_7"> + <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> + <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> </item> </layout> @@ -398,6 +450,9 @@ <tabstop>showConsoleCheck</tabstop> <tabstop>autoCloseConsoleCheck</tabstop> <tabstop>showConsoleErrorCheck</tabstop> + <tabstop>nativeWorkaroundsGroupBox</tabstop> + <tabstop>useNativeGLFWCheck</tabstop> + <tabstop>useNativeOpenALCheck</tabstop> </tabstops> <resources/> <connections/> |