mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
Fix owl save crash by adjusting save buffer size (#141)
This commit is contained in:
@@ -32,7 +32,7 @@ typedef enum RespawnMode {
|
||||
/* 8 */ RESPAWN_MODE_MAX
|
||||
} RespawnMode;
|
||||
|
||||
#define SAVE_BUFFER_SIZE 0x4000
|
||||
#define SAVE_BUFFER_SIZE 0x8000 // 2S2H [Port] Double the original size of 0x4000 for 64 bit support
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ MAGIC_STATE_IDLE, // Regular gameplay
|
||||
|
||||
@@ -1937,7 +1937,7 @@ void Sram_UpdateWriteToFlashDefault(SramContext* sramCtx) {
|
||||
sramCtx->status = 4;
|
||||
}
|
||||
}
|
||||
} else if (OSTIME_TO_TIMER(osGetTime() - sramCtx->startWriteOsTime) >= SECONDS_TO_TIMER(2)) {
|
||||
} else if (OSTIME_TO_TIMER(osGetTime() - sramCtx->startWriteOsTime) >= SECONDS_TO_TIMER(0 /*2*/)) { // 2S2H [Port] Remove arbitrary 2 second delay
|
||||
// Finished status is hardcoded to 2 seconds instead of when the task finishes
|
||||
sramCtx->status = 0;
|
||||
}
|
||||
@@ -1975,7 +1975,7 @@ void Sram_UpdateWriteToFlashOwlSave(SramContext* sramCtx) {
|
||||
sramCtx->status = 4;
|
||||
}
|
||||
}
|
||||
} else if (OSTIME_TO_TIMER(osGetTime() - sramCtx->startWriteOsTime) >= SECONDS_TO_TIMER(2)) {
|
||||
} else if (OSTIME_TO_TIMER(osGetTime() - sramCtx->startWriteOsTime) >= SECONDS_TO_TIMER(0 /*2*/)) { // 2S2H [Port] Remove arbitrary 2 second delay
|
||||
// Finished status is hardcoded to 2 seconds instead of when the task finishes
|
||||
sramCtx->status = 0;
|
||||
memset(sramCtx->saveBuf, 0, SAVE_BUFFER_SIZE);
|
||||
|
||||
Reference in New Issue
Block a user