mirror of
https://github.com/Zelda64Recomp/Zelda64Recomp.git
synced 2025-10-30 08:03:03 +00:00
Restore 0th day (#574)
This commit is contained in:
parent
2d9dd10ddd
commit
aef0bf50ea
1 changed files with 6 additions and 6 deletions
|
|
@ -11,7 +11,7 @@ void Sleep_Msec(u32 ms);
|
|||
extern u16 D_801F6AF0;
|
||||
extern u8 D_801F6AF2;
|
||||
|
||||
// @recomp Patched to not wait a hardcoded amount of time for the save to complete.
|
||||
// @recomp Patched to wait a much shorter amount of time for the save to complete.
|
||||
RECOMP_PATCH void Sram_UpdateWriteToFlashDefault(SramContext* sramCtx) {
|
||||
if (sramCtx->status == 2) {
|
||||
if (SysFlashrom_IsBusy() != 0) { // if task running
|
||||
|
|
@ -23,13 +23,13 @@ RECOMP_PATCH void Sram_UpdateWriteToFlashDefault(SramContext* sramCtx) {
|
|||
sramCtx->status = 4;
|
||||
}
|
||||
}
|
||||
} else if (sramCtx->status == 4) {
|
||||
// @recomp Patched to check status instead of using a hardcoded wait.
|
||||
} else if (OSTIME_TO_TIMER(osGetTime() - sramCtx->startWriteOsTime) >= SECONDS_TO_TIMER_PRECISE(0, 25)) {
|
||||
// @recomp Patched to wait a much shorter amount of time.
|
||||
sramCtx->status = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// @recomp Patched to not wait a hardcoded amount of time for the save to complete.
|
||||
// @recomp Patched to wait a much shorter amount of time for the save to complete.
|
||||
RECOMP_PATCH void Sram_UpdateWriteToFlashOwlSave(SramContext* sramCtx) {
|
||||
if (sramCtx->status == 7) {
|
||||
if (SysFlashrom_IsBusy() != 0) { // Is task running
|
||||
|
|
@ -49,8 +49,8 @@ RECOMP_PATCH void Sram_UpdateWriteToFlashOwlSave(SramContext* sramCtx) {
|
|||
sramCtx->status = 4;
|
||||
}
|
||||
}
|
||||
} else if (sramCtx->status == 4) {
|
||||
// @recomp Patched to check status instead of using a hardcoded wait.
|
||||
} else if (OSTIME_TO_TIMER(osGetTime() - sramCtx->startWriteOsTime) >= SECONDS_TO_TIMER_PRECISE(0, 25)) {
|
||||
// @recomp Patched to wait a much shorter amount of time.
|
||||
sramCtx->status = 0;
|
||||
bzero(sramCtx->saveBuf, SAVE_BUFFER_SIZE);
|
||||
gSaveContext.save.isOwlSave = false;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue