@@ -123,18 +123,23 @@ private void jre_path_KeyDown(object sender, KeyEventArgs e)
123
123
}
124
124
}
125
125
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
+
126
138
private void AcrylicWindow_Closed ( object sender , EventArgs e )
127
139
{
128
140
try
129
141
{
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 ( ) ;
138
143
} catch ( Exception ex )
139
144
{
140
145
PopupOK . ShowNewPopup ( ex . ToString ( ) , "DECRAFT" ) ;
@@ -158,6 +163,7 @@ private void checkbox_enablediscord_Unchecked(object sender, RoutedEventArgs e)
158
163
159
164
private void btn_identgpu_Click ( object sender , RoutedEventArgs e )
160
165
{
166
+ SaveConfig ( ) ;
161
167
MainWindow . EnsureDir ( "./java_temp" ) ;
162
168
if ( File . Exists ( "./java_temp/decraft_internal/LWJGLTestGPU.class" ) )
163
169
{
0 commit comments