mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-27 21:54: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,6 +2187,24 @@ void CMenu::_initCF(void)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
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.setBoxMode(m_cfg.getBool("GENERAL", "box_mode", true));
|
||||||
CoverFlow.setSmallBoxMode(false);
|
CoverFlow.setSmallBoxMode(false);
|
||||||
}
|
}
|
||||||
|
@ -58,50 +58,12 @@ 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 */
|
|
||||||
if(m_source_autoboot == true)
|
|
||||||
{ /* search for the requested file */
|
|
||||||
bool game_found = false;
|
|
||||||
for(vector<dir_discHdr>::iterator element = m_gameList.begin(); element != m_gameList.end(); ++element)
|
|
||||||
{
|
|
||||||
switch(m_autoboot_hdr.type)
|
|
||||||
{
|
|
||||||
case TYPE_CHANNEL:
|
|
||||||
//case TYPE_EMUCHANNEL:
|
|
||||||
case TYPE_WII_GAME:
|
|
||||||
case TYPE_GC_GAME:
|
|
||||||
if(strcmp(m_autoboot_hdr.id, element->id) == 0)
|
|
||||||
game_found = true;
|
|
||||||
break;
|
|
||||||
case TYPE_HOMEBREW:
|
|
||||||
case TYPE_PLUGIN:
|
|
||||||
if(wcsncmp(m_autoboot_hdr.title, element->title, 63) == 0)
|
|
||||||
game_found = true;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if(game_found == true)
|
|
||||||
{
|
|
||||||
memcpy(&m_autoboot_hdr, &(*(element)), sizeof(dir_discHdr));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(game_found == true)
|
|
||||||
{
|
|
||||||
gprintf("Game found, autobooting...\n");
|
|
||||||
_launch(&m_autoboot_hdr);
|
|
||||||
}
|
|
||||||
/* fail */
|
|
||||||
m_source_autoboot = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
_hideWaitMessage();
|
_hideWaitMessage();
|
||||||
}
|
|
||||||
|
|
||||||
|
/* if game list is empty display message letting user know */
|
||||||
wstringEx Msg;
|
wstringEx Msg;
|
||||||
wstringEx Pth;
|
wstringEx Pth;
|
||||||
if(m_gameList.empty())
|
if(m_gameList.empty())
|
||||||
@ -147,7 +109,46 @@ void CMenu::_showCF(bool refreshList)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* setup for filter list and coverflow stuff */
|
/* if source menu button set to autoboot */
|
||||||
|
if(m_source_autoboot == true)
|
||||||
|
{ /* search game list for the requested title */
|
||||||
|
bool game_found = false;
|
||||||
|
for(vector<dir_discHdr>::iterator element = m_gameList.begin(); element != m_gameList.end(); ++element)
|
||||||
|
{
|
||||||
|
switch(m_autoboot_hdr.type)
|
||||||
|
{
|
||||||
|
case TYPE_CHANNEL:
|
||||||
|
case TYPE_WII_GAME:
|
||||||
|
case TYPE_GC_GAME:
|
||||||
|
if(strcmp(m_autoboot_hdr.id, element->id) == 0)
|
||||||
|
game_found = true;
|
||||||
|
break;
|
||||||
|
case TYPE_HOMEBREW:
|
||||||
|
case TYPE_PLUGIN:
|
||||||
|
if(wcsncmp(m_autoboot_hdr.title, element->title, 63) == 0)
|
||||||
|
game_found = true;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if(game_found == true)
|
||||||
|
{
|
||||||
|
memcpy(&m_autoboot_hdr, &(*(element)), sizeof(dir_discHdr));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* title found - launch it */
|
||||||
|
if(game_found == true)
|
||||||
|
{
|
||||||
|
gprintf("Game found, autobooting...\n");
|
||||||
|
_launch(&m_autoboot_hdr);
|
||||||
|
}
|
||||||
|
/* fail */
|
||||||
|
m_source_autoboot = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 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