fix booting with a disc inserted

make disc changing a scheduled affair
fix some breakage from removal of mappedfile
cleanup

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3488 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Shawn Hoffman committed 2009-06-18 08:22:02 +00:00
1 parent 24192ab23c
commit b6bdc29935
9 files changed
+304 -322

No files matched your search

-27
View File
@@ -44,10 +44,6 @@ bool SetVolumeName(const std::string& _rFullPath)
{
if (g_pVolume)
{
// This code looks scary. Can the try/catch stuff be removed?
// This cause a "Unhandled exception ... Access violation
// reading location ..." after you have started and stopped two
// or three games
delete g_pVolume;
g_pVolume = NULL;
}
@@ -114,27 +110,4 @@ bool IsWii()
return false;
}
bool GetTMDOffset(u32 _Partition, u64& _Offset)
{
bool ret = false;
if (IsWii())
{
// Get the info table
u32 pInfoTableOffset = 0;
ret |= RAWReadToPtr((u8*)&pInfoTableOffset, 0x40004, 4);
u64 InfoTableOffset = (u64)Common::swap32(pInfoTableOffset) << 2;
// Get the offset of the partition
u32 pInfoTableEntryOffset = 0;
ret |= RAWReadToPtr((u8*)&pInfoTableEntryOffset, InfoTableOffset + (_Partition * 8), 4);
u64 PartitionOffset = (u64)Common::swap32(pInfoTableEntryOffset) << 2;
_Offset = PartitionOffset + 0x2c0;
}
return ret;
}
} // namespace