diff options
author | Robert Göffringmann | 2008-03-03 00:41:59 +0000 |
---|---|---|
committer | Robert Göffringmann | 2008-03-03 00:41:59 +0000 |
commit | 3b27b9fa438611c3a05fcf2d07a3dfde6be192fa (patch) | |
tree | 8605c47d67b779fb33ce4dda3a64a7d3caecdb4d /backends/platform/ps2/iop | |
parent | fc91de07dfdfe6bd29edadf739f324f30f5624d0 (diff) | |
download | scummvm-rg350-3b27b9fa438611c3a05fcf2d07a3dfde6be192fa.tar.gz scummvm-rg350-3b27b9fa438611c3a05fcf2d07a3dfde6be192fa.tar.bz2 scummvm-rg350-3b27b9fa438611c3a05fcf2d07a3dfde6be192fa.zip |
the ps2 changes from the 0.11.1 release, plus some bugfixes and cleanup.
svn-id: r31034
Diffstat (limited to 'backends/platform/ps2/iop')
-rw-r--r-- | backends/platform/ps2/iop/CoDyVDfs/iop/codyvdfs.c | 4 | ||||
-rw-r--r-- | backends/platform/ps2/iop/CoDyVDfs/iop/fiofs.c | 11 | ||||
-rw-r--r-- | backends/platform/ps2/iop/CoDyVDfs/iop/imports.lst | 10 | ||||
-rw-r--r-- | backends/platform/ps2/iop/CoDyVDfs/iop/rpcfs.c | 2 |
4 files changed, 15 insertions, 12 deletions
diff --git a/backends/platform/ps2/iop/CoDyVDfs/iop/codyvdfs.c b/backends/platform/ps2/iop/CoDyVDfs/iop/codyvdfs.c index b423b44a1d..e5eb76fdc8 100644 --- a/backends/platform/ps2/iop/CoDyVDfs/iop/codyvdfs.c +++ b/backends/platform/ps2/iop/CoDyVDfs/iop/codyvdfs.c @@ -76,7 +76,7 @@ int cacheEnterDir(ISODirectoryRecord *dir) { cacheName = cachedDir + strlen(cachedDir); memcpy(cacheName, dir->name, dir->len_fi); cacheName[dir->len_fi] = '/'; - cacheName[dir->len_fi + 1] = '\0'; + cacheName[dir->len_fi + 1] = '\0'; return cdReadSectors(cachedDirLba, 1, cacheBuf, &rmode); } @@ -144,7 +144,7 @@ ISODirectoryRecord *findPath(const char *path) { initRootCache(); return (ISODirectoryRecord *)cacheBuf; } - + do { tok = strchr(path, '/'); if (tok) diff --git a/backends/platform/ps2/iop/CoDyVDfs/iop/fiofs.c b/backends/platform/ps2/iop/CoDyVDfs/iop/fiofs.c index 592f9ca61f..f4d512a6e4 100644 --- a/backends/platform/ps2/iop/CoDyVDfs/iop/fiofs.c +++ b/backends/platform/ps2/iop/CoDyVDfs/iop/fiofs.c @@ -86,9 +86,12 @@ int cd_open(iop_file_t *handle, const char *name, int mode) { return -EIO; rec = findPath(name); - if (!rec || IS_DIR(rec)) + if (!rec) return -ENOENT; + if (IS_DIR(rec)) + return -EISDIR; + fdSlot = allocFioHandle(); if (fdSlot < 0) return -ENFILE; @@ -159,7 +162,7 @@ int cd_read(iop_file_t *handle, void *dest, int length) { doCopy = 0x800 - readPos; if (doCopy > bytesLeft) doCopy = bytesLeft; - + memcpy(destPos, fd->buf + readPos, doCopy); readPos += doCopy; readLba += readPos >> 11; @@ -177,7 +180,7 @@ int cd_read(iop_file_t *handle, void *dest, int length) { bytesLeft &= 0x7FF; } } - return destPos - (uint8*)dest; + return destPos - (uint8*)dest; } int cd_close(iop_file_t *handle) { @@ -201,7 +204,7 @@ int cd_dopen(iop_file_t *handle, const char *path) { return -ENOENT; fdSlot = allocDioHandle(); - + if (fdSlot < 0) return -ENFILE; diff --git a/backends/platform/ps2/iop/CoDyVDfs/iop/imports.lst b/backends/platform/ps2/iop/CoDyVDfs/iop/imports.lst index eb85e04462..d3ed3b0442 100644 --- a/backends/platform/ps2/iop/CoDyVDfs/iop/imports.lst +++ b/backends/platform/ps2/iop/CoDyVDfs/iop/imports.lst @@ -24,10 +24,10 @@ I_DelDrv iomanX_IMPORTS_end sifcmd_IMPORTS_start -I_sceSifInitRpc -I_sceSifSetRpcQueue -I_sceSifRegisterRpc -I_sceSifRpcLoop +I_sceSifInitRpc +I_sceSifSetRpcQueue +I_sceSifRegisterRpc +I_sceSifRpcLoop sifcmd_IMPORTS_end stdio_IMPORTS_start @@ -59,7 +59,7 @@ thbase_IMPORTS_start I_CreateThread I_StartThread I_GetThreadId -I_DelayThread +I_DelayThread thbase_IMPORTS_end diff --git a/backends/platform/ps2/iop/CoDyVDfs/iop/rpcfs.c b/backends/platform/ps2/iop/CoDyVDfs/iop/rpcfs.c index a9bfd636c7..c46d452d2c 100644 --- a/backends/platform/ps2/iop/CoDyVDfs/iop/rpcfs.c +++ b/backends/platform/ps2/iop/CoDyVDfs/iop/rpcfs.c @@ -48,7 +48,7 @@ int initRpc(void) { thread.attr = 0; tid = CreateThread(&thread); - if (tid >= 0) + if (tid >= 0) StartThread(tid, 0); else { printf("Unable to start RPC Thread!\n"); |