- fixed progress bar for cache covers.

This commit is contained in:
Fledge68 2018-11-27 18:08:23 -06:00
parent 39308a921e
commit bfdde07fc1
5 changed files with 8 additions and 4 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 MiB

After

Width:  |  Height:  |  Size: 3.3 MiB

View File

@ -1117,7 +1117,7 @@ public:
/* general thread updating stuff */ /* general thread updating stuff */
u64 m_thrdTotal; u64 m_thrdTotal;
void update_pThread(u64 added); void update_pThread(u64 amount, bool add = true);
private: private:
void _cleanupBanner(bool gamechange = false); void _cleanupBanner(bool gamechange = false);
void _cleanupVideo(); void _cleanupVideo();

View File

@ -1824,6 +1824,7 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd, bool disc_cfg)
u32 returnTo = 0; u32 returnTo = 0;
const char *rtrn = m_cfg.getString("GENERAL", "returnto").c_str(); const char *rtrn = m_cfg.getString("GENERAL", "returnto").c_str();
/* this if is done in case "returnto" is set to disabled in which case rtrn would point to nothing */
if(strlen(rtrn) == 4) if(strlen(rtrn) == 4)
returnTo = rtrn[0] << 24 | rtrn[1] << 16 | rtrn[2] << 8 | rtrn[3]; returnTo = rtrn[0] << 24 | rtrn[1] << 16 | rtrn[2] << 8 | rtrn[3];

View File

@ -426,7 +426,7 @@ int CMenu::_cacheCovers()
for(vector<dir_discHdr>::iterator hdr = m_gameList.begin(); hdr != m_gameList.end(); ++hdr) for(vector<dir_discHdr>::iterator hdr = m_gameList.begin(); hdr != m_gameList.end(); ++hdr)
{ {
index++; index++;
update_pThread(1); update_pThread(index, false);
m_thrdMessage = wfmt(_fmt("dlmsg31", L"converting cover %i of %i"), index, total); m_thrdMessage = wfmt(_fmt("dlmsg31", L"converting cover %i of %i"), index, total);
m_thrdMessageAdded = true; m_thrdMessageAdded = true;

View File

@ -402,12 +402,15 @@ void CMenu::_stop_pThread(void)
m_btnMgr.setText(m_wbfsLblMessage, L"100%"); m_btnMgr.setText(m_wbfsLblMessage, L"100%");
} }
void CMenu::update_pThread(u64 added) void CMenu::update_pThread(u64 amount, bool add)
{ {
if(m_thrdDone) if(m_thrdDone)
{ {
m_thrdDone = false; m_thrdDone = false;
m_thrdWritten += added; if(add)
m_thrdWritten += amount;
else
m_thrdWritten = amount;
m_thrdUpdated = true; m_thrdUpdated = true;
} }
} }