- sourceflow small_covers can now go in a subfolder with the same name as the theme. which makes them change when the theme is changed.

- added notification messages when you delete a cover or banner on manager cover banner menu.
- download cover menu changes: title is now 'Downloads'. removed 'missing' button and changed 'all' to 'download' because there was no difference between all and missing. it always downloads missing covers. in the future i plan to add custom banners download which will download all missing custom GC banners.
This commit is contained in:
Fledge68 2018-11-23 15:31:04 -06:00
parent 354bddc664
commit cef988d763
10 changed files with 544 additions and 604 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 MiB

After

Width:  |  Height:  |  Size: 3.4 MiB

View File

@ -153,11 +153,7 @@ void writeStub()
DCFlushRange((void*)0x80001800, StubSize); DCFlushRange((void*)0x80001800, StubSize);
/* And free the memory again */ /* And free the memory again */
#ifdef APP_WIIFLOW if(Stub != NULL)
if(Stub != wfstub_bin)
#else
if(Stub != stub_bin)
#endif
free(Stub); free(Stub);
} }

View File

@ -1609,7 +1609,7 @@ void CMenu::_mainLoopCommon(bool withCF, bool adjusting)
if(m_thrdWorking) if(m_thrdWorking)
{ {
musicPaused = true; musicPaused = true;
MusicPlayer.Pause(); MusicPlayer.Pause();//note - bg music is paused but sound thread is still running. so banner gamesound still plays
m_btnMgr.tick(); m_btnMgr.tick();
m_vid.prepare(); m_vid.prepare();
m_vid.setup2DProjection(false, true); m_vid.setup2DProjection(false, true);
@ -2174,22 +2174,10 @@ void CMenu::_initCF(void)
if(!CoverFlow.empty()) if(!CoverFlow.empty())
{ {
bool path = false; bool path = false;
if((m_source_cnt > 1 && m_cfg.getInt("MULTI", "current_item_type", 1) == TYPE_PLUGIN) || m_sourceflow || m_current_view == COVERFLOW_HOMEBREW) if(m_sourceflow || m_current_view == COVERFLOW_HOMEBREW ||
(m_source_cnt > 1 && m_cfg.getInt("MULTI", "current_item_type", TYPE_PLUGIN) == TYPE_PLUGIN) ||
(m_source_cnt == 1 && m_current_view == COVERFLOW_PLUGIN && m_cfg.getInt(PLUGIN_DOMAIN, "current_item_type", TYPE_PLUGIN) == TYPE_PLUGIN))
path = true; path = true;
if(m_current_view == COVERFLOW_PLUGIN && !m_sourceflow && m_source_cnt == 1)
{
switch(m_cfg.getInt(PLUGIN_DOMAIN, "current_item_type", TYPE_PLUGIN))
{
case TYPE_CHANNEL:
case TYPE_EMUCHANNEL:
case TYPE_GC_GAME:
case TYPE_WII_GAME:
path = false;
break;
default:
path = true;
}
}
if(!CoverFlow.findId(m_cfg.getString(_domainFromView(), "current_item").c_str(), true, path)) if(!CoverFlow.findId(m_cfg.getString(_domainFromView(), "current_item").c_str(), true, path))
CoverFlow.defaultLoad(); CoverFlow.defaultLoad();
CoverFlow.startCoverLoader(); CoverFlow.startCoverLoader();
@ -2710,9 +2698,14 @@ const char *CMenu::getFrontPath(const dir_discHdr *element)
const char *coverPath = fmt("%s/front_covers/%s", m_sourceDir.c_str(), coverImg); const char *coverPath = fmt("%s/front_covers/%s", m_sourceDir.c_str(), coverImg);
if(m_cfg.getBool(SOURCEFLOW_DOMAIN, "smallbox") || !fsop_FileExist(coverPath)) if(m_cfg.getBool(SOURCEFLOW_DOMAIN, "smallbox") || !fsop_FileExist(coverPath))
{ {
coverPath = fmt("%s/small_covers/%s", m_sourceDir.c_str(), coverImg); string themeName = m_cfg.getString("GENERAL", "theme", "default");
coverPath = fmt("%s/small_covers/%s/%s", m_sourceDir.c_str(), themeName.c_str(), coverImg);
if(!fsop_FileExist(coverPath)) if(!fsop_FileExist(coverPath))
return element->path; {
coverPath = fmt("%s/small_covers/%s", m_sourceDir.c_str(), coverImg);
if(!fsop_FileExist(coverPath))
return element->path;
}
} }
return coverPath; return coverPath;
} }

View File

@ -313,8 +313,8 @@ private:
s16 m_downloadPrioVal; s16 m_downloadPrioVal;
enum CoverPrio enum CoverPrio
{ {
C_TYPE_PRIOA = (1<<0), C_TYPE_PRIOA = (1<<0),//C_TYPE_ACUSTM
C_TYPE_PRIOB = (1<<1), C_TYPE_PRIOB = (1<<1),//C_TYPE_BCUSTM
C_TYPE_EN = (1<<2), C_TYPE_EN = (1<<2),
C_TYPE_JA = (1<<3), C_TYPE_JA = (1<<3),
C_TYPE_FR = (1<<4), C_TYPE_FR = (1<<4),
@ -327,8 +327,8 @@ private:
C_TYPE_KO = (1<<11), C_TYPE_KO = (1<<11),
C_TYPE_ZHCN = (1<<12), C_TYPE_ZHCN = (1<<12),
C_TYPE_AU = (1<<13), C_TYPE_AU = (1<<13),
C_TYPE_ONOR = (1<<14), C_TYPE_ONOR = (1<<14),//C_TYPE_ONCU
C_TYPE_ONCU = (1<<15), C_TYPE_ONCU = (1<<15),//C_TYPE_ANB
}; };
enum CoverType enum CoverType
@ -722,7 +722,6 @@ private:
volatile bool m_thrdNetwork; volatile bool m_thrdNetwork;
float m_thrdStep; float m_thrdStep;
float m_thrdStepLen; float m_thrdStepLen;
string m_coverDLGameId;
mutex_t m_mutex; mutex_t m_mutex;
wstringEx m_thrdMessage; wstringEx m_thrdMessage;
volatile float m_thrdProgress; volatile float m_thrdProgress;
@ -1152,7 +1151,7 @@ private:
// //
void _setThrdMsg(const wstringEx &msg, float progress); void _setThrdMsg(const wstringEx &msg, float progress);
void _setDumpMsg(const wstringEx &msg, float progress, float fileprog); void _setDumpMsg(const wstringEx &msg, float progress, float fileprog);
int _coverDownloader(bool missingOnly); int _coverDownloader();
void _downloadProgress(void *obj, int size, int position); void _downloadProgress(void *obj, int size, int position);
int _gametdbDownloaderAsync(); int _gametdbDownloaderAsync();

View File

@ -85,6 +85,7 @@ void CMenu::_CoverBanner(void)
{ {
_hideCoverBanner(); _hideCoverBanner();
RemoveCover(id); RemoveCover(id);
error(_t("deltcover", L"Cover is deleted."));
_showCoverBanner(); _showCoverBanner();
} }
else if(m_btnMgr.selected(m_coverbnrBtnDlBanner)) else if(m_btnMgr.selected(m_coverbnrBtnDlBanner))
@ -105,6 +106,7 @@ void CMenu::_CoverBanner(void)
fsop_deleteFile(fmt("%s/%s.bnr", m_customBnrDir.c_str(), id)); fsop_deleteFile(fmt("%s/%s.bnr", m_customBnrDir.c_str(), id));
fsop_deleteFile(fmt("%s/%.3s.bnr", m_bnrCacheDir.c_str(), id)); fsop_deleteFile(fmt("%s/%.3s.bnr", m_bnrCacheDir.c_str(), id));
fsop_deleteFile(fmt("%s/%.3s.bnr", m_customBnrDir.c_str(), id)); fsop_deleteFile(fmt("%s/%.3s.bnr", m_customBnrDir.c_str(), id));
error(_t("deltbanner", L"Banner is deleted."));
m_newGame = true; m_newGame = true;
_showCoverBanner(); _showCoverBanner();
} }

