Merge pull request #2829 from JosJuice/fix-wii-fst-size-2
Fix reading Wii FST size (for real this time)
This commit is contained in:
commit
113cc119de
|
@ -90,7 +90,7 @@ public:
|
||||||
virtual std::map<ELanguage, std::string> GetDescriptions() const { return std::map<ELanguage, std::string>(); }
|
virtual std::map<ELanguage, std::string> GetDescriptions() const { return std::map<ELanguage, std::string>(); }
|
||||||
virtual std::string GetCompany() const { return std::string(); }
|
virtual std::string GetCompany() const { return std::string(); }
|
||||||
virtual std::vector<u32> GetBanner(int* width, int* height) const;
|
virtual std::vector<u32> GetBanner(int* width, int* height) const;
|
||||||
virtual u32 GetFSTSize() const = 0;
|
virtual u64 GetFSTSize() const = 0;
|
||||||
virtual std::string GetApploaderDate() const = 0;
|
virtual std::string GetApploaderDate() const = 0;
|
||||||
// 0 is the first disc, 1 is the second disc
|
// 0 is the first disc, 1 is the second disc
|
||||||
virtual u8 GetDiscNumber() const { return 0; }
|
virtual u8 GetDiscNumber() const { return 0; }
|
||||||
|
|
|
@ -210,7 +210,7 @@ void CVolumeDirectory::SetName(const std::string& name)
|
||||||
m_diskHeader[length + 0x20] = 0;
|
m_diskHeader[length + 0x20] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 CVolumeDirectory::GetFSTSize() const
|
u64 CVolumeDirectory::GetFSTSize() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ public:
|
||||||
std::map<IVolume::ELanguage, std::string> GetNames(bool prefer_long) const override;
|
std::map<IVolume::ELanguage, std::string> GetNames(bool prefer_long) const override;
|
||||||
void SetName(const std::string&);
|
void SetName(const std::string&);
|
||||||
|
|
||||||
u32 GetFSTSize() const override;
|
u64 GetFSTSize() const override;
|
||||||
|
|
||||||
std::string GetApploaderDate() const override;
|
std::string GetApploaderDate() const override;
|
||||||
EPlatform GetVolumeType() const override;
|
EPlatform GetVolumeType() const override;
|
||||||
|
|
|
@ -144,7 +144,7 @@ std::vector<u32> CVolumeGC::GetBanner(int* width, int* height) const
|
||||||
return image_buffer;
|
return image_buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 CVolumeGC::GetFSTSize() const
|
u64 CVolumeGC::GetFSTSize() const
|
||||||
{
|
{
|
||||||
if (m_pReader == nullptr)
|
if (m_pReader == nullptr)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -33,7 +33,7 @@ public:
|
||||||
std::map<ELanguage, std::string> GetDescriptions() const override;
|
std::map<ELanguage, std::string> GetDescriptions() const override;
|
||||||
std::string GetCompany() const override;
|
std::string GetCompany() const override;
|
||||||
std::vector<u32> GetBanner(int* width, int* height) const override;
|
std::vector<u32> GetBanner(int* width, int* height) const override;
|
||||||
u32 GetFSTSize() const override;
|
u64 GetFSTSize() const override;
|
||||||
std::string GetApploaderDate() const override;
|
std::string GetApploaderDate() const override;
|
||||||
u8 GetDiscNumber() const override;
|
u8 GetDiscNumber() const override;
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ public:
|
||||||
u16 GetRevision() const override;
|
u16 GetRevision() const override;
|
||||||
std::string GetInternalName() const override { return ""; }
|
std::string GetInternalName() const override { return ""; }
|
||||||
std::map<IVolume::ELanguage, std::string> GetNames(bool prefer_long) const override;
|
std::map<IVolume::ELanguage, std::string> GetNames(bool prefer_long) const override;
|
||||||
u32 GetFSTSize() const override { return 0; }
|
u64 GetFSTSize() const override { return 0; }
|
||||||
std::string GetApploaderDate() const override { return ""; }
|
std::string GetApploaderDate() const override { return ""; }
|
||||||
|
|
||||||
EPlatform GetVolumeType() const override;
|
EPlatform GetVolumeType() const override;
|
||||||
|
|
|
@ -208,7 +208,7 @@ std::map<IVolume::ELanguage, std::string> CVolumeWiiCrypted::GetNames(bool prefe
|
||||||
return ReadWiiNames(opening_bnr);
|
return ReadWiiNames(opening_bnr);
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 CVolumeWiiCrypted::GetFSTSize() const
|
u64 CVolumeWiiCrypted::GetFSTSize() const
|
||||||
{
|
{
|
||||||
if (m_pReader == nullptr)
|
if (m_pReader == nullptr)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -218,7 +218,7 @@ u32 CVolumeWiiCrypted::GetFSTSize() const
|
||||||
if (!Read(0x428, 0x4, (u8*)&size, true))
|
if (!Read(0x428, 0x4, (u8*)&size, true))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return Common::swap32(size);
|
return (u64)Common::swap32(size) << 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string CVolumeWiiCrypted::GetApploaderDate() const
|
std::string CVolumeWiiCrypted::GetApploaderDate() const
|
||||||
|
|
|
@ -33,7 +33,7 @@ public:
|
||||||
u16 GetRevision() const override;
|
u16 GetRevision() const override;
|
||||||
std::string GetInternalName() const override;
|
std::string GetInternalName() const override;
|
||||||
std::map<IVolume::ELanguage, std::string> GetNames(bool prefer_long) const override;
|
std::map<IVolume::ELanguage, std::string> GetNames(bool prefer_long) const override;
|
||||||
u32 GetFSTSize() const override;
|
u64 GetFSTSize() const override;
|
||||||
std::string GetApploaderDate() const override;
|
std::string GetApploaderDate() const override;
|
||||||
u8 GetDiscNumber() const override;
|
u8 GetDiscNumber() const override;
|
||||||
|
|
||||||
|
|
|
@ -183,9 +183,9 @@ CISOProperties::CISOProperties(const std::string& fileName, wxWindow* parent, wx
|
||||||
|
|
||||||
wxString temp = "0x" + StrToWxStr(OpenISO->GetMakerID());
|
wxString temp = "0x" + StrToWxStr(OpenISO->GetMakerID());
|
||||||
m_MakerID->SetValue(temp);
|
m_MakerID->SetValue(temp);
|
||||||
m_Revision->SetValue(wxString::Format("%u", OpenISO->GetRevision()));
|
m_Revision->SetValue(StrToWxStr(std::to_string(OpenISO->GetRevision())));
|
||||||
m_Date->SetValue(StrToWxStr(OpenISO->GetApploaderDate()));
|
m_Date->SetValue(StrToWxStr(OpenISO->GetApploaderDate()));
|
||||||
m_FST->SetValue(wxString::Format("%u", OpenISO->GetFSTSize()));
|
m_FST->SetValue(StrToWxStr(std::to_string(OpenISO->GetFSTSize())));
|
||||||
|
|
||||||
// Here we set all the info to be shown + we set the window title
|
// Here we set all the info to be shown + we set the window title
|
||||||
bool wii = OpenISO->GetVolumeType() != DiscIO::IVolume::GAMECUBE_DISC;
|
bool wii = OpenISO->GetVolumeType() != DiscIO::IVolume::GAMECUBE_DISC;
|
||||||
|
|
Loading…
Reference in New Issue