1
0
Fork 0
mirror of https://github.com/suchmememanyskill/TegraExplorer.git synced 2024-09-16 20:13:24 +01:00

Merge pull request #96 from JeffVi/Lockpick-1.19.10-bdk-upgrade

Fix v5 save flush
This commit is contained in:
Sims 2024-05-23 19:49:38 +02:00 committed by GitHub
commit f812818967
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -299,14 +299,14 @@ void save_free_contexts(save_ctx_t *ctx) {
}
static ALWAYS_INLINE bool save_flush(save_ctx_t *ctx) {
if (ctx->header.layout.version < VERSION_DISF_5) {
if (!save_cached_storage_flush(ctx->core_data_ivfc_storage.data_level)) {
EPRINTF("Failed to flush cached storage!");
}
if (save_remap_storage_write(&ctx->meta_remap_storage, ctx->fat_storage, ctx->header.layout.fat_offset, ctx->header.layout.fat_size) != ctx->header.layout.fat_size) {
EPRINTF("Failed to write meta remap storage!");
}
} else {
if (!save_cached_storage_flush(ctx->core_data_ivfc_storage.data_level)) {
EPRINTF("Failed to flush cached storage!");
}
if (save_remap_storage_write(&ctx->meta_remap_storage, ctx->fat_storage, ctx->header.layout.fat_offset, ctx->header.layout.fat_size) != ctx->header.layout.fat_size) {
EPRINTF("Failed to write meta remap storage!");
}
if (ctx->header.layout.version >= VERSION_DISF_5) {
if (!save_cached_storage_flush(ctx->fat_ivfc_storage.data_level)) {
EPRINTF("Failed to flush cached storage!");
}