File diff suppressed because it is too large Load Diff

View File

@ -266,20 +266,7 @@ void CMenu::_setCurrentItem(const dir_discHdr *hdr)
const char *title = CoverFlow.getFilenameId(hdr, true);// with extension const char *title = CoverFlow.getFilenameId(hdr, true);// with extension
m_cfg.setString(_domainFromView(), "current_item", title); m_cfg.setString(_domainFromView(), "current_item", title);
if(m_current_view == COVERFLOW_PLUGIN && m_source_cnt == 1) if(m_current_view == COVERFLOW_PLUGIN && m_source_cnt == 1)
{
m_cfg.setInt(PLUGIN_DOMAIN, "current_item_type", hdr->type); m_cfg.setInt(PLUGIN_DOMAIN, "current_item_type", hdr->type);
switch(hdr->type)
{
case TYPE_CHANNEL:
case TYPE_EMUCHANNEL:
case TYPE_GC_GAME:
case TYPE_WII_GAME:
m_cfg.setBool(PLUGIN_DOMAIN, "current_item_id", true);
break;
default:
m_cfg.setBool(PLUGIN_DOMAIN, "current_item_id", false);
}
}
if(m_source_cnt > 1) if(m_source_cnt > 1)
m_cfg.setInt("MULTI", "current_item_type", hdr->type); m_cfg.setInt("MULTI", "current_item_type", hdr->type);
} }

