mirror of
https://github.com/Decscots/Lockpick_RCM
synced 2024-11-15 04:56:35 +00:00
nx_emmc_bis: Count clusters to flush
This commit is contained in:
parent
25aa483bd5
commit
73fce1da86
2 changed files with 6 additions and 3 deletions
|
@ -89,7 +89,7 @@ DRESULT disk_write (
|
|||
return sdmmc_storage_write(&sd_storage, sector, count, (void *)buff) ? RES_OK : RES_ERROR;
|
||||
|
||||
case DRIVE_BIS:
|
||||
return nx_emmc_bis_write(sector, count, buff);
|
||||
return nx_emmc_bis_write(sector, count, (void *)buff);
|
||||
}
|
||||
|
||||
return RES_ERROR;
|
||||
|
|
|
@ -365,10 +365,13 @@ void nx_emmc_bis_finalize()
|
|||
return;
|
||||
|
||||
u32 limit = cache_filled == 1 ? MAX_CLUSTER_CACHE_ENTRIES : cluster_cache_end_index;
|
||||
for (u32 i = 0; i < limit; i++)
|
||||
u32 clusters_to_flush = dirty_cluster_count;
|
||||
for (u32 i = 0; i < limit && clusters_to_flush; i++)
|
||||
{
|
||||
if (bis_cache->cluster_cache[i].dirty)
|
||||
if (bis_cache->cluster_cache[i].dirty) {
|
||||
_nx_emmc_bis_flush_cluster(&bis_cache->cluster_cache[i]);
|
||||
clusters_to_flush--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue