mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2025-01-24 01:31:11 +01:00
-fixed scummvm covers (untested)
This commit is contained in:
parent
1a713f7b3e
commit
9f0a4d5a66
@ -2551,7 +2551,15 @@ bool CCoverFlow::_loadCoverTexPNG(u32 i, bool box, bool hq)
|
||||
SmartBuf zBuffer = m_compressCache ? smartMem2Alloc(zBufferSize) : tex.data;
|
||||
if (!!zBuffer && (!m_compressCache || compress(zBuffer.get(), &zBufferSize, tex.data.get(), bufSize) == Z_OK))
|
||||
{
|
||||
FILE *file = fopen(fmt("%s/%s.wfc", m_cachePath.c_str(), (m_items[i].hdr->hdr.gc_magic == EMU_MAGIC ? &m_items[i].hdr->path[string(m_items[i].hdr->path).find_last_of("/")] : (char*)m_items[i].hdr->hdr.id)), "wb");
|
||||
char gamePath[256];
|
||||
if(m_items[i].hdr->hdr.gc_magic == EMU_MAGIC)
|
||||
{
|
||||
if(string(m_items[i].hdr->path).find_last_of("/") != string::npos)
|
||||
strncpy(gamePath, &m_items[i].hdr->path[string(m_items[i].hdr->path).find_last_of("/")], sizeof(gamePath));
|
||||
else
|
||||
strncpy(gamePath, m_items[i].hdr->path, sizeof(gamePath));
|
||||
}
|
||||
FILE *file = fopen(fmt("%s/%s.wfc", m_cachePath.c_str(), (m_items[i].hdr->hdr.gc_magic == EMU_MAGIC ? gamePath : (char*)m_items[i].hdr->hdr.id)), "wb");
|
||||
if (file != 0)
|
||||
{
|
||||
SWFCHeader header(tex, box, m_compressCache);
|
||||
@ -2618,7 +2626,15 @@ CCoverFlow::CLRet CCoverFlow::_loadCoverTex(u32 i, bool box, bool hq)
|
||||
// Try to find the texture in the cache
|
||||
if (!m_cachePath.empty())
|
||||
{
|
||||
FILE *file = fopen(fmt("%s/%s.wfc", m_cachePath.c_str(), (m_items[i].hdr->hdr.gc_magic == EMU_MAGIC ? &m_items[i].hdr->path[string(m_items[i].hdr->path).find_last_of("/")] : (char*)m_items[i].hdr->hdr.id)), "rb");
|
||||
char gamePath[256];
|
||||
if(m_items[i].hdr->hdr.gc_magic == EMU_MAGIC)
|
||||
{
|
||||
if(string(m_items[i].hdr->path).find_last_of("/") != string::npos)
|
||||
strncpy(gamePath, &m_items[i].hdr->path[string(m_items[i].hdr->path).find_last_of("/")], sizeof(gamePath));
|
||||
else
|
||||
strncpy(gamePath, m_items[i].hdr->path, sizeof(gamePath));
|
||||
}
|
||||
FILE *file = fopen(fmt("%s/%s.wfc", m_cachePath.c_str(), (m_items[i].hdr->hdr.gc_magic == EMU_MAGIC ? gamePath : (char*)m_items[i].hdr->hdr.id)), "rb");
|
||||
if (file != 0)
|
||||
{
|
||||
bool success = false;
|
||||
|
@ -1648,7 +1648,8 @@ void CMenu::_initCF(void)
|
||||
if (m_current_view == COVERFLOW_EMU)
|
||||
{
|
||||
string tempname(m_gameList[i].path);
|
||||
tempname.assign(&tempname[tempname.find_last_of('/') + 1]);
|
||||
if(tempname.find_last_of("/") != string::npos)
|
||||
tempname.assign(&tempname[tempname.find_last_of("/") + 1]);
|
||||
string coverFolder(m_plugin.GetCoverFolderName(m_gameList[i].hdr.magic));
|
||||
//if(tempname.find_last_of('.') != string::npos)
|
||||
// tempname.erase(tempname.find_last_of('.'), tempname.size() - tempname.find_last_of('.'));
|
||||
|
Loading…
x
Reference in New Issue
Block a user