View File

@ -434,6 +434,7 @@ int CMenu::main(void)
if(strcmp(prevTheme, m_cfg.getString("GENERAL", "theme").c_str()) != 0) if(strcmp(prevTheme, m_cfg.getString("GENERAL", "theme").c_str()) != 0)
{ {
/* new theme - exit wiiflow and reload */ /* new theme - exit wiiflow and reload */
fsop_deleteFolder(fmt("%s/sourceflow", m_cacheDir.c_str()));
m_reload = true; m_reload = true;
break; break;
} }

View File

@ -7,6 +7,7 @@
* to complete a request * to complete a request
*/ */
const struct block emptyblock = {0, NULL}; const struct block emptyblock = {0, NULL};
//The maximum amount of bytes to send per net_write() call //The maximum amount of bytes to send per net_write() call
//#define NET_BUFFER_SIZE 1024 //#define NET_BUFFER_SIZE 1024
#define NET_BUFFER_SIZE 3600 #define NET_BUFFER_SIZE 3600
@ -16,7 +17,8 @@ static u8 retryloop = 0;
// Write our message to the server // Write our message to the server
static s32 send_message(s32 server, char *msg) static s32 send_message(s32 server, char *msg)
{ {
s32 bytes_transferred = 0, remaining = strlen(msg); s32 bytes_transferred = 0;
s32 remaining = strlen(msg);
while (remaining) while (remaining)
{ {
if((bytes_transferred = net_write(server, msg, remaining > NET_BUFFER_SIZE ? NET_BUFFER_SIZE : remaining)) > 0) if((bytes_transferred = net_write(server, msg, remaining > NET_BUFFER_SIZE ? NET_BUFFER_SIZE : remaining)) > 0)
@ -142,7 +144,8 @@ struct block read_message(s32 connection)
} }
/* Downloads the contents of a URL to memory /* Downloads the contents of a URL to memory
* This method is not threadsafe (because networking is not threadsafe on the Wii) */ * This method is not threadsafe (because networking is not threadsafe on the Wii)
*/
struct block downloadfile(const char *url) struct block downloadfile(const char *url)
{ {
//Check if the url starts with "http://", if not it is not considered a valid url //Check if the url starts with "http://", if not it is not considered a valid url

View File

@ -233,6 +233,8 @@ cheat4=Download not found.
commodore=Commodore 64 commodore=Commodore 64
custom=Custom custom=Custom
def=Default def=Default
deltcover=Cover is deleted.
deltbanner=Banner is deleted.
disabled=Disabled disabled=Disabled
dl1=Cancel dl1=Cancel
dl10=Please donate\nto GameTDB.com dl10=Please donate\nto GameTDB.com
@ -253,7 +255,7 @@ dl24=Custom only
dl25=All dl25=All
dl3=All dl3=All
dl4=Missing dl4=Missing
dl5=Download dl5=Downloads
dl6=Download dl6=Download
dl8=Covers dl8=Covers
dlmsg1=Initializing network... dlmsg1=Initializing network...