mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-23 19:59:16 +01:00
-deleting boot.dol backup file if wiiflow update was
successful
This commit is contained in:
parent
02c58ebe04
commit
d9c9273e90
@ -1525,7 +1525,6 @@ void CMenu::_initDownloadMenu(CMenu::SThemeData &theme)
|
||||
m_downloadLblMessage[0] = _addLabel(theme, "DOWNLOAD/MESSAGE1", theme.lblFont, L"", 40, 228, 560, 100, theme.txtFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_TOP);
|
||||
m_downloadLblMessage[1] = _addLabel(theme, "DOWNLOAD/MESSAGE2", theme.lblFont, L"", 40, 228, 560, 100, theme.txtFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_TOP);
|
||||
|
||||
|
||||
// Cover settings
|
||||
m_downloadLblSetTitle = _addTitle(theme, "DOWNLOAD/SETTITLE", theme.titleFont, L"", 20, 30, 600, 60, theme.titleFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE);
|
||||
m_downloadLblCoverPrio = _addLabel(theme, "DOWNLOAD/COVERPRIO", theme.lblFont, L"", 40, 100, 290, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
@ -1560,7 +1559,6 @@ void CMenu::_initDownloadMenu(CMenu::SThemeData &theme)
|
||||
m_downloadBtnBack = _addButton(theme, "DOWNLOAD/BACK_BTN", theme.btnFont, L"", 420, 410, 200, 56, theme.btnFontColor);
|
||||
|
||||
|
||||
|
||||
// Download menu
|
||||
_setHideAnim(m_downloadLblTitle, "DOWNLOAD/TITLE", 0, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_downloadPBar, "DOWNLOAD/PROGRESS_BAR", 0, 0, -2.f, 0.f);
|
||||
@ -1574,7 +1572,6 @@ void CMenu::_initDownloadMenu(CMenu::SThemeData &theme)
|
||||
_setHideAnim(m_downloadBtnGameTDBDownload, "DOWNLOAD/GAMETDB_DOWNLOAD_BTN", 0, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_downloadLblGameTDB, "DOWNLOAD/GAMETDB", 0, 0, -2.f, 0.f);
|
||||
|
||||
|
||||
// Cover settings
|
||||
_setHideAnim(m_downloadLblSetTitle, "DOWNLOAD/SETTITLE", 0, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_downloadLblCoverPrio, "DOWNLOAD/COVERPRIO", 0, 0, -2.f, 0.f);
|
||||
@ -1606,7 +1603,6 @@ void CMenu::_initDownloadMenu(CMenu::SThemeData &theme)
|
||||
_setHideAnim(m_downloadBtnAUs, "DOWNLOAD/AUS", 0, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_downloadBtnBack, "DOWNLOAD/BACK_BTN", 0, 0, -2.f, 0.f);
|
||||
|
||||
|
||||
m_downloadPrioVal = m_cfg.getUInt("GENERAL", "cover_prio", 0);
|
||||
|
||||
_hideDownload(true);
|
||||
@ -1765,10 +1761,10 @@ s8 CMenu::_versionDownloader() // code to download new version
|
||||
if (m_data_update_size == 0) m_data_update_size = 0x400000;
|
||||
|
||||
// check for existing dol
|
||||
ifstream filestr;
|
||||
ifstream filestr;
|
||||
gprintf("DOL Path: %s\n", m_dol.c_str());
|
||||
filestr.open(m_dol.c_str());
|
||||
if (filestr.fail())
|
||||
filestr.open(m_dol.c_str());
|
||||
if (filestr.fail())
|
||||
{
|
||||
filestr.close();
|
||||
rename(dol_backup, m_dol.c_str());
|
||||
@ -1784,7 +1780,7 @@ s8 CMenu::_versionDownloader() // code to download new version
|
||||
m_thrdWorking = false;
|
||||
return 0;
|
||||
}
|
||||
filestr.close();
|
||||
filestr.close();
|
||||
|
||||
u32 bufferSize = max(m_app_update_size, m_data_update_size); // Buffer for size of the biggest file.
|
||||
SmartBuf buffer = smartAnyAlloc(bufferSize);
|
||||
@ -1906,7 +1902,6 @@ s8 CMenu::_versionDownloader() // code to download new version
|
||||
LWP_MutexUnlock(m_mutex);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
goto fail;
|
||||
@ -1916,15 +1911,17 @@ success:
|
||||
_setThrdMsg(_t("dlmsg21", L"WiiFlow will now exit to allow the update to take effect."), 1.f);
|
||||
LWP_MutexUnlock(m_mutex);
|
||||
|
||||
filestr.open(m_dol.c_str());
|
||||
if (filestr.fail())
|
||||
filestr.open(m_dol.c_str());
|
||||
if (filestr.fail())
|
||||
{
|
||||
LWP_MutexLock(m_mutex);
|
||||
_setThrdMsg(_t("dlmsg25", L"Extraction must have failed! Renaming the backup to boot.dol"), 1.f);
|
||||
LWP_MutexUnlock(m_mutex);
|
||||
rename(dol_backup, m_dol.c_str());
|
||||
}
|
||||
filestr.close();
|
||||
else
|
||||
remove(dol_backup);
|
||||
filestr.close();
|
||||
|
||||
m_exit = true;
|
||||
goto out;
|
||||
|
Loading…
Reference in New Issue
Block a user