Better implementation of revision 2cc1a97a66
. Works with .gcz files now.
This commit is contained in:
parent
f660077d06
commit
1e006b5b99
|
@ -43,6 +43,7 @@ public:
|
||||||
virtual std::string GetApploaderDate() const = 0;
|
virtual std::string GetApploaderDate() const = 0;
|
||||||
virtual bool SupportsIntegrityCheck() const { return false; }
|
virtual bool SupportsIntegrityCheck() const { return false; }
|
||||||
virtual bool CheckIntegrity() const { return false; }
|
virtual bool CheckIntegrity() const { return false; }
|
||||||
|
virtual bool IsDiscTwo() const { return false; }
|
||||||
|
|
||||||
enum ECountry
|
enum ECountry
|
||||||
{
|
{
|
||||||
|
|
|
@ -137,4 +137,11 @@ u64 CVolumeGC::GetSize() const
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CVolumeGC::IsDiscTwo() const
|
||||||
|
{
|
||||||
|
bool discTwo;
|
||||||
|
Read(6,1, (u8*) &discTwo);
|
||||||
|
return discTwo;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
|
@ -39,6 +39,7 @@ public:
|
||||||
std::string GetApploaderDate() const;
|
std::string GetApploaderDate() const;
|
||||||
ECountry GetCountry() const;
|
ECountry GetCountry() const;
|
||||||
u64 GetSize() const;
|
u64 GetSize() const;
|
||||||
|
bool IsDiscTwo() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
IBlobReader* m_pReader;
|
IBlobReader* m_pReader;
|
||||||
|
|
|
@ -96,14 +96,9 @@ static int CompareGameListItems(const GameListItem* iso1, const GameListItem* is
|
||||||
case CGameListCtrl::COLUMN_TITLE:
|
case CGameListCtrl::COLUMN_TITLE:
|
||||||
if (!strcasecmp(iso1->GetName(indexOne).c_str(),iso2->GetName(indexOther).c_str()))
|
if (!strcasecmp(iso1->GetName(indexOne).c_str(),iso2->GetName(indexOther).c_str()))
|
||||||
{
|
{
|
||||||
File::IOFile file(iso1->GetFileName(),"rb");
|
if (iso1->IsDiscTwo())
|
||||||
u8 discNum;
|
|
||||||
file.Seek(6,0);
|
|
||||||
file.ReadBytes(&discNum, 1);
|
|
||||||
file.Close();
|
|
||||||
if (discNum == 1)
|
|
||||||
return 1 * t;
|
return 1 * t;
|
||||||
else
|
else if (iso2->IsDiscTwo())
|
||||||
return -1 * t;
|
return -1 * t;
|
||||||
}
|
}
|
||||||
return strcasecmp(iso1->GetName(indexOne).c_str(),
|
return strcasecmp(iso1->GetName(indexOne).c_str(),
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
#include "ChunkFile.h"
|
#include "ChunkFile.h"
|
||||||
#include "../resources/no_banner.cpp"
|
#include "../resources/no_banner.cpp"
|
||||||
|
|
||||||
#define CACHE_REVISION 0x10E
|
#define CACHE_REVISION 0x10F
|
||||||
|
|
||||||
#define DVD_BANNER_WIDTH 96
|
#define DVD_BANNER_WIDTH 96
|
||||||
#define DVD_BANNER_HEIGHT 32
|
#define DVD_BANNER_HEIGHT 32
|
||||||
|
@ -91,6 +91,7 @@ GameListItem::GameListItem(const std::string& _rFileName)
|
||||||
|
|
||||||
m_UniqueID = pVolume->GetUniqueID();
|
m_UniqueID = pVolume->GetUniqueID();
|
||||||
m_BlobCompressed = DiscIO::IsCompressedBlob(_rFileName.c_str());
|
m_BlobCompressed = DiscIO::IsCompressedBlob(_rFileName.c_str());
|
||||||
|
m_IsDiscTwo = pVolume->IsDiscTwo();
|
||||||
|
|
||||||
// check if we can get some infos from the banner file too
|
// check if we can get some infos from the banner file too
|
||||||
DiscIO::IFileSystem* pFileSystem = DiscIO::CreateFileSystem(pVolume);
|
DiscIO::IFileSystem* pFileSystem = DiscIO::CreateFileSystem(pVolume);
|
||||||
|
@ -235,6 +236,7 @@ void GameListItem::DoState(PointerWrap &p)
|
||||||
p.Do(m_BlobCompressed);
|
p.Do(m_BlobCompressed);
|
||||||
p.Do(m_pImage);
|
p.Do(m_pImage);
|
||||||
p.Do(m_Platform);
|
p.Do(m_Platform);
|
||||||
|
p.Do(m_IsDiscTwo);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string GameListItem::CreateCacheFilename()
|
std::string GameListItem::CreateCacheFilename()
|
||||||
|
|
|
@ -48,6 +48,7 @@ public:
|
||||||
bool IsCompressed() const {return m_BlobCompressed;}
|
bool IsCompressed() const {return m_BlobCompressed;}
|
||||||
u64 GetFileSize() const {return m_FileSize;}
|
u64 GetFileSize() const {return m_FileSize;}
|
||||||
u64 GetVolumeSize() const {return m_VolumeSize;}
|
u64 GetVolumeSize() const {return m_VolumeSize;}
|
||||||
|
bool IsDiscTwo() const {return m_IsDiscTwo;}
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
const wxImage& GetImage() const {return m_Image;}
|
const wxImage& GetImage() const {return m_Image;}
|
||||||
#endif
|
#endif
|
||||||
|
@ -87,6 +88,7 @@ private:
|
||||||
bool m_BlobCompressed;
|
bool m_BlobCompressed;
|
||||||
std::vector<u8> m_pImage;
|
std::vector<u8> m_pImage;
|
||||||
u32 m_ImageSize;
|
u32 m_ImageSize;
|
||||||
|
bool m_IsDiscTwo;
|
||||||
|
|
||||||
bool LoadFromCache();
|
bool LoadFromCache();
|
||||||
void SaveToCache();
|
void SaveToCache();
|
||||||
|
|
Loading…
Reference in New Issue