From c0efde27632bd6c56ee3dfdbf4419af40a3d1a8f Mon Sep 17 00:00:00 2001 From: Tyler Wilding Date: Fri, 8 Jul 2022 19:23:44 -0400 Subject: [PATCH] jak1: save pc settings when they are changed, not just when the menu is closed (#1622) jak1: save pc settings when they are changed, not when the menu is closed --- Taskfile.yml | 4 ++-- goal_src/jak1/pc/progress-pc.gc | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Taskfile.yml b/Taskfile.yml index 6b6a0095f8..b42d88e957 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -54,10 +54,10 @@ tasks: - sh: test -f {{.GOALC_BIN_RELEASE_DIR}}/goalc{{.EXE_FILE_EXTENSION}} msg: "Couldn't locate compiler executable in '{{.GOALC_BIN_RELEASE_DIR}}/goalc'" cmds: - - "{{.GOALC_BIN_RELEASE_DIR}}/goalc" + - "{{.GOALC_BIN_RELEASE_DIR}}/goalc --game {{.GAME}}" repl-lt: cmds: - - "{{.GOALC_BIN_RELEASE_DIR}}/goalc --auto-lt" + - "{{.GOALC_BIN_RELEASE_DIR}}/goalc --auto-lt --game {{.GAME}}" format: desc: "Format code" cmds: diff --git a/goal_src/jak1/pc/progress-pc.gc b/goal_src/jak1/pc/progress-pc.gc index e4438737dd..54f4cf18d4 100644 --- a/goal_src/jak1/pc/progress-pc.gc +++ b/goal_src/jak1/pc/progress-pc.gc @@ -1071,6 +1071,7 @@ (sound-play "cursor-options") ) ) + (commit-to-file *pc-settings*) ;; other behaviors are hardcoded elsewhere because screw you. ) ((= (-> options (-> obj option-index) option-type) (game-option-type resolution)) @@ -1084,6 +1085,7 @@ (cpad-clear! 0 triangle) (sound-play "cursor-options") (set! (-> obj next-display-state) (progress-screen invalid)) + (commit-to-file *pc-settings*) ) ((= (-> options (-> obj option-index) option-type) (game-option-type aspect-new)) ;; aspect ratio button. @@ -1115,6 +1117,7 @@ (cpad-clear! 0 square) (cpad-clear! 0 triangle) (sound-play "cursor-options") + (commit-to-file *pc-settings*) (set! (-> obj next-display-state) (progress-screen invalid)) ) ((!= (-> options (-> obj option-index) option-type) (game-option-type yes-no)) @@ -1283,6 +1286,7 @@ (set-video-mode (-> *setting-control* default video-mode)) ) ) + (commit-to-file *pc-settings*) ) ) )