mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Added support for Reset (from menu). Fixes Sam & Max.
This commit is contained in:
@ -159,7 +159,7 @@ bool CFileSystemGCWii::ExportApploader(const char* _rExportFolder) const
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CFileSystemGCWii::ExportDOL(const char* _rExportFolder) const
|
||||
u32 CFileSystemGCWii::GetBootDOLSize() const
|
||||
{
|
||||
u32 DolOffset = Read32(0x420) << m_OffsetShift;
|
||||
u32 DolSize = 0, offset = 0, size = 0;
|
||||
@ -181,9 +181,22 @@ bool CFileSystemGCWii::ExportDOL(const char* _rExportFolder) const
|
||||
if (offset + size > DolSize)
|
||||
DolSize = offset + size;
|
||||
}
|
||||
return DolSize;
|
||||
}
|
||||
|
||||
bool CFileSystemGCWii::GetBootDOL(u8* &buffer, u32 DolSize) const
|
||||
{
|
||||
u32 DolOffset = Read32(0x420) << m_OffsetShift;
|
||||
return m_rVolume->Read(DolOffset, DolSize, buffer);
|
||||
}
|
||||
|
||||
bool CFileSystemGCWii::ExportDOL(const char* _rExportFolder) const
|
||||
{
|
||||
u32 DolOffset = Read32(0x420) << m_OffsetShift;
|
||||
u32 DolSize = GetBootDOLSize();
|
||||
u8* buffer = new u8[DolSize];
|
||||
if (m_rVolume->Read(DolOffset, DolSize, buffer))
|
||||
|
||||
if (GetBootDOL(buffer, DolSize))
|
||||
{
|
||||
char exportName[512];
|
||||
sprintf(exportName, "%s/boot.dol", _rExportFolder);
|
||||
|
@ -38,6 +38,8 @@ public:
|
||||
virtual bool ExportFile(const char* _rFullPath, const char* _rExportFilename);
|
||||
virtual bool ExportApploader(const char* _rExportFolder) const;
|
||||
virtual bool ExportDOL(const char* _rExportFolder) const;
|
||||
virtual bool GetBootDOL(u8* &buffer, u32 DolSize) const;
|
||||
virtual u32 GetBootDOLSize() const;
|
||||
|
||||
private:
|
||||
bool m_Initialized;
|
||||
|
@ -57,6 +57,8 @@ public:
|
||||
virtual bool ExportApploader(const char* _rExportFolder) const = 0;
|
||||
virtual bool ExportDOL(const char* _rExportFolder) const = 0;
|
||||
virtual const char* GetFileName(u64 _Address) = 0;
|
||||
virtual bool GetBootDOL(u8* &buffer, u32 DolSize) const = 0;
|
||||
virtual u32 GetBootDOLSize() const = 0;
|
||||
|
||||
virtual const IVolume *GetVolume() const { return m_rVolume; }
|
||||
protected:
|
||||
|
Reference in New Issue
Block a user