From 543b08ac078804524903c02a9c6d1ef8bebfbd33 Mon Sep 17 00:00:00 2001 From: tpunix Date: Mon, 8 Jul 2013 15:17:42 +0800 Subject: [PATCH] bugfix of ISOFileSystem --- Core/FileSystems/ISOFileSystem.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Core/FileSystems/ISOFileSystem.cpp b/Core/FileSystems/ISOFileSystem.cpp index cfd13f8069..b3cfeee0cd 100644 --- a/Core/FileSystems/ISOFileSystem.cpp +++ b/Core/FileSystems/ISOFileSystem.cpp @@ -370,7 +370,7 @@ u32 ISOFileSystem::OpenFile(std::string filename, FileAccess access, const char entry.openSize = readSize; // when open as "umd1:/sce_lbn0x0_size0x6B49D200", that mean open umd1 as a block device. // the param in sceIoLseek and sceIoRead is lba mode. we must mark it. - if(strncmp(devicename, "umd1:", 5)==0) + if(strncmp(devicename, "umd0:", 5)==0 || strncmp(devicename, "umd1:", 5)==0) entry.isBlockSectorMode = true; entries[newHandle] = entry; @@ -386,10 +386,12 @@ u32 ISOFileSystem::OpenFile(std::string filename, FileAccess access, const char // May return entireISO for "umd0:" entry.file = GetFromPath(filename); if (!entry.file){ - entry.isBlockSectorMode = true; return 0; } + if (entry.file==&entireISO) + entry.isBlockSectorMode = true; + entry.seekPos = 0; u32 newHandle = hAlloc->GetNewHandle();