Skip to content

Commit a150e59

Browse files
authored
automatically re-enable autosave safely when starting a speedrun (open-goal#3181)
1 parent b2453fe commit a150e59

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

goal_src/jak2/pc/features/speedruns.gc

+7-8
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
(initialize! *game-info* 'game (the-as game-save #f) "game-start"))
2222
(((speedrun-category newgame-heromode))
2323
(initialize! *game-info* 'game (the-as game-save #f) "game-start-hero")))
24+
25+
(if (!= -1 (-> *game-info* auto-save-which))
26+
(set! (-> *setting-control* user-default auto-save) #t))
27+
2428
(none))
2529

2630
(defmethod enforce-settings! ((this speedrun-info))
@@ -142,19 +146,14 @@
142146
((= *master-mode* 'menu)
143147
(set-master-mode 'game)
144148
(set! (-> this draw-menu?) #f)))
145-
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons l1))
146-
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons l1))
147-
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons r1))
148-
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons r1))
149+
(cpad-clear! 0 l1 r1)
149150
;; Track whether or not the menu was opened with start or select...
150151
(cond
151152
((cpad-hold? 0 select)
152-
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons select))
153-
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons select))
153+
(cpad-clear! 0 select)
154154
(set! (-> this opened-with-start?) #f))
155155
((cpad-hold? 0 start)
156-
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons start))
157-
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons start))
156+
(cpad-clear! 0 start)
158157
(set! (-> this opened-with-start?) #t)))
159158
(set! (-> this ignore-menu-toggle?) #t))
160159
(when (-> this draw-menu?)

0 commit comments

Comments
 (0)