Skip to content

Commit

Permalink
- replaced homebrew button on main screen with categories button. new…
Browse files Browse the repository at this point in the history
… images thanks to Hakaisha. no more 'B' on favorites star.

- replaced adult only button on game selected screen with categories button.
- homebrew button is now restored as one of the quick launch buttons or accessible via source menu or plugin select menu.cpp
- adult only option now replaces the categories option of the game settings menu page 1 line 1.
- locking wiiflow no longer blocks homebrew access. you must use the adult only option for each homebrew app to block kids from accessing it.
- other minor code changes and fixes.
  • Loading branch information
Fledge68 committed Mar 4, 2019
1 parent 6cb6c64 commit 5dc8212
Show file tree
Hide file tree
Showing 16 changed files with 338 additions and 318 deletions.
10 changes: 5 additions & 5 deletions data/help/english.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ Controls:
-- B+A = Launch game immediately
-- B+Left / B+Right = Change Song
-- B+UP / B+DOWN = Previous / next game in sorted list (alpha default)
-- B+Minus = Boot a random game of the current coverflow
-- B+Minus = Boot or select a random game of the current coverflow
-- B+Plus = Select sort type (alpha, wifi, players, playcount, etc...)
-- Z / ZR = Take Screenshot

-- A on Onscreen Arrows = Fast skip through games
-- B on Onscreen Arrows = previous / next game in sorted list (alpha default)
-- A on Star Icon = Favorites
-- B on Star Icon = Categories
-- A on Gear Icon = WiiFlow settings
-- A on Categories Icon = Select categories to use
-- A on Gear Icon = Main settings menu
-- A on USB(Wii), GC, Channels, Plugin, or Homebrew Icon = Switch to that source
-- A on Home Icon = Open Home Menu / Exit WiiFlow
-- A on Disc Icon (Game Disc in Drive) = Launch game disc
Expand All @@ -29,7 +29,7 @@ Controls:
-- A on box = Flip Cover
-- A out of screen = Launch game
-- A on Star Icon = Toggle Favorite (Yellow = Favorite)
-- B on Star Icon = Set Categories for game
-- A on Categories Icon = Set Categories for current game
-- A on Hand Icon = Parental Lock (Red = locked)
-- A on Gear Icon = Game Settings
-- A on X Icon = Delete Game
Expand All @@ -47,7 +47,7 @@ Controls:
-- Plus = Zoom in
-- Minus = Zoom out

- Settings menus:
- All Settings menus:
-- Minus / Plus = Previous / next page
-- Left / Right = Previous / next page
-- Up / Down = Previous / next button
Expand Down
Binary file modified out/boot.dol
Binary file not shown.
Binary file added out/imgs/btncat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added out/imgs/btncats.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 26 additions & 5 deletions source/gui/coverflow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1637,7 +1637,7 @@ bool CCoverFlow::_setCurPosToID(const char *id, bool instant, bool path)
{
//homebrew folder or rom title.ext
const char *name = strrchr(m_items[i].hdr->path, '/');
if(name != NULL && strcmp(name + 1, id) == 0)
if(name != NULL && strcasecmp(name + 1, id) == 0)
break;
else if(strcmp(m_items[i].hdr->path, id) == 0)// scummvm
break;
Expand Down Expand Up @@ -2659,6 +2659,9 @@ bool CCoverFlow::_loadCoverTexPNG(u32 i, bool box, bool hq, bool blankBoxCover)
if(!m_loadingCovers)
return false;

if(box && m_smallBox)// prevent full cover for smallbox mode
return false;

/* get path to cover png or jpg */
const char *path = box ? (blankBoxCover ? mainMenu.getBlankCoverPath(m_items[i].hdr) :
mainMenu.getBoxPath(m_items[i].hdr)) : mainMenu.getFrontPath(m_items[i].hdr);
Expand Down Expand Up @@ -2733,10 +2736,18 @@ bool CCoverFlow::_loadCoverTexPNG(u32 i, bool box, bool hq, bool blankBoxCover)
if(wfcCoverDir != NULL)
{
fsop_MakeFolder(fmt("%s/%s", m_cachePath.c_str(), wfcCoverDir));// will make subfolders if needed
strncpy(full_path, fmt("%s/%s/%s.wfc", m_cachePath.c_str(), wfcCoverDir, wfcTitle), MAX_FAT_PATH);
if(m_smallBox)
strncpy(full_path, fmt("%s/%s/%s_small.wfc", m_cachePath.c_str(), wfcCoverDir, wfcTitle), MAX_FAT_PATH);
else
strncpy(full_path, fmt("%s/%s/%s.wfc", m_cachePath.c_str(), wfcCoverDir, wfcTitle), MAX_FAT_PATH);
}
else
strncpy(full_path, fmt("%s/%s.wfc", m_cachePath.c_str(), wfcTitle), MAX_FAT_PATH);
{
if(m_smallBox)
strncpy(full_path, fmt("%s/%s_small.wfc", m_cachePath.c_str(), wfcTitle), MAX_FAT_PATH);
else
strncpy(full_path, fmt("%s/%s.wfc", m_cachePath.c_str(), wfcTitle), MAX_FAT_PATH);
}

DCFlushRange(full_path, MAX_FAT_PATH+1);

Expand Down Expand Up @@ -2855,9 +2866,19 @@ CCoverFlow::CLRet CCoverFlow::_loadCoverTex(u32 i, bool box, bool hq, bool blank

/* set full path of wfc file */
if(wfcCoverDir != NULL)
strncpy(full_path, fmt("%s/%s/%s.wfc", m_cachePath.c_str(), wfcCoverDir, wfcTitle), MAX_FAT_PATH);
{
if(m_smallBox)
strncpy(full_path, fmt("%s/%s/%s_small.wfc", m_cachePath.c_str(), wfcCoverDir, wfcTitle), MAX_FAT_PATH);
else
strncpy(full_path, fmt("%s/%s/%s.wfc", m_cachePath.c_str(), wfcCoverDir, wfcTitle), MAX_FAT_PATH);
}
else
strncpy(full_path, fmt("%s/%s.wfc", m_cachePath.c_str(), wfcTitle), MAX_FAT_PATH);
{
if(m_smallBox)
strncpy(full_path, fmt("%s/%s_small.wfc", m_cachePath.c_str(), wfcTitle), MAX_FAT_PATH);
else
strncpy(full_path, fmt("%s/%s.wfc", m_cachePath.c_str(), wfcTitle), MAX_FAT_PATH);
}

DCFlushRange(full_path, MAX_FAT_PATH+1);

Expand Down
86 changes: 41 additions & 45 deletions source/menu/menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1990,11 +1990,6 @@ void CMenu::_initCF(void)
strcat(tmp1, tmp2);
id = tmp1;*/
}
else if(m_current_view == COVERFLOW_HOMEBREW)
{
CoverFlow.addItem(&(*hdr), 0, 0);
continue;
}
else if(hdr->type == TYPE_HOMEBREW)
{
wcstombs(id, hdr->title, 63);
Expand All @@ -2012,7 +2007,7 @@ void CMenu::_initCF(void)
favDomain = "FAVORITES_PLUGINS";
adultDomain = "ADULTONLY_PLUGINS";
}
else
else // wii, gc, channels
{
strcpy(id, hdr->id);
if(hdr->type == TYPE_GC_GAME && hdr->settings[0] == 1) /* disc 2 */
Expand Down Expand Up @@ -2138,9 +2133,9 @@ void CMenu::_initCF(void)
}
/* remove them if false to keep file short */
if(!m_gcfg1.getBool(favDomain, id))
m_cfg.remove(favDomain, id);
m_gcfg1.remove(favDomain, id);
if(!m_gcfg1.getBool(adultDomain, id))
m_cfg.remove(adultDomain, id);
m_gcfg1.remove(adultDomain, id);
}

if(dumpGameLst)
Expand All @@ -2150,42 +2145,47 @@ void CMenu::_initCF(void)
}

CoverFlow.setSorting(m_source_cnt > 1 ? (Sorting)0 : (Sorting)m_cfg.getInt(_domainFromView(), "sort", 0));
if(m_current_view == COVERFLOW_HOMEBREW)
{
CoverFlow.setBoxMode(m_cfg.getBool(HOMEBREW_DOMAIN, "box_mode", true));
CoverFlow.setSmallBoxMode(m_cfg.getBool(HOMEBREW_DOMAIN, "smallbox", false));
}
else if(m_sourceflow)
{
CoverFlow.setBoxMode(m_cfg.getBool(SOURCEFLOW_DOMAIN, "box_mode", true));
CoverFlow.setSmallBoxMode(m_cfg.getBool(SOURCEFLOW_DOMAIN, "smallbox", false));
}
else if(m_current_view != COVERFLOW_PLUGIN)
{
CoverFlow.setBoxMode(m_cfg.getBool("GENERAL", "box_mode", true));
CoverFlow.setSmallBoxMode(false);
}
else

if(!m_sourceflow)
{
m_plugin.GetEnabledPlugins(m_cfg, &enabledPluginsCount);
if(enabledPluginsCount == 1 && m_cfg.getBool(PLUGIN_ENABLED, "48425257") && m_cfg.getBool(HOMEBREW_DOMAIN, "smallbox"))
CoverFlow.setSmallBoxMode(true);
else
CoverFlow.setSmallBoxMode(false);
int boxmode_cnt = 0;
for(u8 i = 0; m_plugin.PluginExist(i); ++i)
if(m_current_view == COVERFLOW_HOMEBREW)
{
CoverFlow.setBoxMode(m_cfg.getBool(HOMEBREW_DOMAIN, "box_mode", true));
CoverFlow.setSmallBoxMode(m_cfg.getBool(HOMEBREW_DOMAIN, "smallbox", false));
}
else if(m_current_view == COVERFLOW_PLUGIN)
{
if(m_plugin.GetEnableStatus(m_cfg, m_plugin.getPluginMagic(i)))
m_plugin.GetEnabledPlugins(m_cfg, &enabledPluginsCount);
if(enabledPluginsCount == 1 && m_cfg.getBool(PLUGIN_ENABLED, "48425257") && m_cfg.getBool(HOMEBREW_DOMAIN, "smallbox"))
CoverFlow.setSmallBoxMode(true);
else
CoverFlow.setSmallBoxMode(false);
int boxmode_cnt = 0;
for(u8 i = 0; m_plugin.PluginExist(i); ++i)
{
if(m_plugin.GetBoxMode(i))
boxmode_cnt++;
if(m_plugin.GetEnableStatus(m_cfg, m_plugin.getPluginMagic(i)))
{
if(m_plugin.GetBoxMode(i))
boxmode_cnt++;
}
}
if(boxmode_cnt == 0)
CoverFlow.setBoxMode(false);
else
CoverFlow.setBoxMode(true);
}
if(boxmode_cnt == 0)
CoverFlow.setBoxMode(false);
else
CoverFlow.setBoxMode(true);
{
CoverFlow.setBoxMode(m_cfg.getBool("GENERAL", "box_mode", true));
CoverFlow.setSmallBoxMode(false);
}
}
else // sourceflow
{
CoverFlow.setBoxMode(m_cfg.getBool(SOURCEFLOW_DOMAIN, "box_mode", true));
CoverFlow.setSmallBoxMode(m_cfg.getBool(SOURCEFLOW_DOMAIN, "smallbox", false));
}

CoverFlow.setBufferSize(m_cfg.getInt("GENERAL", "cover_buffer", 20));
CoverFlow.setHQcover(m_cfg.getBool("GENERAL", "cover_use_hq", true));
CoverFlow.start(m_imgsDir);
Expand All @@ -2195,7 +2195,7 @@ void CMenu::_initCF(void)
bool path = false;
char cur_item[64];
cur_item[63] = '\0';
if(m_current_view == COVERFLOW_PLUGIN)
if(m_current_view == COVERFLOW_PLUGIN && !m_sourceflow)
{
strncpy(m_plugin.PluginMagicWord, m_cfg.getString(PLUGIN_DOMAIN, "cur_magic").c_str(), 8);
if(!m_cfg.getBool("PLUGINS_ENABLED", m_plugin.PluginMagicWord, false))
Expand Down Expand Up @@ -2247,13 +2247,6 @@ bool CMenu::_loadList(void)
m_cacheList.Clear();
return true;
}
if(m_current_view == COVERFLOW_HOMEBREW)
{
_loadHomebrewList(HOMEBREW_DIR);
gprintf("Apps found: %i\n", m_gameList.size());
m_cacheList.Clear();
return m_gameList.size() > 0 ? true : false;
}
gprintf("Creating Gamelist\n");
if(m_current_view & COVERFLOW_PLUGIN)
_loadPluginList();
Expand All @@ -2267,6 +2260,9 @@ bool CMenu::_loadList(void)
if(m_current_view & COVERFLOW_GAMECUBE)
_loadGamecubeList();

if(m_current_view & COVERFLOW_HOMEBREW)
_loadHomebrewList(HOMEBREW_DIR);

m_cacheList.Clear();

gprintf("Games found: %i\n", m_gameList.size());
Expand Down
8 changes: 4 additions & 4 deletions source/menu/menu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ class CMenu
TexData m_mainBgLQ;

//Main Coverflow
s16 m_mainBtnCategories;
s16 m_mainBtnConfig;
s16 m_mainBtnHome;
s16 m_mainBtnFavoritesOn;
Expand Down Expand Up @@ -413,8 +414,7 @@ class CMenu
};
s16 m_gameBtnFavoriteOn;
s16 m_gameBtnFavoriteOff;
s16 m_gameBtnAdultOn;
s16 m_gameBtnAdultOff;
s16 m_gameBtnCategories;
s16 m_gameBtnDelete;
s16 m_gameBtnSettings;
s16 m_gameBtnPlay;
Expand Down Expand Up @@ -569,8 +569,8 @@ class CMenu
s16 m_gameSettingsLblCheat;
s16 m_gameSettingsBtnCheat;

s16 m_gameSettingsLblCategoryMain;
s16 m_gameSettingsBtnCategoryMain;
s16 m_gameSettingsLblAdultOnly;
s16 m_gameSettingsBtnAdultOnly;

s16 m_gameSettingsLblGameIOS;
s16 m_gameSettingsLblIOS;
Expand Down
18 changes: 3 additions & 15 deletions source/menu/menu_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "channel/nand.hpp"
#include "loader/nk.h"

const int CMenu::_nbCfgPages = 11;
const int CMenu::_nbCfgPages = 12;

void CMenu::_hideConfigCommon(bool instant)
{
Expand Down Expand Up @@ -91,19 +91,7 @@ void CMenu::_config(int page)
case 6:
change = _configScreen();
break;
case 7:
change = _config7(page);
break;
case 8:
change = _config7(page);
break;
case 9:
change = _config7(page);
break;
case 10:
change = _config7(page);
break;
case 11:
default:
change = _config7(page);
break;
}
Expand All @@ -115,7 +103,7 @@ void CMenu::_config(int page)
page += change;
if (page > _nbCfgPages)
page = 1;
else if (page < 0)
else if (page <= 0)
page = _nbCfgPages;
}
}
Expand Down
60 changes: 46 additions & 14 deletions source/menu/menu_config7.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,21 +66,31 @@ void CMenu::_showConfig7(int curPage)
if(m_config7LblUser[i] != -1)
m_btnMgr.show(m_config7LblUser[i]);

