mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Merge pull request #2484 from JosJuice/volume-return-types
Volume: Use more appropriate types for some returned values
This commit is contained in:
@ -25,7 +25,7 @@
|
||||
#include "DolphinQt/Utils/Resources.h"
|
||||
#include "DolphinQt/Utils/Utils.h"
|
||||
|
||||
static const u32 CACHE_REVISION = 0x007;
|
||||
static const u32 CACHE_REVISION = 0x008;
|
||||
static const u32 DATASTREAM_REVISION = 15; // Introduced in Qt 5.2
|
||||
|
||||
static QMap<DiscIO::IVolume::ELanguage, QString> ConvertLocalizedStrings(std::map<DiscIO::IVolume::ELanguage, std::string> strings)
|
||||
@ -100,7 +100,7 @@ GameFile::GameFile(const QString& fileName)
|
||||
|
||||
m_unique_id = QString::fromStdString(volume->GetUniqueID());
|
||||
m_compressed = DiscIO::IsCompressedBlob(fileName.toStdString());
|
||||
m_is_disc_two = volume->IsDiscTwo();
|
||||
m_disc_number = volume->GetDiscNumber();
|
||||
m_revision = volume->GetRevision();
|
||||
|
||||
QFileInfo info(m_file_name);
|
||||
@ -180,7 +180,7 @@ bool GameFile::LoadFromCache()
|
||||
>> m_banner
|
||||
>> m_compressed
|
||||
>> m_platform
|
||||
>> m_is_disc_two
|
||||
>> m_disc_number
|
||||
>> m_revision;
|
||||
m_country = (DiscIO::IVolume::ECountry)country;
|
||||
m_names = CastLocalizedStrings<DiscIO::IVolume::ELanguage>(names);
|
||||
@ -220,7 +220,7 @@ void GameFile::SaveToCache()
|
||||
<< m_banner
|
||||
<< m_compressed
|
||||
<< m_platform
|
||||
<< m_is_disc_two
|
||||
<< m_disc_number
|
||||
<< m_revision;
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@ public:
|
||||
QString GetDescription(DiscIO::IVolume::ELanguage language) const;
|
||||
QString GetDescription() const;
|
||||
QString GetCompany() const;
|
||||
int GetRevision() const { return m_revision; }
|
||||
u16 GetRevision() const { return m_revision; }
|
||||
const QString GetUniqueID() const { return m_unique_id; }
|
||||
const QString GetWiiFSPath() const;
|
||||
DiscIO::IVolume::ECountry GetCountry() const { return m_country; }
|
||||
@ -37,7 +37,8 @@ public:
|
||||
bool IsCompressed() const { return m_compressed; }
|
||||
u64 GetFileSize() const { return m_file_size; }
|
||||
u64 GetVolumeSize() const { return m_volume_size; }
|
||||
bool IsDiscTwo() const { return m_is_disc_two; }
|
||||
// 0 is the first disc, 1 is the second disc
|
||||
u8 GetDiscNumber() const { return m_disc_number; }
|
||||
const QPixmap GetBitmap() const { return m_banner; }
|
||||
|
||||
enum
|
||||
@ -66,12 +67,12 @@ private:
|
||||
|
||||
DiscIO::IVolume::ECountry m_country;
|
||||
int m_platform;
|
||||
int m_revision = 0;
|
||||
u16 m_revision = 0;
|
||||
|
||||
QPixmap m_banner;
|
||||
bool m_valid = false;
|
||||
bool m_compressed = false;
|
||||
bool m_is_disc_two = false;
|
||||
u8 m_disc_number = 0;
|
||||
|
||||
bool LoadFromCache();
|
||||
void SaveToCache();
|
||||
|
Reference in New Issue
Block a user