mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2025-02-17 12:36:20 +01:00
-fixed cache not reloading after copying gamecube game
from usb to sd
This commit is contained in:
parent
9a19de1545
commit
9607e68ef2
@ -147,14 +147,14 @@ int CMenu::_GCgameInstaller(void *obj)
|
|||||||
{
|
{
|
||||||
CMenu &m = *(CMenu *)obj;
|
CMenu &m = *(CMenu *)obj;
|
||||||
GCDump m_gcdump;
|
GCDump m_gcdump;
|
||||||
|
|
||||||
bool skip = m.m_cfg.getBool("DML", "skip_on_error", false);
|
bool skip = m.m_cfg.getBool("DML", "skip_on_error", false);
|
||||||
bool comp = m.m_cfg.getBool("DML", "compressed_dump", true);
|
bool comp = m.m_cfg.getBool("DML", "compressed_dump", true);
|
||||||
bool wexf = m.m_cfg.getBool("DML", "write_ex_files", true);
|
bool wexf = m.m_cfg.getBool("DML", "write_ex_files", true);
|
||||||
bool alig = m.m_cfg.getBool("DML", "force_32k_align_files", false);
|
bool alig = m.m_cfg.getBool("DML", "force_32k_align_files", false);
|
||||||
u32 nretry = m.m_cfg.getUInt("DML", "num_retries", 5);
|
u32 nretry = m.m_cfg.getUInt("DML", "num_retries", 5);
|
||||||
u32 rsize = 1048576; //1MB
|
u32 rsize = 1048576; //1MB
|
||||||
|
|
||||||
if(skip)
|
if(skip)
|
||||||
rsize = 8192; // Use small chunks when skip on error is enabled
|
rsize = 8192; // Use small chunks when skip on error is enabled
|
||||||
|
|
||||||
@ -181,7 +181,7 @@ int CMenu::_GCgameInstaller(void *obj)
|
|||||||
m.m_thrdWorking = false;
|
m.m_thrdWorking = false;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(m_gcdump.GetFreeSpace(partition, BL) <= needed)
|
if(m_gcdump.GetFreeSpace(partition, BL) <= needed)
|
||||||
{
|
{
|
||||||
gprintf("Free space available: %d Mb (%d blocks)\n", m_gcdump.GetFreeSpace(partition, MB), m_gcdump.GetFreeSpace(partition, BL));
|
gprintf("Free space available: %d Mb (%d blocks)\n", m_gcdump.GetFreeSpace(partition, MB), m_gcdump.GetFreeSpace(partition, BL));
|
||||||
@ -196,7 +196,7 @@ int CMenu::_GCgameInstaller(void *obj)
|
|||||||
LWP_MutexLock(m.m_mutex);
|
LWP_MutexLock(m.m_mutex);
|
||||||
m._setThrdMsg(L"", 0);
|
m._setThrdMsg(L"", 0);
|
||||||
LWP_MutexUnlock(m.m_mutex);
|
LWP_MutexUnlock(m.m_mutex);
|
||||||
|
|
||||||
ret = m_gcdump.DumpGame();
|
ret = m_gcdump.DumpGame();
|
||||||
LWP_MutexLock(m.m_mutex);
|
LWP_MutexLock(m.m_mutex);
|
||||||
if(ret == 0)
|
if(ret == 0)
|
||||||
@ -429,7 +429,7 @@ bool CMenu::_wbfsOp(CMenu::WBFS_OP op)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
|
||||||
if (m_thrdMessageAdded)
|
if (m_thrdMessageAdded)
|
||||||
{
|
{
|
||||||
LockMutex lock(m_mutex);
|
LockMutex lock(m_mutex);
|
||||||
@ -446,16 +446,26 @@ bool CMenu::_wbfsOp(CMenu::WBFS_OP op)
|
|||||||
if (done && (op == CMenu::WO_REMOVE_GAME || op == CMenu::WO_ADD_GAME))
|
if (done && (op == CMenu::WO_REMOVE_GAME || op == CMenu::WO_ADD_GAME))
|
||||||
{
|
{
|
||||||
m_gameList.SetLanguage(m_loc.getString(m_curLanguage, "gametdb_code", "EN").c_str());
|
m_gameList.SetLanguage(m_loc.getString(m_curLanguage, "gametdb_code", "EN").c_str());
|
||||||
if( upd_dml )
|
if(upd_dml)
|
||||||
UpdateCache(COVERFLOW_DML);
|
UpdateCache(COVERFLOW_DML);
|
||||||
|
|
||||||
if( upd_usb )
|
if(upd_usb)
|
||||||
UpdateCache(COVERFLOW_USB);
|
UpdateCache(COVERFLOW_USB);
|
||||||
|
|
||||||
_loadList();
|
_loadList();
|
||||||
_initCF();
|
_initCF();
|
||||||
m_cf.findId(cfPos.c_str(), true);
|
m_cf.findId(cfPos.c_str(), true);
|
||||||
}
|
}
|
||||||
|
else if(done && op == CMenu::WO_COPY_GAME)
|
||||||
|
{
|
||||||
|
m_gameList.SetLanguage(m_loc.getString(m_curLanguage, "gametdb_code", "EN").c_str());
|
||||||
|
if(upd_dml)
|
||||||
|
{
|
||||||
|
UpdateCache(COVERFLOW_DML);
|
||||||
|
currentPartition = SD;
|
||||||
|
UpdateCache(COVERFLOW_DML);
|
||||||
|
}
|
||||||
|
}
|
||||||
return done;
|
return done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user