m_btnMgr.show(m_config7Lbl1);
m_btnMgr.show(m_config7Btn1);
m_btnMgr.show(m_config7Lbl2);
m_btnMgr.show(m_config7Btn2);
m_btnMgr.show(m_config7Lbl3);
m_btnMgr.show(m_config7Btn3);
m_btnMgr.show(m_config7Lbl4);

if(curPage == 7 || curPage == 11)
m_btnMgr.show(m_config7Btn4);
if(curPage == 12)
{
m_btnMgr.show(m_config7Lbl1);
m_btnMgr.show(m_config7Btn1);
//m_btnMgr.show(m_config7Lbl2);
//m_btnMgr.show(m_config7Btn2);
}
else
{
m_btnMgr.show(m_config7Lbl4Val);
m_btnMgr.show(m_config7Btn4M);
m_btnMgr.show(m_config7Btn4P);
m_btnMgr.show(m_config7Lbl1);
m_btnMgr.show(m_config7Btn1);
m_btnMgr.show(m_config7Lbl2);
m_btnMgr.show(m_config7Btn2);
m_btnMgr.show(m_config7Lbl3);
m_btnMgr.show(m_config7Btn3);
m_btnMgr.show(m_config7Lbl4);

if(curPage == 7 || curPage == 11)
m_btnMgr.show(m_config7Btn4);
else
{
m_btnMgr.show(m_config7Lbl4Val);
m_btnMgr.show(m_config7Btn4M);
m_btnMgr.show(m_config7Btn4P);
}
}

if(curPage == 7)
Expand Down Expand Up @@ -127,7 +137,7 @@ void CMenu::_showConfig7(int curPage)
m_btnMgr.setText(m_config7Lbl4, _t("cfg716", L"Music fade rate"));
m_btnMgr.setText(m_config7Lbl4Val, wfmt(L"%i", m_cfg.getInt("GENERAL", "music_fade_rate", 8)));
}
else // page 11
else if(curPage == 11)
{
m_btnMgr.setText(m_config7Lbl1, _t("cfg717", L"Random game boot or select"));
m_btnMgr.setText(m_config7Btn1, m_cfg.getBool("GENERAL", "random_select") ? _t("select", L"Select") : _t("boot", L"Boot"));
Expand All @@ -138,6 +148,13 @@ void CMenu::_showConfig7(int curPage)
m_btnMgr.setText(m_config7Lbl4, _t("cfg721", L"Play GC default sound"));
m_btnMgr.setText(m_config7Btn4, m_cfg.getBool(GC_DOMAIN, "play_default_sound") ? _t("yes", L"Yes") : _t("no", L"No"));
}
else // page 12
{
m_btnMgr.setText(m_config7Lbl1, _t("cfg722", L"Homebrew settings"));
m_btnMgr.setText(m_config7Btn1, _t("cfg14", L"Set"));
//m_btnMgr.setText(m_config7Lbl2, _t("cfg723", L"Source menu settings"));
//m_btnMgr.setText(m_config7Btn2, _t("cfg14", L"Set"));
}
}

int CMenu::_config7(int curPage)
Expand Down Expand Up @@ -285,6 +302,21 @@ int CMenu::_config7(int curPage)
m_gc_play_default_sound = m_cfg.getBool(GC_DOMAIN, "play_default_sound", true);
}
}
if(curPage == 12)
{
if(m_btnMgr.selected(m_config7Btn1))
{
_hideConfig7();
_CfgHB();
_showConfig7(12);
}
/*else if(m_btnMgr.selected(m_config7Btn2))
{
_hideConfig7();
_CfgSrc();
_showConfig7(12);
}*/
}
}
}
if(rand_music != m_cfg.getBool("GENERAL", "randomize_music"))
Expand Down
Loading

0 comments on commit 5dc8212

Please sign in to comment.