Skip to content

Commit 809e33e

Browse files
committed
fix gpu test
1 parent 271afca commit 809e33e

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

DeCraftLauncher/Configs/UI/WindowRuntimeConfig.xaml.cs

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -123,18 +123,23 @@ private void jre_path_KeyDown(object sender, KeyEventArgs e)
123123
}
124124
}
125125

126+
private void SaveConfig()
127+
{
128+
FixJavaHomeString();
129+
MainWindow.mainRTConfig.javaHome = jre_path.Text;
130+
MainWindow.mainRTConfig.isJava9 = checkbox_isjava9.IsChecked == true;
131+
MainWindow.mainRTConfig.autoExitProcessLog = checkbox_autoexitprocesslog.IsChecked == true;
132+
MainWindow.mainRTConfig.enableDiscordRPC = checkbox_enablediscord.IsChecked == true;
133+
MainWindow.mainRTConfig.setHeapDump = checkbox_setheapdump.IsChecked == true;
134+
MainWindow.mainRTConfig.useLocalizationFile = (string)cbox_langs.SelectedValue == "English" ? null : (string)cbox_langs.SelectedValue;
135+
parent.SaveRuntimeConfig();
136+
}
137+
126138
private void AcrylicWindow_Closed(object sender, EventArgs e)
127139
{
128140
try
129141
{
130-
FixJavaHomeString();
131-
MainWindow.mainRTConfig.javaHome = jre_path.Text;
132-
MainWindow.mainRTConfig.isJava9 = checkbox_isjava9.IsChecked == true;
133-
MainWindow.mainRTConfig.autoExitProcessLog = checkbox_autoexitprocesslog.IsChecked == true;
134-
MainWindow.mainRTConfig.enableDiscordRPC = checkbox_enablediscord.IsChecked == true;
135-
MainWindow.mainRTConfig.setHeapDump = checkbox_setheapdump.IsChecked == true;
136-
MainWindow.mainRTConfig.useLocalizationFile = (string)cbox_langs.SelectedValue == "English" ? null : (string)cbox_langs.SelectedValue;
137-
parent.SaveRuntimeConfig();
142+
SaveConfig();
138143
} catch (Exception ex)
139144
{
140145
PopupOK.ShowNewPopup(ex.ToString(), "DECRAFT");
@@ -158,6 +163,7 @@ private void checkbox_enablediscord_Unchecked(object sender, RoutedEventArgs e)
158163

159164
private void btn_identgpu_Click(object sender, RoutedEventArgs e)
160165
{
166+
SaveConfig();
161167
MainWindow.EnsureDir("./java_temp");
162168
if (File.Exists("./java_temp/decraft_internal/LWJGLTestGPU.class"))
163169
{

0 commit comments

Comments
 (0)