mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 06:39:46 -06:00
Submit all kind of misc little changes and cleanup so I get a clean slate. There should be nothing in here that really changes anything important, except fixing some types in the filesystemgc stuff.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@717 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -61,7 +61,7 @@ bool PlainFileReader::Read(u64 offset, u64 nbytes, u8* out_ptr)
|
||||
if (nbytes >= 0x100000000ULL)
|
||||
return false; // WTF, does windows really have this limitation?
|
||||
|
||||
DWORD unused;
|
||||
DWORD unused = 0;
|
||||
if (!ReadFile(hFile, out_ptr, DWORD(nbytes & 0xFFFFFFFF), &unused, NULL))
|
||||
return false;
|
||||
else
|
||||
|
@ -43,7 +43,7 @@ bool CFileSystemGCWii::IsInitialized() const
|
||||
return m_Initialized;
|
||||
}
|
||||
|
||||
size_t CFileSystemGCWii::GetFileSize(const char* _rFullPath) const
|
||||
u64 CFileSystemGCWii::GetFileSize(const char* _rFullPath) const
|
||||
{
|
||||
if (!m_Initialized)
|
||||
return 0;
|
||||
@ -70,7 +70,7 @@ const char* CFileSystemGCWii::GetFileName(u64 _Address) const
|
||||
return NULL;
|
||||
}
|
||||
|
||||
size_t CFileSystemGCWii::ReadFile(const char* _rFullPath, u8* _pBuffer, size_t _MaxBufferSize) const
|
||||
u64 CFileSystemGCWii::ReadFile(const char* _rFullPath, u8* _pBuffer, size_t _MaxBufferSize) const
|
||||
{
|
||||
if (!m_Initialized)
|
||||
return 0;
|
||||
@ -170,7 +170,7 @@ bool CFileSystemGCWii::InitFileSystem()
|
||||
}
|
||||
|
||||
// read the whole FST
|
||||
u32 FSTOffset = Read32(0x424) << m_OffsetShift;
|
||||
u64 FSTOffset = (u64)Read32(0x424) << m_OffsetShift;
|
||||
// u32 FSTSize = Read32(0x428);
|
||||
// u32 FSTMaxSize = Read32(0x42C);
|
||||
|
||||
|
@ -31,9 +31,9 @@ public:
|
||||
CFileSystemGCWii(const IVolume *_rVolume);
|
||||
virtual ~CFileSystemGCWii();
|
||||
virtual bool IsInitialized() const;
|
||||
virtual size_t GetFileSize(const char* _rFullPath) const;
|
||||
virtual u64 GetFileSize(const char* _rFullPath) const;
|
||||
virtual const char* GetFileName(u64 _Address) const;
|
||||
virtual size_t ReadFile(const char* _rFullPath, u8* _pBuffer, size_t _MaxBufferSize) const;
|
||||
virtual u64 ReadFile(const char* _rFullPath, u8* _pBuffer, size_t _MaxBufferSize) const;
|
||||
virtual bool ExportFile(const char* _rFullPath, const char* _rExportFilename) const;
|
||||
virtual bool ExportAllFiles(const char* _rFullPath) const;
|
||||
|
||||
|
@ -26,9 +26,9 @@ namespace DiscIO
|
||||
// file info of an FST entry
|
||||
struct SFileInfo
|
||||
{
|
||||
u32 m_NameOffset;
|
||||
u64 m_NameOffset;
|
||||
u64 m_Offset;
|
||||
u32 m_FileSize;
|
||||
u64 m_FileSize;
|
||||
char m_FullPath[512];
|
||||
|
||||
bool IsDirectory() const { return (m_NameOffset & 0xFF000000) != 0 ? true : false; }
|
||||
@ -51,9 +51,8 @@ public:
|
||||
virtual ~IFileSystem();
|
||||
virtual bool IsInitialized() const = 0;
|
||||
virtual size_t GetFileList(std::vector<const SFileInfo *> &_rFilenames) const = 0;
|
||||
virtual size_t GetFileSize(const char* _rFullPath) const = 0;
|
||||
|
||||
virtual size_t ReadFile(const char* _rFullPath, u8* _pBuffer, size_t _MaxBufferSize) const = 0;
|
||||
virtual u64 GetFileSize(const char* _rFullPath) const = 0;
|
||||
virtual u64 ReadFile(const char* _rFullPath, u8* _pBuffer, size_t _MaxBufferSize) const = 0;
|
||||
virtual bool ExportFile(const char* _rFullPath, const char* _rExportFilename) const = 0;
|
||||
virtual bool ExportAllFiles(const char* _rFullPath) const = 0;
|
||||
virtual const char* GetFileName(u64 _Address) const = 0;
|
||||
|
Reference in New Issue
Block a user