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