- upped to beta 14

- fixed download cheat file messages.
dlmsg35=Downloaded cheat file has no cheats!
dlmsg36=No cheat file available to download.
- also noted that holding 1/x and pressing 2/y will delete the current cheat files so you can re download if there's a need to.
This commit is contained in:
Fledge68 2019-11-04 11:29:12 -06:00
parent b2635620ce
commit c80b3a3277
5 changed files with 22 additions and 30 deletions

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 MiB

After

Width:  |  Height:  |  Size: 3.6 MiB

View File

@ -6,7 +6,7 @@
#else #else
#define APP_NAME "WiiFlow Lite" #define APP_NAME "WiiFlow Lite"
#endif #endif
#define APP_VERSION "5.3.0 beta 12" #define APP_VERSION "5.3.0 beta 14"
#define APP_DATA_DIR "wiiflow" #define APP_DATA_DIR "wiiflow"
#ifdef APP_WIIFLOW #ifdef APP_WIIFLOW

View File

@ -9,6 +9,7 @@
#define CHEATSPERPAGE 4 #define CHEATSPERPAGE 4
u8 m_cheatSettingsPage = 0; u8 m_cheatSettingsPage = 0;
int txtavailable;
int CMenu::_downloadCheatFileAsync() int CMenu::_downloadCheatFileAsync()
{ {
@ -50,15 +51,10 @@ void CMenu::_CheatSettings()
const char *id = CoverFlow.getId(); const char *id = CoverFlow.getId();
m_cheatSettingsPage = 1; m_cheatSettingsPage = 1;
int txtavailable = m_cheatfile.openTxtfile(fmt("%s/%s.txt", m_txtCheatDir.c_str(), id)); txtavailable = m_cheatfile.openTxtfile(fmt("%s/%s.txt", m_txtCheatDir.c_str(), id));
_showCheatSettings();
_textCheatSettings(); _textCheatSettings();
_showCheatSettings();
if (txtavailable)
m_btnMgr.setText(m_cheatLblTitle, m_cheatfile.getGameName());
else
m_btnMgr.setText(m_cheatLblTitle, L"");
while(!m_exit) while(!m_exit)
{ {
@ -89,7 +85,7 @@ void CMenu::_CheatSettings()
if(BTN_RIGHT_PRESSED || BTN_PLUS_PRESSED) m_btnMgr.click(m_cheatBtnPageP); if(BTN_RIGHT_PRESSED || BTN_PLUS_PRESSED) m_btnMgr.click(m_cheatBtnPageP);
_showCheatSettings(); _showCheatSettings();
} }
else if ((WBTN_2_HELD && WBTN_1_PRESSED) || (WBTN_1_HELD && WBTN_2_PRESSED)) else if ((WBTN_2_HELD && WBTN_1_PRESSED) || (WBTN_1_HELD && WBTN_2_PRESSED))// pressing 1 and 2 deletes everything so cheats can be downloaded again.
{ {
fsop_deleteFile(fmt("%s/%s.gct", m_cheatDir.c_str(), id)); fsop_deleteFile(fmt("%s/%s.gct", m_cheatDir.c_str(), id));
fsop_deleteFile(fmt("%s/%s.txt", m_txtCheatDir.c_str(), id)); fsop_deleteFile(fmt("%s/%s.txt", m_txtCheatDir.c_str(), id));
@ -170,7 +166,7 @@ void CMenu::_CheatSettings()
else if(ret == -3) else if(ret == -3)
m_btnMgr.setText(m_wbfsLblDialog, _t("dlmsg12", L"Download failed!")); m_btnMgr.setText(m_wbfsLblDialog, _t("dlmsg12", L"Download failed!"));
else if(ret == -4) else if(ret == -4)
m_btnMgr.setText(m_wbfsLblDialog, _t("dlmsg35", L"No cheats available.")); m_btnMgr.setText(m_wbfsLblDialog, _t("dlmsg36", L"No cheat file available to download."));
else else
m_btnMgr.setText(m_wbfsLblDialog, _t("dlmsg14", L"Done.")); m_btnMgr.setText(m_wbfsLblDialog, _t("dlmsg14", L"Done."));
dl_finished = true; dl_finished = true;
@ -178,20 +174,6 @@ void CMenu::_CheatSettings()
} }
txtavailable = m_cheatfile.openTxtfile(fmt("%s/%s.txt", m_txtCheatDir.c_str(), id)); txtavailable = m_cheatfile.openTxtfile(fmt("%s/%s.txt", m_txtCheatDir.c_str(), id));
_showCheatSettings(); _showCheatSettings();
if(txtavailable)
m_btnMgr.setText(m_cheatLblTitle, m_cheatfile.getGameName());
else
m_btnMgr.setText(m_cheatLblTitle, L"");
if (m_cheatfile.getCnt() == 0)
{
// cheat code not found, show result
//char type = id[0] == 'S' ? 'R' : id[0];
m_btnMgr.setText(m_cheatLblItem[0], _t("cheat4", L"Download not found."));
m_btnMgr.setText(m_cheatLblItem[1], sfmt(GECKOURL, id));
m_btnMgr.show(m_cheatLblItem[1]);
}
} }
} }
} }
@ -221,9 +203,14 @@ void CMenu::_hideCheatSettings(bool instant)
void CMenu::_showCheatSettings(void) void CMenu::_showCheatSettings(void)
{ {
if(txtavailable && m_cheatfile.getCnt() > 0)
m_btnMgr.setText(m_cheatLblTitle, m_cheatfile.getGameName());
else
m_btnMgr.setText(m_cheatLblTitle, L"");
_setBg(m_cheatBg, m_cheatBg); _setBg(m_cheatBg, m_cheatBg);
m_btnMgr.show(m_cheatBtnBack);
m_btnMgr.show(m_cheatLblTitle); m_btnMgr.show(m_cheatLblTitle);
m_btnMgr.show(m_cheatBtnBack);
for(u8 i = 0; i < ARRAY_SIZE(m_cheatLblUser); ++i) for(u8 i = 0; i < ARRAY_SIZE(m_cheatLblUser); ++i)
if(m_cheatLblUser[i] != -1) if(m_cheatLblUser[i] != -1)
@ -260,13 +247,17 @@ void CMenu::_showCheatSettings(void)
} }
} }
} }
else else if(!txtavailable)
{ {
// no cheat found, allow downloading // no cheat found, allow downloading
m_btnMgr.show(m_cheatBtnDownload); m_btnMgr.show(m_cheatBtnDownload);
m_btnMgr.setText(m_cheatLblItem[0], _t("cheat3", L"Cheat file for game not found.")); m_btnMgr.setText(m_cheatLblItem[0], _t("cheat3", L"Cheat file for game not found."));
m_btnMgr.show(m_cheatLblItem[0]); m_btnMgr.show(m_cheatLblItem[0]);
}
else
{
m_btnMgr.setText(m_cheatLblItem[0], _t("dlmsg35", L"Downloaded cheat file has no cheats!"));
m_btnMgr.show(m_cheatLblItem[0]);
} }
} }

View File

@ -302,7 +302,8 @@ dlmsg31=converting cover %i of %i
dlmsg32=Downloading banner %i/%i dlmsg32=Downloading banner %i/%i
dlmsg33=No banners missing. dlmsg33=No banners missing.
dlmsg34=Banner URL not set properly! dlmsg34=Banner URL not set properly!
dlmsg35=No cheats available. dlmsg35=Downloaded cheat file has no cheats!
dlmsg36=No cheat file available to download.
dlmsg4=Saving %s dlmsg4=Saving %s
dlmsg5=%i/%i files downloaded dlmsg5=%i/%i files downloaded
dlmsg6=Canceling... dlmsg6=Canceling...