diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2009-09-25 15:26:59 +0000 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2009-09-25 15:26:59 +0000 |
commit | b9a17dd0ceb1edc3e8d08522f82f9dfeabe53a53 (patch) | |
tree | b1047dbaea6e264d06f95e9227923255a29af1d2 /rbutil | |
parent | d0bb6d006530403e4027468e9d568a42954cd6f5 (diff) |
Add special handling for ipodvideo64mb when detecting the player via rockbox-info.txt.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22831 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil')
-rw-r--r-- | rbutil/rbutilqt/base/autodetection.cpp | 6 | ||||
-rw-r--r-- | rbutil/rbutilqt/base/utils.cpp | 6 | ||||
-rw-r--r-- | rbutil/rbutilqt/base/utils.h | 2 |
3 files changed, 13 insertions, 1 deletions
diff --git a/rbutil/rbutilqt/base/autodetection.cpp b/rbutil/rbutilqt/base/autodetection.cpp index b038aa683d..0526d8d9c9 100644 --- a/rbutil/rbutilqt/base/autodetection.cpp +++ b/rbutil/rbutilqt/base/autodetection.cpp @@ -97,6 +97,12 @@ bool Autodetection::detect() if(m_device.isEmpty()) { m_device = info.target(); + // special case for video64mb. This is a workaround, and + // should get replaced when autodetection is reworked. + if(m_device == "ipodvideo" || info.ram() == 64) + { + m_device = "ipodvideo64mb"; + } } m_mountpoint = mounts.at(i); qDebug() << "[Autodetect] rockbox-info.txt detected:" diff --git a/rbutil/rbutilqt/base/utils.cpp b/rbutil/rbutilqt/base/utils.cpp index aab7f0fed5..066adc3fd4 100644 --- a/rbutil/rbutilqt/base/utils.cpp +++ b/rbutil/rbutilqt/base/utils.cpp @@ -233,7 +233,11 @@ RockboxInfo::RockboxInfo(QString mountpoint) else if(line.contains("Target id:")) { m_targetid = line.remove("Target id:").trimmed(); - } + } + else if(line.contains("Memory:")) + { + m_ram = line.remove("Memory:").trimmed().toInt(); + } } file.close(); diff --git a/rbutil/rbutilqt/base/utils.h b/rbutil/rbutilqt/base/utils.h index ef7d30ec90..ba1989b3c3 100644 --- a/rbutil/rbutilqt/base/utils.h +++ b/rbutil/rbutilqt/base/utils.h @@ -41,12 +41,14 @@ public: QString features(){return m_features;} QString targetID() {return m_targetid;} QString target() {return m_target;} + int ram() { return m_ram; } bool success() { return m_success; } private: QString m_version; QString m_features; QString m_targetid; QString m_target; + int m_ram; bool m_success; }; |