mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-23 19:59:16 +01:00
-we should reload cache if game was deleted
This commit is contained in:
parent
f557b7241e
commit
935a18e217
@ -163,11 +163,7 @@ int CMenu::_GCgameInstaller(void *obj)
|
|||||||
|
|
||||||
char partition[6];
|
char partition[6];
|
||||||
sprintf(partition,"%s:/",DeviceName[currentPartition]);
|
sprintf(partition,"%s:/",DeviceName[currentPartition]);
|
||||||
struct statvfs stats;
|
|
||||||
memset(&stats, 0, sizeof(stats));
|
|
||||||
statvfs(partition , &stats);
|
|
||||||
|
|
||||||
u64 free = (u64)stats.f_frsize * (u64)stats.f_bfree;
|
|
||||||
u32 needed = 0;
|
u32 needed = 0;
|
||||||
|
|
||||||
ret = m_gcdump.CheckSpace(&needed, comp, CMenu::_Messenger, obj);
|
ret = m_gcdump.CheckSpace(&needed, comp, CMenu::_Messenger, obj);
|
||||||
@ -178,12 +174,10 @@ int CMenu::_GCgameInstaller(void *obj)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 blockfree = free/0x8000;
|
if (fsop_GetFreeSpaceKb(partition) <= needed)
|
||||||
|
|
||||||
if (blockfree <= needed)
|
|
||||||
{
|
{
|
||||||
LWP_MutexLock(m.m_mutex);
|
LWP_MutexLock(m.m_mutex);
|
||||||
m._setThrdMsg(wfmt(m._fmt("wbfsop10", L"Not enough space: %d blocks needed, %d available"), needed, blockfree), 0.f);
|
m._setThrdMsg(wfmt(m._fmt("wbfsop10", L"Not enough space: %d blocks needed, %d available"), needed, fsop_GetFreeSpaceKb(partition)), 0.f);
|
||||||
LWP_MutexUnlock(m.m_mutex);
|
LWP_MutexUnlock(m.m_mutex);
|
||||||
ret = -1;
|
ret = -1;
|
||||||
}
|
}
|
||||||
@ -367,9 +361,15 @@ bool CMenu::_wbfsOp(CMenu::WBFS_OP op)
|
|||||||
break;
|
break;
|
||||||
case CMenu::WO_REMOVE_GAME:
|
case CMenu::WO_REMOVE_GAME:
|
||||||
if(m_current_view == COVERFLOW_USB)
|
if(m_current_view == COVERFLOW_USB)
|
||||||
|
{
|
||||||
WBFS_RemoveGame((u8 *)m_cf.getId().c_str(), (char *) m_cf.getHdr()->path);
|
WBFS_RemoveGame((u8 *)m_cf.getId().c_str(), (char *) m_cf.getHdr()->path);
|
||||||
|
upd_usb = true;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
DML_RemoveGame(m_cf.getHdr()->path, DeviceName[currentPartition]);
|
DML_RemoveGame(m_cf.getHdr()->path, DeviceName[currentPartition]);
|
||||||
|
upd_dml = true;
|
||||||
|
}
|
||||||
if(m_cfg.getBool("GENERAL", "delete_cover_and_game", true))
|
if(m_cfg.getBool("GENERAL", "delete_cover_and_game", true))
|
||||||
RemoveCover((char *)m_cf.getId().c_str());
|
RemoveCover((char *)m_cf.getId().c_str());
|
||||||
m_btnMgr.show(m_wbfsPBar);
|
m_btnMgr.show(m_wbfsPBar);
|
||||||
|
Loading…
Reference in New Issue
Block a user