summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/base/autodetection.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2012-12-23 23:30:57 +0100
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2013-01-01 15:05:52 +0100
commit24e37ddf57bac6a1c9786d50abbe3a1982930382 (patch)
treeb34ae751986f185f51556a040f388025cac4c383 /rbutil/rbutilqt/base/autodetection.cpp
parent6803d7b10cd9651ded08674f1597d4511cabb7af (diff)
downloadrockbox-24e37ddf57bac6a1c9786d50abbe3a1982930382.tar.gz
rockbox-24e37ddf57bac6a1c9786d50abbe3a1982930382.tar.bz2
rockbox-24e37ddf57bac6a1c9786d50abbe3a1982930382.zip
ipodpatcher: move sectorbuf pointer into ipod_t structure.
The ipod_t structure holds all relevant information for ipodpatcher. Put the global ipod_sectorbuf pointer into it as well. Allows the Rockbox Utility Ipod class to be instanciated multiple times since each instance can now have its own buffer. Change-Id: Ie319cbadbc20c367ceadba9a46b4dc34b57a79a7
Diffstat (limited to 'rbutil/rbutilqt/base/autodetection.cpp')
-rw-r--r--rbutil/rbutilqt/base/autodetection.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/rbutil/rbutilqt/base/autodetection.cpp b/rbutil/rbutilqt/base/autodetection.cpp
index 0206502202..8fba1d8cea 100644
--- a/rbutil/rbutilqt/base/autodetection.cpp
+++ b/rbutil/rbutilqt/base/autodetection.cpp
@@ -137,9 +137,9 @@ bool Autodetection::detect()
int n;
// try ipodpatcher
// initialize sector buffer. Needed.
- ipod_sectorbuf = NULL;
- ipod_alloc_buffer(&ipod_sectorbuf, BUFFER_SIZE);
struct ipod_t ipod;
+ ipod.sectorbuf = NULL;
+ ipod_alloc_buffer(&ipod, BUFFER_SIZE);
n = ipod_scan(&ipod);
if(n == 1) {
qDebug() << "[Autodetect] Ipod found:" << ipod.modelstr << "at" << ipod.diskname;
@@ -162,8 +162,8 @@ bool Autodetection::detect()
else {
qDebug() << "[Autodetect] ipodpatcher: no Ipod found." << n;
}
- free(ipod_sectorbuf);
- ipod_sectorbuf = NULL;
+ free(ipod.sectorbuf);
+ ipod.sectorbuf = NULL;
// try sansapatcher
// initialize sector buffer. Needed.