summaryrefslogtreecommitdiff
path: root/rbutil/ipodpatcher
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2009-09-25 08:39:08 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2009-09-25 08:39:08 +0000
commit4e4510ee91dbdf889711a163c0986c466b661e6e (patch)
treeeec6927289b9535e44bb255f37aa2d5ede340c45 /rbutil/ipodpatcher
parent855fdc5ab9c2a4e28008263d90098ba900ac0979 (diff)
Query RAM size when scanning for Ipods. Return the target string for Video 64MB when apropriate amount of RAM is detected. Makes Rockbox Utility detect it correctly for first time installs.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22829 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/ipodpatcher')
-rw-r--r--rbutil/ipodpatcher/ipodpatcher.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/rbutil/ipodpatcher/ipodpatcher.c b/rbutil/ipodpatcher/ipodpatcher.c
index 1a5268bb6d..79357fde06 100644
--- a/rbutil/ipodpatcher/ipodpatcher.c
+++ b/rbutil/ipodpatcher/ipodpatcher.c
@@ -1234,7 +1234,12 @@ int getmodel(struct ipod_t* ipod, int ipod_version)
ipod->modelstr="Video (aka 5th Generation)";
ipod->modelnum = 5;
ipod->modelname = "ipvd";
- ipod->targetname = "ipodvideo";
+ if(ipod->ramsize == 64) {
+ ipod->targetname = "ipodvideo64mb";
+ }
+ else {
+ ipod->targetname = "ipodvideo";
+ }
#ifdef WITH_BOOTOBJS
ipod->bootloader = ipodvideo;
ipod->bootloader_len = LEN_ipodvideo;
@@ -1312,6 +1317,11 @@ int ipod_scan(struct ipod_t* ipod)
}
ipod_version=(ipod->ipod_directory[0].vers>>8);
+ /* Windows requires the ipod in R/W mode for SCSI Inquiry */
+ ipod->ramsize = 0;
+ ipod_reopen_rw(ipod);
+ ipod_get_xmlinfo(ipod);
+ ipod_get_ramsize(ipod);
if (getmodel(ipod,ipod_version) < 0) {
ipod_close(ipod);
continue;