mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
Add (untested) device detection using sansapatcher.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14445 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
d23afdccbc
commit
739949979c
1 changed files with 12 additions and 4 deletions
|
|
@ -52,11 +52,11 @@ bool Autodetection::detect()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
int n;
|
||||||
|
|
||||||
//try ipodpatcher
|
//try ipodpatcher
|
||||||
struct ipod_t ipod;
|
struct ipod_t ipod;
|
||||||
|
n = ipod_scan(&ipod);
|
||||||
int n = ipod_scan(&ipod);
|
|
||||||
if(n == 1) {
|
if(n == 1) {
|
||||||
qDebug() << "Ipod found:" << ipod.modelstr << "at" << ipod.diskname;
|
qDebug() << "Ipod found:" << ipod.modelstr << "at" << ipod.diskname;
|
||||||
m_device = ipod.targetname;
|
m_device = ipod.targetname;
|
||||||
|
|
@ -65,7 +65,14 @@ bool Autodetection::detect()
|
||||||
}
|
}
|
||||||
|
|
||||||
//try sansapatcher
|
//try sansapatcher
|
||||||
|
struct sansa_t sansa;
|
||||||
|
n = sansa_scan(&sansa);
|
||||||
|
if(n == 1) {
|
||||||
|
qDebug() << "Sansa found:" << "sansae200" << "at" << sansa.diskname;
|
||||||
|
m_device = "sansae200";
|
||||||
|
m_mountpoint = resolveMountPoint(sansa.diskname);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -119,6 +126,7 @@ QString Autodetection::resolveMountPoint(QString device)
|
||||||
QString directory = dir;
|
QString directory = dir;
|
||||||
free( dev );
|
free( dev );
|
||||||
free( dir );
|
free( dir );
|
||||||
|
fclose(fp);
|
||||||
return directory;
|
return directory;
|
||||||
}
|
}
|
||||||
free( dev );
|
free( dev );
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue