- patched the revision number that somehow got out of sync. think it had something to do with getting r1076 from github.

- changed the way coverloader checks for a matching cover .wfc cache file. coverloader still acts strange sometimes or occasionally causes DSI exception.
This commit is contained in:
fledge68 2016-04-06 16:43:51 +00:00
parent a66723807e
commit d623770a49
3 changed files with 7 additions and 8 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 MiB

After

Width:  |  Height:  |  Size: 3.1 MiB

View File

@ -25,6 +25,7 @@ done
rev_old=$(cat ./source/svnrev.h 2>/dev/null | tr -d '\n' | sed 's/[^0-9]*\([0-9]*\).*/\1/') rev_old=$(cat ./source/svnrev.h 2>/dev/null | tr -d '\n' | sed 's/[^0-9]*\([0-9]*\).*/\1/')
rev_new=`expr $rev_new + 1`
if [ "$rev_new" != "$rev_old" ] || [ ! -f ./source/svnrev.h ]; then if [ "$rev_new" != "$rev_old" ] || [ ! -f ./source/svnrev.h ]; then
cat <<EOF > ./source/svnrev.h cat <<EOF > ./source/svnrev.h

View File

@ -2636,7 +2636,7 @@ bool CCoverFlow::_loadCoverTexPNG(u32 i, bool box, bool hq, bool blankBoxCover)
LWP_MutexUnlock(m_mutex); LWP_MutexUnlock(m_mutex);
// Save the texture to the cache folder for the next time // Save the texture to the cache folder for the next time
if (!m_cachePath.empty()) if(!m_cachePath.empty())
{ {
u32 bufSize = fixGX_GetTexBufferSize(tex.width, tex.height, tex.format, tex.maxLOD > 0 ? GX_TRUE : GX_FALSE, tex.maxLOD); u32 bufSize = fixGX_GetTexBufferSize(tex.width, tex.height, tex.format, tex.maxLOD > 0 ? GX_TRUE : GX_FALSE, tex.maxLOD);
uLongf zBufferSize = m_compressCache ? bufSize + bufSize / 100 + 12 : bufSize; uLongf zBufferSize = m_compressCache ? bufSize + bufSize / 100 + 12 : bufSize;
@ -2706,14 +2706,14 @@ bool CCoverFlow::_loadCoverTexPNG(u32 i, bool box, bool hq, bool blankBoxCover)
fwrite(&header, 1, sizeof header, file); fwrite(&header, 1, sizeof header, file);
fwrite(zBuffer, 1, zBufferSize, file); fwrite(zBuffer, 1, zBufferSize, file);
fclose(file); fclose(file);
if (m_deletePicsAfterCaching) if(m_deletePicsAfterCaching)
fsop_deleteFile(path); fsop_deleteFile(path);
} }
if(zBuffer != NULL && m_compressCache) if(zBuffer != NULL && m_compressCache)
MEM2_free(zBuffer); MEM2_free(zBuffer);
} }
} }
if (!hq) _dropHQLOD(i); if(!hq) _dropHQLOD(i);
return true; return true;
} }
@ -2778,7 +2778,7 @@ const char *CCoverFlow::getPathId(const dir_discHdr *curHdr)
CCoverFlow::CLRet CCoverFlow::_loadCoverTex(u32 i, bool box, bool hq, bool blankBoxCover) CCoverFlow::CLRet CCoverFlow::_loadCoverTex(u32 i, bool box, bool hq, bool blankBoxCover)
{ {
if (!m_loadingCovers) if(!m_loadingCovers)
return CL_ERROR; return CL_ERROR;
bool allocFailed = false; bool allocFailed = false;
@ -2831,10 +2831,8 @@ CCoverFlow::CLRet CCoverFlow::_loadCoverTex(u32 i, bool box, bool hq, bool blank
if(fileSize > sizeof(header)) if(fileSize > sizeof(header))
{ {
fread(&header, 1, sizeof(header), fp); fread(&header, 1, sizeof(header), fp);
//ok the cache file might be compressed when you don't want compress or it might be front when you want box //make sure wfc cache file matches what we want
//or it might be old format if(header.newFmt == 1 && (((header.full != 0) == box) && ((header.cmpr != 0) == m_compressTextures)))
// Try to find a matching cache file, otherwise try the PNG file, otherwise try again with the cache file with less constraints
if(header.newFmt != 0 && (((!box || header.full != 0) && (header.cmpr != 0) == m_compressTextures) || (!_loadCoverTexPNG(i, box, hq, blankBoxCover))))
{ {
TexData tex; TexData tex;
tex.format = header.cmpr != 0 ? GX_TF_CMPR : GX_TF_RGB565; tex.format = header.cmpr != 0 ? GX_TF_CMPR : GX_TF_RGB565;