From ba7b0397b10b28245ea6da7a1a5494191710bfce Mon Sep 17 00:00:00 2001 From: ManDude <7569514+ManDude@users.noreply.github.com> Date: Wed, 17 Jan 2024 15:43:53 +0000 Subject: [PATCH] [pckernel] fix settings not being applied if file isn't found (#3313) --- goal_src/jak1/pc/pckernel-common.gc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/goal_src/jak1/pc/pckernel-common.gc b/goal_src/jak1/pc/pckernel-common.gc index 47364e3c6e..5d673d2bea 100644 --- a/goal_src/jak1/pc/pckernel-common.gc +++ b/goal_src/jak1/pc/pckernel-common.gc @@ -812,13 +812,19 @@ (defmethod load-settings pc-settings ((obj pc-settings)) "load" (format (clear *pc-temp-string-1*) "~S/pc-settings.gc" *pc-settings-folder*) - (if (pc-filepath-exists? *pc-temp-string-1*) - (begin + (cond + ((pc-filepath-exists? *pc-temp-string-1*) (format 0 "[PC] PC Settings found at '~S'...loading!~%" *pc-temp-string-1*) (unless (read-from-file obj *pc-temp-string-1*) (format 0 "[PC] PC Settings found at '~S' but could not be loaded, using defaults!~%" *pc-temp-string-1*) - (reset obj #t))) - (format 0 "[PC] PC Settings not found at '~S'...initializing with defaults!~%" *pc-temp-string-1*)) + (reset obj #t) + ) + ) + (else + (format 0 "[PC] PC Settings not found at '~S'...initializing with defaults!~%" *pc-temp-string-1*) + (reset obj #t) + ) + ) 0) (defmethod initialize pc-settings ((obj pc-settings))