Add GUID from DreamStation 2 files to machine properties.

This commit is contained in:
sawinglogz 2021-11-29 10:25:52 -05:00
parent 8391dedc80
commit ec52b8b436

View File

@ -258,6 +258,7 @@ class PRDS2File : public RawDataFile
PRDS2File(class QFile & file); PRDS2File(class QFile & file);
virtual ~PRDS2File() {}; virtual ~PRDS2File() {};
bool isValid() const; bool isValid() const;
QString guid() const;
private: private:
bool parseDS2Header(); bool parseDS2Header();
int read16(); int read16();
@ -300,6 +301,11 @@ bool PRDS2File::isValid() const {
return m_valid; return m_valid;
} }
QString PRDS2File::guid() const {
QString guid(m_guid);
return guid;
}
bool PRDS2File::seek(qint64 pos) bool PRDS2File::seek(qint64 pos)
{ {
if (!m_valid) { if (!m_valid) {
@ -667,6 +673,7 @@ bool PRS1Loader::PeekProperties(const QString & filename, QHash<QString,QString>
return false; return false;
} }
src = ds2; src = ds2;
props["GUID"] = ds2->guid();
} else { } else {
// Otherwise just use the file as input. // Otherwise just use the file as input.
src = new RawDataFile(f); src = new RawDataFile(f);