@@ -36,54 +36,56 @@ func load_config_and_set_values():
3636
3737	% ConfigLoader .load_config ()
3838
39- 	#  DISPLAY CATEGORY GETTERS
40- 	windowModeDropdown .selected  =  config .windowMode 
41- 	vsyncCheckbox .button_pressed  =  config .vsync 
42- 	limitFPSCheckbox .button_pressed  =  config .limitFPS 
43- 	maxFPSSpinbox .value  =  config .maxFPS 
44- 	
45- 	#  GRAPHICS CATEGORY GETTERS
46- 	antiAliasingCheckbox .button_pressed  =  config .antiAliasing 
47- 	shadowsCheckbox .button_pressed  =  config .shadows 
48- 	
49- 	#  AUDIO CATEGORY GETTERS
50- 	musicSlider .value  =  config .music 
51- 	effectsSlider .value  =  config .effects 
52- 	voicesSlider .value  =  config .voices 
53- 	
54- 	#  GAMEPLAY CATEGORY GETTERS
55- 	subtitlesCheckbox .button_pressed  =  config .subtitles 
56- 	autodefendCheckbox .button_pressed  =  config .autoDefend 
57- 	
58- 	#  FILEPATHS CATEGORY GETTERS
59- 	redguardPathLineEdit .text  =  config .redguardPath 
60- 	
61- 	% DependencyManager .update_vsync_dependencies ()
62- 	% DependencyManager .update_fpslimit_dependencies ()
39+ 	if  config  !=  null :
40+ 		#  DISPLAY CATEGORY GETTERS
41+ 		windowModeDropdown .selected  =  config .windowMode 
42+ 		vsyncCheckbox .button_pressed  =  config .vsync 
43+ 		limitFPSCheckbox .button_pressed  =  config .limitFPS 
44+ 		maxFPSSpinbox .value  =  config .maxFPS 
45+ 		
46+ 		#  GRAPHICS CATEGORY GETTERS
47+ 		antiAliasingCheckbox .button_pressed  =  config .antiAliasing 
48+ 		shadowsCheckbox .button_pressed  =  config .shadows 
49+ 		
50+ 		#  AUDIO CATEGORY GETTERS
51+ 		musicSlider .value  =  config .music 
52+ 		effectsSlider .value  =  config .effects 
53+ 		voicesSlider .value  =  config .voices 
54+ 		
55+ 		#  GAMEPLAY CATEGORY GETTERS
56+ 		subtitlesCheckbox .button_pressed  =  config .subtitles 
57+ 		autodefendCheckbox .button_pressed  =  config .autoDefend 
58+ 		
59+ 		#  FILEPATHS CATEGORY GETTERS
60+ 		redguardPathLineEdit .text  =  config .redguardPath 
61+ 		
62+ 		% DependencyManager .update_vsync_dependencies ()
63+ 		% DependencyManager .update_fpslimit_dependencies ()
6364
6465
6566func  set_values_and_save_config ():
6667
67- 	#  DISPLAY CATEGORY SETTERS
68- 	config .windowMode  =  windowModeDropdown .selected 
69- 	config .vsync  =  vsyncCheckbox .button_pressed 
70- 	config .limitFPS  =  limitFPSCheckbox .button_pressed 
71- 	config .maxFPS  =  int (maxFPSSpinbox .value )
68+ 	if  config  !=  null :
69+ 		#  DISPLAY CATEGORY SETTERS
70+ 		config .windowMode  =  windowModeDropdown .selected 
71+ 		config .vsync  =  vsyncCheckbox .button_pressed 
72+ 		config .limitFPS  =  limitFPSCheckbox .button_pressed 
73+ 		config .maxFPS  =  int (maxFPSSpinbox .value )
7274
73- 	#  GRAPHICS CATEGORY SETTERS
74- 	config .antiAliasing  =  antiAliasingCheckbox .button_pressed 
75- 	config .shadows  =  shadowsCheckbox .button_pressed 
76- 	
77- 	#  AUDIO CATEGORY SETTERS
78- 	config .music  =  int (musicSlider .value )
79- 	config .effects  =  int (effectsSlider .value )
80- 	config .voices  =  int (voicesSlider .value )
81- 	
82- 	#  GAMEPLAY CATEGORY SETTERS
83- 	config .subtitles  =  subtitlesCheckbox .button_pressed 
84- 	config .autoDefend  =  autodefendCheckbox .button_pressed 
85- 	
86- 	#  FILEPATHS CATEGORY SETTERS
87- 	config .redguardPath  =  redguardPathLineEdit .text 
88- 	
89- 	% ConfigSaver .save_config ()
75+ 		 #  GRAPHICS CATEGORY SETTERS
76+ 		 config .antiAliasing  =  antiAliasingCheckbox .button_pressed 
77+ 		 config .shadows  =  shadowsCheckbox .button_pressed 
78+ 		 
79+ 		 #  AUDIO CATEGORY SETTERS
80+ 		 config .music  =  int (musicSlider .value )
81+ 		 config .effects  =  int (effectsSlider .value )
82+ 		 config .voices  =  int (voicesSlider .value )
83+ 		 
84+ 		 #  GAMEPLAY CATEGORY SETTERS
85+ 		 config .subtitles  =  subtitlesCheckbox .button_pressed 
86+ 		 config .autoDefend  =  autodefendCheckbox .button_pressed 
87+ 		 
88+ 		 #  FILEPATHS CATEGORY SETTERS
89+ 		 config .redguardPath  =  redguardPathLineEdit .text 
90+ 		 
91+ 		 % ConfigSaver .save_config ()
0 commit comments