[jak1] disable auto-save-check (#2312)

Fixes unnecessary performance degradation when auto-save is enabled.
This commit is contained in:
ManDude 2023-03-10 05:22:50 +00:00 committed by GitHub
parent 630388229e
commit 93992795f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 9 deletions

View file

@ -1533,7 +1533,7 @@
;; this means that the original game only cleared the first 64K of that buffer when allocating
;; a new save file which would leave the last parts to be filled with garbage, which may or may not cause issues.
;; for the port we clear the entire spool buffer instead, entirely bypassing this potential issue.
(set! (-> self save) (new 'loading-level 'game-save SPOOL_HEAP_SIZE))
(set! (-> self save) (new 'loading-level 'game-save (- SPOOL_HEAP_SIZE (psize-of game-save))))
(save-game! *game-info* (-> self save) "save")
(set! loading-level (the-as kheap gp-0))
0

View file

@ -855,15 +855,24 @@
(str-play-kick)
)
(with-profiler "level-and-save"
(level-update *level*) ;; also updates settings.
(mc-run)
(auto-save-check)
(with-profiler "level-update"
(level-update *level*) ;; also updates settings.
)
(with-profiler "mc-run"
(mc-run)
)
;; PC port note : this function checks to see if the memory card has been removed or swapped
;; and disabled auto-save if it has. the pc port can only disable auto-save manually through the menu option.
;; the port doesn't use memory cards so those checks will never pass.
;; it runs some C kernel functions which in the port also do some I/O which gets very slow very quickly.
;; we're just not gonna run it.
; (auto-save-check)
(#when PC_PORT
(update *pc-settings*)
)
)
(with-profiler "update-pc"
(#when PC_PORT
(update *pc-settings*)
)
)
;; suspend