mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-12-03 16:44:20 +01:00
v5.4.7 beta 4
- added wiiflow/covers/homebrew_small folder so when using homebrew smallbox mode you can use your own custom covers instead of the apps icon.png - fixed music resample to 48k option on main settings to not crash wiiflow if only one song file in wiiflow music folder. - fixed displaying music title when you only have one music file in wiiflow music folder. - fixed saving and loading enabled plugins upon exit and startup. This stops the "no plugins selected" message upon returning to wiiflow when you previously used the Select Plugin Menu. - fixed custom backgrounds after using the Select Plugin Menu. - fixed the Source Menu to display source buttons properly when switching tiers or pages. - fixed refreshing Source Menu buttons after using the options menu to hide them.
This commit is contained in:
parent
e0445a0cc0
commit
9a8a752e6f
Binary file not shown.
BIN
out/boot.dol
BIN
out/boot.dol
Binary file not shown.
Before Width: | Height: | Size: 4.1 MiB After Width: | Height: | Size: 4.1 MiB |
@ -1,6 +1,6 @@
|
||||
|
||||
#define APP_NAME "WiiFlow WFL"
|
||||
#define APP_VERSION "5.4.7 beta 1"
|
||||
#define APP_VERSION "5.4.7 beta 4"
|
||||
|
||||
#define APP_DATA_DIR "wiiflow"
|
||||
#define APPS_DIR "apps/wiiflow"
|
||||
|
@ -339,8 +339,8 @@ bool CMenu::init(bool usb_mounted)
|
||||
{
|
||||
enabledPluginsCount++;
|
||||
m_plugin.SetEnablePlugin(pos, 2);
|
||||
if(i == 0)
|
||||
enabledMagics = magics[0];
|
||||
if(enabledPluginsCount == 1)
|
||||
enabledMagics = magics[i];
|
||||
else
|
||||
enabledMagics.append(',' + magics[i]);
|
||||
}
|
||||
@ -2826,7 +2826,7 @@ const char *CMenu::getBoxPath(const dir_discHdr *element)
|
||||
else
|
||||
return fmt("%s/%s.png", m_boxPicDir.c_str(), tempname);
|
||||
}
|
||||
else if(element->type == TYPE_HOMEBREW)
|
||||
else if(element->type == TYPE_HOMEBREW)// use folder name for the png name
|
||||
return fmt("%s/homebrew/%s.png", m_boxPicDir.c_str(), strrchr(element->path, '/') + 1);
|
||||
else if(element->type == TYPE_SOURCE)//sourceflow
|
||||
{
|
||||
@ -2854,7 +2854,13 @@ const char *CMenu::getFrontPath(const dir_discHdr *element)
|
||||
else if(element->type == TYPE_HOMEBREW)
|
||||
{
|
||||
if(m_cfg.getBool(HOMEBREW_DOMAIN, "smallbox"))
|
||||
return fmt("%s/icon.png", element->path);
|
||||
{
|
||||
const char *coverPath = fmt("%s/homebrew_small/%s.png", m_picDir.c_str(), strrchr(element->path, '/') + 1);
|
||||
if(!fsop_FileExist(coverPath))
|
||||
return fmt("%s/icon.png", element->path);
|
||||
else
|
||||
return coverPath;
|
||||
}
|
||||
else
|
||||
return fmt("%s/homebrew/%s.png", m_picDir.c_str(), strrchr(element->path, '/') + 1);
|
||||
}
|
||||
|
@ -246,8 +246,7 @@ int CMenu::_config7(int curPage)
|
||||
m_cfg.setBool("general", "resample_to_48khz", val);
|
||||
m_btnMgr.setText(m_config7Btn1, val ? _t("yes", L"Yes") : _t("no", L"No"));
|
||||
MusicPlayer.SetResampleSetting(val);
|
||||
MusicPlayer.Stop();
|
||||
MusicPlayer.LoadCurrentFile();
|
||||
MusicPlayer.ReLoadCurrentFile();
|
||||
}
|
||||
else if(m_btnMgr.selected(m_config7Btn2))
|
||||
{
|
||||
|
@ -198,7 +198,10 @@ void CMenu::_launchPlugin(dir_discHdr *hdr)
|
||||
if(strstr(hdr->path, ".pls") == NULL && strstr(hdr->path, ".m3u") == NULL)
|
||||
MusicPlayer.LoadFile(hdr->path, false);
|
||||
else
|
||||
{
|
||||
m_music_info = m_cfg.getBool("GENERAL", "display_music_info", false);
|
||||
MusicPlayer.InitPlaylist(m_cfg, hdr->path, currentPartition);// maybe error msg if trouble loading playlist
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -504,6 +504,8 @@ int CMenu::main(void)
|
||||
show_plugin = !m_cfg.getBool(PLUGIN_DOMAIN, "disable", false);
|
||||
show_gamecube = !m_cfg.getBool(GC_DOMAIN, "disable", false);
|
||||
show_homebrew = !m_cfg.getBool(HOMEBREW_DOMAIN, "disable", false);
|
||||
if(m_refreshGameList)
|
||||
_getCustomBgTex();
|
||||
_showMain();
|
||||
}
|
||||
}
|
||||
|
@ -237,7 +237,7 @@ void CMenu::_Paths(void)
|
||||
m_cfg.setString("GENERAL", "dir_music", path);
|
||||
m_musicDir = path;
|
||||
MusicPlayer.Init(m_cfg, m_musicDir, fmt("%s/music", m_themeDataDir.c_str()));
|
||||
|
||||
m_music_info = m_cfg.getBool("GENERAL", "display_music_info", false);
|
||||
}
|
||||
_showPaths();
|
||||
}
|
||||
|
@ -165,16 +165,25 @@ void CMenu::_PluginSettings()
|
||||
}
|
||||
}
|
||||
_hidePluginSettings();
|
||||
|
||||
int channels_type = 0;
|
||||
string enabledMagics;
|
||||
enabledPluginsCount = 0;
|
||||
for(u8 i = 0; m_plugin.PluginExist(i); i++)
|
||||
{
|
||||
if(m_plugin.GetEnabledStatus(i))
|
||||
{
|
||||
enabledPluginsCount++;
|
||||
string magic = sfmt("%08x", m_plugin.GetPluginMagic(i));
|
||||
if(i == 0)
|
||||
if(enabledPluginsCount == 1)
|
||||
enabledMagics = magic;
|
||||
else
|
||||
enabledMagics.append(',' + magic);
|
||||
|
||||
if(magic == "454e414e")
|
||||
channels_type |= CHANNELS_EMU;
|
||||
else if(magic == "4e414e44")
|
||||
channels_type |= CHANNELS_REAL;
|
||||
}
|
||||
}
|
||||
m_cfg.setString(PLUGIN_DOMAIN, "enabled_plugins", enabledMagics);
|
||||
@ -184,11 +193,6 @@ void CMenu::_PluginSettings()
|
||||
m_cfg.setUInt("GENERAL", "sources", m_current_view);
|
||||
m_source_cnt = 1;
|
||||
m_catStartPage = 1;
|
||||
int channels_type = 0;
|
||||
if(m_cfg.getBool(PLUGIN_ENABLED, "454E414E"))
|
||||
channels_type |= CHANNELS_EMU;
|
||||
if(m_cfg.getBool(PLUGIN_ENABLED, "4E414E44"))
|
||||
channels_type |= CHANNELS_REAL;
|
||||
m_cfg.setInt(CHANNEL_DOMAIN, "channels_type", channels_type);
|
||||
}
|
||||
else
|
||||
|
@ -295,6 +295,8 @@ void CMenu::_checkboxesMenu(u8 md)
|
||||
plugin_ok = false;
|
||||
else if(strncasecmp(m_plugin.PluginMagicWord, "454E414E", 8) == 0)//ENAN
|
||||
plugin_ok = false;
|
||||
else if(strncasecmp(m_plugin.PluginMagicWord, "5343564D", 8) == 0)//scummvm
|
||||
plugin_ok = false;
|
||||
|
||||
if(!plugin_ok)
|
||||
{
|
||||
|
@ -85,8 +85,8 @@ void CMenu::_sourceFlow()
|
||||
{
|
||||
enabledPluginsCount++;
|
||||
m_plugin.SetEnablePlugin(pos, 2);
|
||||
if(i == 0)
|
||||
enabledMagics = magicNums[0];
|
||||
if(enabledPluginsCount == 1)
|
||||
enabledMagics = magicNums[i];
|
||||
else
|
||||
enabledMagics.append(',' + magicNums[i]);
|
||||
}
|
||||
@ -187,16 +187,20 @@ void CMenu::_srcTierLoad(string fn)
|
||||
{
|
||||
m_source.unload();
|
||||
m_source.load(fmt("%s/%s", m_sourceDir.c_str(), fn.c_str()));
|
||||
|
||||
fn.replace(fn.find("."), 4, "_flow");
|
||||
if(m_source.has("general", "flow"))
|
||||
curflow = m_source.getInt("general", "flow", 1);
|
||||
else
|
||||
curflow = m_cfg.getInt(SOURCEFLOW_DOMAIN, fn, m_cfg.getInt(SOURCEFLOW_DOMAIN, "last_cf_mode", 1));
|
||||
|
||||
if(m_source.has("general", "box_mode"))
|
||||
m_cfg.setBool(SOURCEFLOW_DOMAIN, "box_mode", m_source.getBool("general", "box_mode", true));
|
||||
if(m_source.has("general", "smallbox"))
|
||||
m_cfg.setBool(SOURCEFLOW_DOMAIN, "smallbox", m_source.getBool("general", "smallbox", false));
|
||||
|
||||
SF_cacheCovers = true;
|
||||
|
||||
/* get max source button # */
|
||||
m_max_source_btn = 0;
|
||||
const char *srcDomain = m_source.firstDomain().c_str();
|
||||
@ -212,6 +216,7 @@ void CMenu::_srcTierLoad(string fn)
|
||||
}
|
||||
srcDomain = m_source.nextDomain().c_str();
|
||||
}
|
||||
|
||||
if(!m_sourceflow)
|
||||
{
|
||||
nonHiddenSources.clear();
|
||||
@ -323,14 +328,14 @@ void CMenu::_updateSourceBtns(void)
|
||||
}
|
||||
|
||||
j = (curPage - 1) * 12;
|
||||
for(i = j; i < (j + 12); ++i)
|
||||
for(i = 0; i < 12; ++i)
|
||||
{
|
||||
if(i >= nonHiddenSources.size())
|
||||
m_btnMgr.hide(m_sourceBtnSource[i -j]);
|
||||
if((i + j) >= nonHiddenSources.size())
|
||||
m_btnMgr.hide(m_sourceBtnSource[i]);
|
||||
else
|
||||
{
|
||||
memset(current_btn, 0, 16);
|
||||
strncpy(current_btn, fmt("BUTTON_%i", nonHiddenSources[i]), 15);
|
||||
strncpy(current_btn, fmt("BUTTON_%i", nonHiddenSources[i + j]), 15);
|
||||
string btnSource = m_source.getString(current_btn, "source", "");
|
||||
if(btnSource == "")
|
||||
continue;
|
||||
@ -353,8 +358,8 @@ void CMenu::_updateSourceBtns(void)
|
||||
if(TexHandle.fromImageFile(texConsoleImgs, fmt("%s/%s", m_sourceDir.c_str(), btn_image_s)) != TE_OK)
|
||||
TexHandle.fromImageFile(texConsoleImgs, fmt("%s/favoritesons.png", m_imgsDir.c_str()));
|
||||
}
|
||||
m_btnMgr.setBtnTexture(m_sourceBtnSource[i - j], texConsoleImg, texConsoleImgs);
|
||||
m_btnMgr.show(m_sourceBtnSource[i - j]);
|
||||
m_btnMgr.setBtnTexture(m_sourceBtnSource[i], texConsoleImg, texConsoleImgs);
|
||||
m_btnMgr.show(m_sourceBtnSource[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -389,6 +394,23 @@ bool CMenu::_Source()
|
||||
{
|
||||
_hideSource();
|
||||
_SM_Editor();
|
||||
nonHiddenSources.clear();
|
||||
for(i = 0; i <= m_max_source_btn; i++)
|
||||
{
|
||||
if(!m_source.getBool(sfmt("BUTTON_%i", i), "hidden", false))
|
||||
nonHiddenSources.push_back(i);
|
||||
}
|
||||
u8 num = stoi(sm_numbers[sm_numbers.size() - 1]);
|
||||
curPage = 1;
|
||||
for(i = 0; i < nonHiddenSources.size(); i++)
|
||||
{
|
||||
if(nonHiddenSources[i] == num)
|
||||
{
|
||||
curPage = i / 12 + 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
numPages = (nonHiddenSources.size() / 12) + 1;
|
||||
_showSource();
|
||||
_updateSourceBtns();
|
||||
}
|
||||
@ -427,7 +449,7 @@ bool CMenu::_Source()
|
||||
if(m_btnMgr.selected(m_sourceBtnSource[i]))
|
||||
{
|
||||
memset(btn_selected, 0, 16);
|
||||
strncpy(btn_selected, fmt("BUTTON_%i", i + j), 15);
|
||||
strncpy(btn_selected, fmt("BUTTON_%i", nonHiddenSources[i + j]), 15);
|
||||
source = m_source.getString(btn_selected, "source", "");
|
||||
break;
|
||||
}
|
||||
@ -474,8 +496,8 @@ bool CMenu::_Source()
|
||||
{
|
||||
enabledPluginsCount++;
|
||||
m_plugin.SetEnablePlugin(pos, 2);
|
||||
if(i == 0)
|
||||
enabledMagics = magicNums[0];
|
||||
if(enabledPluginsCount == 1)
|
||||
enabledMagics = magicNums[i];
|
||||
else
|
||||
enabledMagics.append(',' + magicNums[i]);
|
||||
}
|
||||
@ -532,8 +554,23 @@ bool CMenu::_Source()
|
||||
}
|
||||
srcDomain = m_source.nextDomain().c_str();
|
||||
}
|
||||
curPage = stoi(sm_numbers[sm_numbers.size() - 1]) / 12 + 1;
|
||||
numPages = (m_max_source_btn / 12) + 1;
|
||||
nonHiddenSources.clear();
|
||||
for(i = 0; i <= m_max_source_btn; i++)
|
||||
{
|
||||
if(!m_source.getBool(sfmt("BUTTON_%i", i), "hidden", false))
|
||||
nonHiddenSources.push_back(i);
|
||||
}
|
||||
u8 num = stoi(sm_numbers[sm_numbers.size() - 1]);
|
||||
curPage = 1;
|
||||
for(i = 0; i < nonHiddenSources.size(); i++)
|
||||
{
|
||||
if(nonHiddenSources[i] == num)
|
||||
{
|
||||
curPage = i / 12 + 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
numPages = (nonHiddenSources.size() / 12) + 1;
|
||||
_updateSourceBtns();
|
||||
}
|
||||
}
|
||||
|
@ -58,8 +58,8 @@ void Musicplayer::Init(Config &cfg, const string& musicDir, const string& themeM
|
||||
FadeRate = cfg.getInt("GENERAL", "music_fade_rate", 8);
|
||||
Volume = cfg.getInt("GENERAL", "sound_volume_music", 255);
|
||||
|
||||
SetVolume(0);
|
||||
MusicFile.SetVoice(0);
|
||||
SetVolume(0);
|
||||
|
||||
vector<string> Types = stringToVector(".mp3|.ogg", '|');
|
||||
GetFiles(musicDir.c_str(), Types, FileNameAdder, false, MUSIC_DEPTH);
|
||||
@ -237,6 +237,16 @@ void Musicplayer::LoadFile(const char *name, bool display_change)
|
||||
MusicChanged = display_change;
|
||||
}
|
||||
|
||||
void Musicplayer::ReLoadCurrentFile()
|
||||
{
|
||||
char curFile[1024];
|
||||
strcpy(curFile, MusicFile.GetName());
|
||||
if(strlen(curFile) == 0)
|
||||
return;
|
||||
Stop();
|
||||
LoadFile(curFile, false);
|
||||
}
|
||||
|
||||
/* For our GUI */
|
||||
wstringEx Musicplayer::GetFileName()
|
||||
{
|
||||
|
@ -56,6 +56,7 @@ public:
|
||||
|
||||
void LoadFile(const char *name, bool display_change = true);
|
||||
void LoadCurrentFile();
|
||||
void ReLoadCurrentFile();
|
||||
protected:
|
||||
bool PosFromPrevFile();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user