UIQ3 bugfixes, SVP drc indirect jumps, stuff

git-svn-id: file:///home/notaz/opt/svn/PicoDrive@572 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
notaz 2008-08-24 09:33:12 +00:00
parent 02ba8788a0
commit f8af96349e
29 changed files with 193 additions and 157 deletions

View file

@ -137,8 +137,10 @@ zip_failed:
if (f == NULL)
goto cso_failed;
#ifndef __EPOC32__
/* we use our own buffering */
setvbuf(f, NULL, _IONBF, 0);
#endif
cso = malloc(sizeof(*cso));
if (cso == NULL)
@ -192,9 +194,6 @@ cso_failed:
f = fopen(path, "rb");
if (f == NULL) return NULL;
/* we use our own buffering */
setvbuf(f, NULL, _IONBF, 0);
file = malloc(sizeof(*file));
if (file == NULL) {
fclose(f);
@ -207,6 +206,12 @@ cso_failed:
file->type = PMT_UNCOMPRESSED;
fseek(f, 0, SEEK_SET);
#ifndef __EPOC32__ // makes things worse on Symbian
if (file->size > 0x400000)
/* we use our own buffering */
setvbuf(f, NULL, _IONBF, 0);
#endif
return file;
}
@ -445,7 +450,7 @@ int PicoCartLoad(pm_file *f,unsigned char **prom,unsigned int *psize)
rom=PicoCartAlloc(size);
if (rom==NULL) {
elprintf(EL_STATUS, "out of memory (wanted %i)", size);
return 1;
return 2;
}
if (PicoCartLoadProgressCB != NULL)
@ -470,7 +475,7 @@ int PicoCartLoad(pm_file *f,unsigned char **prom,unsigned int *psize)
if (bytes_read <= 0) {
elprintf(EL_STATUS, "read failed");
free(rom);
return 1;
return 3;
}
// maybe we are loading MegaCD BIOS?