diff --git a/Source/Core/Core/Src/Boot/Boot.cpp b/Source/Core/Core/Src/Boot/Boot.cpp index 52da1be73b..01ec891172 100644 --- a/Source/Core/Core/Src/Boot/Boot.cpp +++ b/Source/Core/Core/Src/Boot/Boot.cpp @@ -479,7 +479,7 @@ bool CBoot::BootUp(const SCoreStartupParameter& _StartupPara) if (pVolume == NULL) break; - bool isoWii = DiscIO::IsVolumeWiiDisc(*pVolume); + bool isoWii = DiscIO::IsVolumeWiiDisc(pVolume); if (isoWii != Core::GetStartupParameter().bWii) { PanicAlert("Warning - starting ISO in wrong console mode!"); diff --git a/Source/Core/Core/Src/CoreParameter.cpp b/Source/Core/Core/Src/CoreParameter.cpp index e22eda26d3..cecaf6c6de 100644 --- a/Source/Core/Core/Src/CoreParameter.cpp +++ b/Source/Core/Core/Src/CoreParameter.cpp @@ -65,7 +65,7 @@ bool SCoreStartupParameter::AutoSetup(EBootBios _BootBios) return false; } m_strUniqueID = pVolume->GetUniqueID(); - bWii = DiscIO::IsVolumeWiiDisc(*pVolume); + bWii = DiscIO::IsVolumeWiiDisc(pVolume); switch (pVolume->GetCountry()) { diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_DI.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_DI.cpp index 3084d9d882..d9dd4350da 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_DI.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_DI.cpp @@ -38,7 +38,7 @@ CWII_IPC_HLE_Device_di::CWII_IPC_HLE_Device_di(u32 _DeviceID, const std::string& m_pVolume = DiscIO::CreateVolumeFromFilename(Core::GetStartupParameter().m_strFilename); if (m_pVolume) - m_pFileSystem = DiscIO::CreateFileSystem(*m_pVolume); + m_pFileSystem = DiscIO::CreateFileSystem(m_pVolume); } // __________________________________________________________________________________________________ diff --git a/Source/Core/Core/Src/VolumeHandler.cpp b/Source/Core/Core/Src/VolumeHandler.cpp index 085639e3e7..2b48eac101 100644 --- a/Source/Core/Core/Src/VolumeHandler.cpp +++ b/Source/Core/Core/Src/VolumeHandler.cpp @@ -69,7 +69,7 @@ bool IsValid() bool IsWii() { if (g_pVolume) - return IsVolumeWiiDisc(*g_pVolume); + return IsVolumeWiiDisc(g_pVolume); return false; } diff --git a/Source/Core/DiscIO/Src/BannerLoaderWii.cpp b/Source/Core/DiscIO/Src/BannerLoaderWii.cpp index 4744223d9a..8e5bb173cc 100644 --- a/Source/Core/DiscIO/Src/BannerLoaderWii.cpp +++ b/Source/Core/DiscIO/Src/BannerLoaderWii.cpp @@ -64,7 +64,7 @@ CBannerLoaderWii::CBannerLoaderWii(DiscIO::IFileSystem& _rFileSystem) } - m_Name = std::string("Wii: ") + _rFileSystem.GetVolume().GetName(); + m_Name = std::string("Wii: ") + _rFileSystem.GetVolume()->GetName(); } diff --git a/Source/Core/DiscIO/Src/FileSystemGCWii.cpp b/Source/Core/DiscIO/Src/FileSystemGCWii.cpp index 5a23256f6b..2fd477526f 100644 --- a/Source/Core/DiscIO/Src/FileSystemGCWii.cpp +++ b/Source/Core/DiscIO/Src/FileSystemGCWii.cpp @@ -25,7 +25,7 @@ namespace DiscIO { -CFileSystemGCWii::CFileSystemGCWii(const IVolume& _rVolume) +CFileSystemGCWii::CFileSystemGCWii(const IVolume *_rVolume) : IFileSystem(_rVolume), m_Initialized(false), m_OffsetShift(0) @@ -106,7 +106,7 @@ CFileSystemGCWii::ReadFile(const char* _rFullPath, u8* _pBuffer, size_t _MaxBuff return(0); } - m_rVolume.Read(pFileInfo->m_Offset, pFileInfo->m_FileSize, _pBuffer); + m_rVolume->Read(pFileInfo->m_Offset, pFileInfo->m_FileSize, _pBuffer); return(pFileInfo->m_FileSize); } @@ -155,14 +155,14 @@ u32 CFileSystemGCWii::Read32(u64 _Offset) const { u32 Temp = 0; - m_rVolume.Read(_Offset, 4, (u8*)&Temp); + m_rVolume->Read(_Offset, 4, (u8*)&Temp); return(Common::swap32(Temp)); } void CFileSystemGCWii::GetStringFromOffset(u64 _Offset, char* Filename) const { - m_rVolume.Read(_Offset, 255, (u8*)Filename); + m_rVolume->Read(_Offset, 255, (u8*)Filename); } size_t CFileSystemGCWii::GetFileList(std::vector &_rFilenames) diff --git a/Source/Core/DiscIO/Src/FileSystemGCWii.h b/Source/Core/DiscIO/Src/FileSystemGCWii.h index f90d06ffe6..19e57bfbc7 100644 --- a/Source/Core/DiscIO/Src/FileSystemGCWii.h +++ b/Source/Core/DiscIO/Src/FileSystemGCWii.h @@ -29,7 +29,7 @@ class CFileSystemGCWii { public: - CFileSystemGCWii(const IVolume& _rVolume); + CFileSystemGCWii(const IVolume *_rVolume); virtual ~CFileSystemGCWii(); diff --git a/Source/Core/DiscIO/Src/Filesystem.cpp b/Source/Core/DiscIO/Src/Filesystem.cpp index 3c92056cee..bbbd04c0b1 100644 --- a/Source/Core/DiscIO/Src/Filesystem.cpp +++ b/Source/Core/DiscIO/Src/Filesystem.cpp @@ -23,7 +23,7 @@ namespace DiscIO { -IFileSystem::IFileSystem(const IVolume& _rVolume) +IFileSystem::IFileSystem(const IVolume *_rVolume) : m_rVolume(_rVolume) {} @@ -32,7 +32,7 @@ IFileSystem::~IFileSystem() {} -IFileSystem* CreateFileSystem(const IVolume& _rVolume) +IFileSystem* CreateFileSystem(const IVolume* _rVolume) { IFileSystem* pFileSystem = new CFileSystemGCWii(_rVolume); diff --git a/Source/Core/DiscIO/Src/Filesystem.h b/Source/Core/DiscIO/Src/Filesystem.h index 7b319518a0..c794864e98 100644 --- a/Source/Core/DiscIO/Src/Filesystem.h +++ b/Source/Core/DiscIO/Src/Filesystem.h @@ -46,7 +46,7 @@ class IFileSystem { public: - IFileSystem(const IVolume& _rVolume); + IFileSystem(const IVolume *_rVolume); virtual ~IFileSystem(); @@ -66,15 +66,15 @@ class IFileSystem virtual const char* GetFileName(u64 _Address) = 0; - virtual const IVolume& GetVolume() {return(m_rVolume);} + virtual const IVolume *GetVolume() {return(m_rVolume);} protected: - const IVolume& m_rVolume; + const IVolume *m_rVolume; }; -IFileSystem* CreateFileSystem(const IVolume& _rVolume); +IFileSystem* CreateFileSystem(const IVolume *_rVolume); } // namespace #endif diff --git a/Source/Core/DiscIO/Src/VolumeCreator.cpp b/Source/Core/DiscIO/Src/VolumeCreator.cpp index 1291d6d2fc..e7b051f9bb 100644 --- a/Source/Core/DiscIO/Src/VolumeCreator.cpp +++ b/Source/Core/DiscIO/Src/VolumeCreator.cpp @@ -103,10 +103,10 @@ IVolume* CreateVolumeFromFilename(const std::string& _rFilename) return NULL; } -bool IsVolumeWiiDisc(const IVolume& _rVolume) +bool IsVolumeWiiDisc(const IVolume *_rVolume) { u32 MagicWord = 0; - _rVolume.Read(0x18, 4, (u8*)&MagicWord); + _rVolume->Read(0x18, 4, (u8*)&MagicWord); return (Common::swap32(MagicWord) == 0x5D1C9EA3); } diff --git a/Source/Core/DiscIO/Src/VolumeCreator.h b/Source/Core/DiscIO/Src/VolumeCreator.h index 0975f567c9..ad5f5d17fd 100644 --- a/Source/Core/DiscIO/Src/VolumeCreator.h +++ b/Source/Core/DiscIO/Src/VolumeCreator.h @@ -23,7 +23,7 @@ namespace DiscIO { IVolume* CreateVolumeFromFilename(const std::string& _rFilename); -bool IsVolumeWiiDisc(const IVolume& _rVolume); +bool IsVolumeWiiDisc(const IVolume *_rVolume); } // namespace #endif diff --git a/Source/Core/DolphinWX/Src/FilesystemViewer.cpp b/Source/Core/DolphinWX/Src/FilesystemViewer.cpp index e3b8b18bab..9d5dcc3b2e 100644 --- a/Source/Core/DolphinWX/Src/FilesystemViewer.cpp +++ b/Source/Core/DolphinWX/Src/FilesystemViewer.cpp @@ -42,7 +42,7 @@ CFilesystemViewer::CFilesystemViewer(const std::string fileName, wxWindow* paren std::vector Our_Files; OpenIso = DiscIO::CreateVolumeFromFilename(fileName); - pFileSystem = DiscIO::CreateFileSystem(*OpenIso); + pFileSystem = DiscIO::CreateFileSystem(OpenIso); pFileSystem->GetFileList(Our_Files); CreateGUIControls(); diff --git a/Source/Core/DolphinWX/Src/ISOFile.cpp b/Source/Core/DolphinWX/Src/ISOFile.cpp index e9d37291d7..8dc7c41d5e 100644 --- a/Source/Core/DolphinWX/Src/ISOFile.cpp +++ b/Source/Core/DolphinWX/Src/ISOFile.cpp @@ -50,7 +50,7 @@ CISOFile::CISOFile(const std::string& _rFileName) m_BlobCompressed = DiscIO::IsCompressedBlob(_rFileName.c_str()); // check if we can get some infos from the banner file too - DiscIO::IFileSystem* pFileSystem = DiscIO::CreateFileSystem(*pVolume); + DiscIO::IFileSystem* pFileSystem = DiscIO::CreateFileSystem(pVolume); if (pFileSystem != NULL) {