diff --git a/source/ngc/fileop.cpp b/source/ngc/fileop.cpp index f07f1f5..eec391c 100644 --- a/source/ngc/fileop.cpp +++ b/source/ngc/fileop.cpp @@ -442,13 +442,12 @@ LoadFile (char * rbuffer, char *filepath, u32 length, int method, bool silent) fstat(file->_file, &fileinfo); size = fileinfo.st_size; - memcpy (rbuffer, zipbuffer, 2048); // copy what we already read + memcpy (rbuffer, zipbuffer, readsize); // copy what we already read - ShowProgress ("Loading...", 2048, length); - - u32 offset = 2048; + u32 offset = readsize; while(offset < size) { + ShowProgress ("Loading...", offset, size); readsize = fread (rbuffer + offset, 1, (1024*512), file); // read in 512K chunks if(readsize <= 0 || readsize > (1024*512)) @@ -456,7 +455,6 @@ LoadFile (char * rbuffer, char *filepath, u32 length, int method, bool silent) if(readsize > 0) offset += readsize; - ShowProgress ("Loading...", offset, length); } if(offset != size) // # bytes read doesn't match # expected diff --git a/source/ngc/menudraw.cpp b/source/ngc/menudraw.cpp index 3ee73bd..d066b89 100644 --- a/source/ngc/menudraw.cpp +++ b/source/ngc/menudraw.cpp @@ -810,6 +810,8 @@ ShowProgress (const char *msg, int done, int total) return; else if(done > total) // this shouldn't happen done = total; + else if(total < (256*1024)) // don't bother showing progress for small files + return; int xpos, ypos; int i; diff --git a/source/ngc/video.cpp b/source/ngc/video.cpp index 1b814ce..4c68476 100644 --- a/source/ngc/video.cpp +++ b/source/ngc/video.cpp @@ -277,9 +277,8 @@ void InitialiseVideo () switch (vmode->viTVMode >> 2) { - case VI_PAL: // 576 lines (PAL 50Hz) - // force PAL60 - //vmode = &TVEurgb60Hz480IntDf; + case VI_PAL: + // 576 lines (PAL 50hz) break; case VI_NTSC: