mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-24 04:09:15 +01:00
-added _flatflow to display covers not in boxmode. add boxmode=no to a plugin.ini. if all plugins selected have boxmode=no then boxmode will be set to off and the coverflow used will be _FLATFLOW.
This commit is contained in:
parent
ecd02f27f4
commit
e968a81322
BIN
out/boot.dol
BIN
out/boot.dol
Binary file not shown.
Before Width: | Height: | Size: 3.3 MiB After Width: | Height: | Size: 3.3 MiB |
@ -2187,7 +2187,25 @@ void CMenu::_initCF(void)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CoverFlow.setBoxMode(m_cfg.getBool("GENERAL", "box_mode", true));
|
m_plugin.GetEnabledPlugins(m_cfg, &enabledPluginsCount);
|
||||||
|
if(m_current_view == COVERFLOW_PLUGIN && enabledPluginsCount > 0)// 1 main source is plugin mode
|
||||||
|
{
|
||||||
|
int boxmode_cnt = 0;
|
||||||
|
for(u8 i = 0; m_plugin.PluginExist(i); ++i)
|
||||||
|
{
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
CoverFlow.setBoxMode(m_cfg.getBool("GENERAL", "box_mode", true));
|
||||||
CoverFlow.setSmallBoxMode(false);
|
CoverFlow.setSmallBoxMode(false);
|
||||||
}
|
}
|
||||||
CoverFlow.setCompression(m_cfg.getBool("GENERAL", "allow_texture_compression", true));
|
CoverFlow.setCompression(m_cfg.getBool("GENERAL", "allow_texture_compression", true));
|
||||||
|
@ -58,19 +58,66 @@ void CMenu::_showCF(bool refreshList)
|
|||||||
if(!m_vid.showingWaitMessage())
|
if(!m_vid.showingWaitMessage())
|
||||||
_showWaitMessage();
|
_showWaitMessage();
|
||||||
|
|
||||||
/* create gameList */
|
/* create gameList based on sources selected */
|
||||||
_loadList();
|
_loadList();
|
||||||
|
|
||||||
/* autoboot stuff */
|
_hideWaitMessage();
|
||||||
|
|
||||||
|
/* if game list is empty display message letting user know */
|
||||||
|
wstringEx Msg;
|
||||||
|
wstringEx Pth;
|
||||||
|
if(m_gameList.empty())
|
||||||
|
{
|
||||||
|
if(m_source_cnt > 1)
|
||||||
|
{
|
||||||
|
Msg = _t("main8", L"game list empty!");
|
||||||
|
Pth = "";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
switch(m_current_view)
|
||||||
|
{
|
||||||
|
case COVERFLOW_WII:
|
||||||
|
Msg = _t("main2", L"No games found in ");
|
||||||
|
Pth = wstringEx(fmt(wii_games_dir, DeviceName[currentPartition]));
|
||||||
|
break;
|
||||||
|
case COVERFLOW_GAMECUBE:
|
||||||
|
Msg = _t("main2", L"No games found in ");
|
||||||
|
Pth = wstringEx(fmt(gc_games_dir, DeviceName[currentPartition]));
|
||||||
|
break;
|
||||||
|
case COVERFLOW_CHANNEL:
|
||||||
|
Msg = _t("main3", L"No titles found in ");
|
||||||
|
Pth = wstringEx(fmt("%s:/%s/%s", DeviceName[currentPartition], emu_nands_dir, m_cfg.getString(CHANNEL_DOMAIN, "current_emunand").c_str()));
|
||||||
|
break;
|
||||||
|
case COVERFLOW_HOMEBREW:
|
||||||
|
Msg = _t("main4", L"No apps found in ");
|
||||||
|
Pth = wstringEx(fmt(HOMEBREW_DIR, DeviceName[currentPartition]));
|
||||||
|
break;
|
||||||
|
case COVERFLOW_PLUGIN:
|
||||||
|
m_plugin.GetEnabledPlugins(m_cfg, &enabledPluginsCount);
|
||||||
|
if(enabledPluginsCount == 0)
|
||||||
|
Msg = _t("main6", L"No plugins selected.");
|
||||||
|
else
|
||||||
|
Msg = _t("main5", L"No roms/items found.");
|
||||||
|
Pth = "";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Msg.append(Pth);
|
||||||
|
m_btnMgr.setText(m_mainLblMessage, Msg);
|
||||||
|
m_btnMgr.show(m_mainLblMessage);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* if source menu button set to autoboot */
|
||||||
if(m_source_autoboot == true)
|
if(m_source_autoboot == true)
|
||||||
{ /* search for the requested file */
|
{ /* search game list for the requested title */
|
||||||
bool game_found = false;
|
bool game_found = false;
|
||||||
for(vector<dir_discHdr>::iterator element = m_gameList.begin(); element != m_gameList.end(); ++element)
|
for(vector<dir_discHdr>::iterator element = m_gameList.begin(); element != m_gameList.end(); ++element)
|
||||||
{
|
{
|
||||||
switch(m_autoboot_hdr.type)
|
switch(m_autoboot_hdr.type)
|
||||||
{
|
{
|
||||||
case TYPE_CHANNEL:
|
case TYPE_CHANNEL:
|
||||||
//case TYPE_EMUCHANNEL:
|
|
||||||
case TYPE_WII_GAME:
|
case TYPE_WII_GAME:
|
||||||
case TYPE_GC_GAME:
|
case TYPE_GC_GAME:
|
||||||
if(strcmp(m_autoboot_hdr.id, element->id) == 0)
|
if(strcmp(m_autoboot_hdr.id, element->id) == 0)
|
||||||
@ -90,7 +137,8 @@ void CMenu::_showCF(bool refreshList)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(game_found == true)
|
/* title found - launch it */
|
||||||
|
if(game_found == true)
|
||||||
{
|
{
|
||||||
gprintf("Game found, autobooting...\n");
|
gprintf("Game found, autobooting...\n");
|
||||||
_launch(&m_autoboot_hdr);
|
_launch(&m_autoboot_hdr);
|
||||||
@ -98,56 +146,9 @@ void CMenu::_showCF(bool refreshList)
|
|||||||
/* fail */
|
/* fail */
|
||||||
m_source_autoboot = false;
|
m_source_autoboot = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
_hideWaitMessage();
|
|
||||||
}
|
|
||||||
|
|
||||||
wstringEx Msg;
|
|
||||||
wstringEx Pth;
|
|
||||||
if(m_gameList.empty())
|
|
||||||
{
|
|
||||||
if(m_source_cnt > 1)
|
|
||||||
{
|
|
||||||
Msg = _t("main8", L"game list empty!");
|
|
||||||
Pth = "";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
switch(m_current_view)
|
|
||||||
{
|
|
||||||
case COVERFLOW_WII:
|
|
||||||
Msg = _t("main2", L"No games found in ");
|
|
||||||
Pth = wstringEx(fmt(wii_games_dir, DeviceName[currentPartition]));
|
|
||||||
break;
|
|
||||||
case COVERFLOW_GAMECUBE:
|
|
||||||
Msg = _t("main2", L"No games found in ");
|
|
||||||
Pth = wstringEx(fmt(gc_games_dir, DeviceName[currentPartition]));
|
|
||||||
break;
|
|
||||||
case COVERFLOW_CHANNEL:
|
|
||||||
Msg = _t("main3", L"No titles found in ");
|
|
||||||
Pth = wstringEx(fmt("%s:/%s/%s", DeviceName[currentPartition], emu_nands_dir, m_cfg.getString(CHANNEL_DOMAIN, "current_emunand").c_str()));
|
|
||||||
break;
|
|
||||||
case COVERFLOW_HOMEBREW:
|
|
||||||
Msg = _t("main4", L"No apps found in ");
|
|
||||||
Pth = wstringEx(fmt(HOMEBREW_DIR, DeviceName[currentPartition]));
|
|
||||||
break;
|
|
||||||
case COVERFLOW_PLUGIN:
|
|
||||||
m_plugin.GetEnabledPlugins(m_cfg, &enabledPluginsCount);
|
|
||||||
if(enabledPluginsCount == 0)
|
|
||||||
Msg = _t("main6", L"No plugins selected.");
|
|
||||||
else
|
|
||||||
Msg = _t("main5", L"No roms/items found.");
|
|
||||||
Pth = "";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Msg.append(Pth);
|
|
||||||
m_btnMgr.setText(m_mainLblMessage, Msg);
|
|
||||||
m_btnMgr.show(m_mainLblMessage);
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* setup for filter list and coverflow stuff */
|
/* setup categories and favorites for filtering the game list below */
|
||||||
if(refreshList && m_clearCats)// clear categories unless a source menu btn has selected one
|
if(refreshList && m_clearCats)// clear categories unless a source menu btn has selected one
|
||||||
{
|
{
|
||||||
// do not clear hidden categories to keep games hidden
|
// do not clear hidden categories to keep games hidden
|
||||||
@ -160,6 +161,7 @@ void CMenu::_showCF(bool refreshList)
|
|||||||
if(m_cfg.getBool("GENERAL", "save_favorites_mode", false))
|
if(m_cfg.getBool("GENERAL", "save_favorites_mode", false))
|
||||||
m_favorites = m_cfg.getBool(_domainFromView(), "favorites", false);
|
m_favorites = m_cfg.getBool(_domainFromView(), "favorites", false);
|
||||||
|
|
||||||
|
/* set CoverFlow domain to _COVERFLOW, _SMALLFLOW, _SIDEFLOW, _SHORTFLOW, or _FLATFLOW */
|
||||||
cf_domain = "_COVERFLOW";
|
cf_domain = "_COVERFLOW";
|
||||||
if(!m_sourceflow && m_current_view == COVERFLOW_HOMEBREW && m_cfg.getBool(HOMEBREW_DOMAIN, "smallbox", true))
|
if(!m_sourceflow && m_current_view == COVERFLOW_HOMEBREW && m_cfg.getBool(HOMEBREW_DOMAIN, "smallbox", true))
|
||||||
cf_domain = "_SMALLFLOW";
|
cf_domain = "_SMALLFLOW";
|
||||||
@ -172,11 +174,14 @@ void CMenu::_showCF(bool refreshList)
|
|||||||
{
|
{
|
||||||
int sdc = 0;
|
int sdc = 0;
|
||||||
int shc = 0;
|
int shc = 0;
|
||||||
|
int flatmode_cnt = 0;
|
||||||
for(u8 i = 0; m_plugin.PluginExist(i); ++i)
|
for(u8 i = 0; m_plugin.PluginExist(i); ++i)
|
||||||
{
|
{
|
||||||
if(m_plugin.GetEnableStatus(m_cfg, m_plugin.getPluginMagic(i)))
|
if(m_plugin.GetEnableStatus(m_cfg, m_plugin.getPluginMagic(i)))
|
||||||
{
|
{
|
||||||
if(_sideCover(m_plugin.PluginMagicWord))
|
if(!m_plugin.GetBoxMode(i))
|
||||||
|
flatmode_cnt++;
|
||||||
|
else if(_sideCover(m_plugin.PluginMagicWord))
|
||||||
sdc++;
|
sdc++;
|
||||||
else if(_shortCover(m_plugin.PluginMagicWord))
|
else if(_shortCover(m_plugin.PluginMagicWord))
|
||||||
shc++;
|
shc++;
|
||||||
@ -186,17 +191,24 @@ void CMenu::_showCF(bool refreshList)
|
|||||||
cf_domain = "_SIDEFLOW";
|
cf_domain = "_SIDEFLOW";
|
||||||
else if(shc == enabledPluginsCount)
|
else if(shc == enabledPluginsCount)
|
||||||
cf_domain = "_SHORTFLOW";
|
cf_domain = "_SHORTFLOW";
|
||||||
|
if(flatmode_cnt == enabledPluginsCount)
|
||||||
|
cf_domain = "_FLATFLOW";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_numCFVersions = min(max(1, m_coverflow.getInt(cf_domain, "number_of_modes", 1)), 15);
|
/* get the number of layouts (modes) for the CoverFlow domain */
|
||||||
|
m_numCFVersions = min(max(1, m_coverflow.getInt(cf_domain, "number_of_modes", 1)), 15);// max layouts is 15
|
||||||
|
|
||||||
/* filter list and start coverflow coverloader */
|
/* get the current cf layout number and use it to load the data used for that layout */
|
||||||
_loadCFLayout(min(max(1, _getCFVersion()), (int)m_numCFVersions));
|
_loadCFLayout(min(max(1, _getCFVersion()), (int)m_numCFVersions));
|
||||||
|
|
||||||
|
/* filter game list to create the cf cover list and start coverflow coverloader */
|
||||||
_initCF();
|
_initCF();
|
||||||
|
|
||||||
|
/* set the covers and titles to the positions and angles based on the cf layout */
|
||||||
CoverFlow.applySettings();
|
CoverFlow.applySettings();
|
||||||
|
|
||||||
/* display game count unless sourceflow or homebrew */
|
/* display game count if not sourceflow or homebrew */
|
||||||
if(m_sourceflow || m_current_view == COVERFLOW_HOMEBREW)
|
if(m_sourceflow || m_current_view == COVERFLOW_HOMEBREW)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -71,6 +71,7 @@ bool Plugin::AddPlugin(Config &plugin)
|
|||||||
NewPlugin.romDir = plugin.getString(PLUGIN, "romDir");
|
NewPlugin.romDir = plugin.getString(PLUGIN, "romDir");
|
||||||
NewPlugin.fileTypes = plugin.getString(PLUGIN, "fileTypes");
|
NewPlugin.fileTypes = plugin.getString(PLUGIN, "fileTypes");
|
||||||
NewPlugin.Args = plugin.getStrings(PLUGIN, "arguments", '|');
|
NewPlugin.Args = plugin.getStrings(PLUGIN, "arguments", '|');
|
||||||
|
NewPlugin.boxMode = plugin.getBool(PLUGIN, "boxmode", 1);
|
||||||
string PluginName = plugin.getString(PLUGIN, "displayname");
|
string PluginName = plugin.getString(PLUGIN, "displayname");
|
||||||
if(PluginName.size() < 2)
|
if(PluginName.size() < 2)
|
||||||
{
|
{
|
||||||
@ -155,6 +156,11 @@ u32 Plugin::GetCaseColor(u8 pos)
|
|||||||
return Plugins[pos].caseColor;
|
return Plugins[pos].caseColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Plugin::GetBoxMode(u8 pos)
|
||||||
|
{
|
||||||
|
return Plugins[pos].boxMode;
|
||||||
|
}
|
||||||
|
|
||||||
wstringEx Plugin::GetPluginName(u8 pos)
|
wstringEx Plugin::GetPluginName(u8 pos)
|
||||||
{
|
{
|
||||||
return Plugins[pos].DisplayName;
|
return Plugins[pos].DisplayName;
|
||||||
|
@ -53,6 +53,7 @@ struct PluginOptions
|
|||||||
u32 BannerSoundSize;
|
u32 BannerSoundSize;
|
||||||
vector<string> Args;
|
vector<string> Args;
|
||||||
wstringEx DisplayName;
|
wstringEx DisplayName;
|
||||||
|
bool boxMode;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Plugin
|
class Plugin
|
||||||
@ -69,6 +70,7 @@ public:
|
|||||||
wstringEx GetPluginName(u8 pos);
|
wstringEx GetPluginName(u8 pos);
|
||||||
u32 getPluginMagic(u8 pos);
|
u32 getPluginMagic(u8 pos);
|
||||||
s8 GetPluginPosition(u32 magic);
|
s8 GetPluginPosition(u32 magic);
|
||||||
|
bool GetBoxMode(u8 pos);
|
||||||
|
|
||||||
void init(const string& m_pluginsDir);
|
void init(const string& m_pluginsDir);
|
||||||
bool AddPlugin(Config &plugin);
|
bool AddPlugin(Config &plugin);
|
||||||
|
Loading…
Reference in New Issue
Block a user