build fixin', warning fixin'.

Thanks soren for the macosx fixes, this fixes the windows build and eliminates some warning from the same.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5643 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard
2010-06-09 21:19:23 +00:00
parent c05c9fa1f4
commit 5845ff6728
5 changed files with 11 additions and 7 deletions

View File

@ -193,12 +193,15 @@ bool SDCardCreate(u64 disk_size /*in MB*/, char* filename)
FILE* f;
// Convert MB to bytes
disk_size *= 1024*1024;
disk_size *= 1024 * 1024;
if (disk_size < 0x800000 || disk_size > 0x800000000ULL)
if (disk_size < 0x800000 || disk_size > 0x800000000ULL) {
ERROR_LOG(COMMON, "Trying to create SD Card image of size %iMB is out of range (8MB-32GB)", disk_size/(1024*1024));
return false;
}
sectors_per_disk = disk_size / 512;
// pretty unlikely to overflow.
sectors_per_disk = (int)(disk_size / 512);
sectors_per_fat = get_sectors_per_fat(disk_size, get_sectors_per_cluster(disk_size));
boot_sector_init(s_boot_sector, s_fsinfo_sector, disk_size, NULL );