mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-31 14:58:22 -04:00
git subrepo clone --force https://github.com/m4xw/emummc
subrepo: subdir: "emummc" merged: "c6717b93" upstream: origin: "https://github.com/m4xw/emummc" branch: "develop" commit: "c6717b93" git-subrepo: version: "0.4.1" origin: "???" commit: "???"
This commit is contained in:
parent
bf8de39e69
commit
3f3aaa01fa
2 changed files with 9 additions and 9 deletions
|
@ -300,21 +300,21 @@ static uint64_t emummc_read_write_inner(void *buf, unsigned int sector, unsigned
|
|||
while (remaining > 0) {
|
||||
const unsigned int cur_sectors = MIN(remaining, f_emu.part_size - sector);
|
||||
|
||||
if (f_lseek(fp, sector << 9) != FR_OK)
|
||||
if (f_lseek(fp, (u64)sector << 9) != FR_OK)
|
||||
return 0; // Out of bounds.
|
||||
|
||||
if (is_write)
|
||||
{
|
||||
if (f_write_fast(fp, buf, cur_sectors << 9) != FR_OK)
|
||||
if (f_write_fast(fp, buf, (u64)cur_sectors << 9) != FR_OK)
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (f_read_fast(fp, buf, cur_sectors << 9) != FR_OK)
|
||||
if (f_read_fast(fp, buf, (u64)cur_sectors << 9) != FR_OK)
|
||||
return 0;
|
||||
}
|
||||
|
||||
buf = (char *)buf + (cur_sectors << 9);
|
||||
buf = (char *)buf + ((u64)cur_sectors << 9);
|
||||
remaining -= cur_sectors;
|
||||
sector = 0;
|
||||
++fp;
|
||||
|
@ -336,14 +336,14 @@ static uint64_t emummc_read_write_inner(void *buf, unsigned int sector, unsigned
|
|||
break;
|
||||
}
|
||||
|
||||
if (f_lseek(fp, sector << 9) != FR_OK)
|
||||
if (f_lseek(fp, (u64)sector << 9) != FR_OK)
|
||||
return 0; // Out of bounds.
|
||||
|
||||
uint64_t res = 0;
|
||||
if (!is_write)
|
||||
res = !f_read_fast(fp, buf, num_sectors << 9);
|
||||
res = !f_read_fast(fp, buf, (u64)num_sectors << 9);
|
||||
else
|
||||
res = !f_write_fast(fp, buf, num_sectors << 9);
|
||||
res = !f_write_fast(fp, buf, (u64)num_sectors << 9);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue