Skip to content

Commit ba7b039

Browse files
authored
[pckernel] fix settings not being applied if file isn't found (#3313)
1 parent 4f537d4 commit ba7b039

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

goal_src/jak1/pc/pckernel-common.gc

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -812,13 +812,19 @@
812812
(defmethod load-settings pc-settings ((obj pc-settings))
813813
"load"
814814
(format (clear *pc-temp-string-1*) "~S/pc-settings.gc" *pc-settings-folder*)
815-
(if (pc-filepath-exists? *pc-temp-string-1*)
816-
(begin
815+
(cond
816+
((pc-filepath-exists? *pc-temp-string-1*)
817817
(format 0 "[PC] PC Settings found at '~S'...loading!~%" *pc-temp-string-1*)
818818
(unless (read-from-file obj *pc-temp-string-1*)
819819
(format 0 "[PC] PC Settings found at '~S' but could not be loaded, using defaults!~%" *pc-temp-string-1*)
820-
(reset obj #t)))
821-
(format 0 "[PC] PC Settings not found at '~S'...initializing with defaults!~%" *pc-temp-string-1*))
820+
(reset obj #t)
821+
)
822+
)
823+
(else
824+
(format 0 "[PC] PC Settings not found at '~S'...initializing with defaults!~%" *pc-temp-string-1*)
825+
(reset obj #t)
826+
)
827+
)
822828
0)
823829

824830
(defmethod initialize pc-settings ((obj pc-settings))

0 commit comments

Comments
 (0)