From 0a7c9bd78d0feab7950e6e433429ef3c09763d5f Mon Sep 17 00:00:00 2001 From: fledge68 Date: Fri, 18 Jan 2013 21:40:55 +0000 Subject: [PATCH] - Fix for source menu again. Added allplugins button back in. seems to be what was causing trouble for a lot of people --- source/menu/menu_source.cpp | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/source/menu/menu_source.cpp b/source/menu/menu_source.cpp index 9e3f3634..53196cd6 100644 --- a/source/menu/menu_source.cpp +++ b/source/menu/menu_source.cpp @@ -126,7 +126,16 @@ void CMenu::_updateSourceBtns(void) domain = CHANNEL_DOMAIN; else if(btnSource == "") continue; - else + else if(btnSource == "allplugins") + { + domain = PLUGIN_DOMAIN; + bool EnableAll = m_plugin.GetEnabledPlugins(m_cfg).size(); + if(EnableAll) + ImgName = m_source.getString(fmt("BUTTON_%i", i + j),"image_s", "").c_str(); + else + ImgName = m_source.getString(fmt("BUTTON_%i", i + j),"image", "").c_str(); + } + else if(btnSource == "plugin") { domain = PLUGIN_DOMAIN; if(m_cfg.getBool(domain, "source", false)) @@ -141,6 +150,8 @@ void CMenu::_updateSourceBtns(void) else ImgName = m_source.getString(fmt("BUTTON_%i", i + j),"image", "").c_str(); } + else + domain = WII_DOMAIN; if(domain != PLUGIN_DOMAIN) { if(m_cfg.getBool(domain, "source", false)) @@ -371,7 +382,7 @@ bool CMenu::_Source() break; } } - /*if (source == "allplugins") + if (source == "allplugins") { if (!show_emu) _showSourceNotice(); else @@ -385,7 +396,7 @@ bool CMenu::_Source() } break; } - }*/ + } if (source == "plugin") { if(!show_emu) @@ -509,6 +520,22 @@ bool CMenu::_Source() break; } } + if (source == "allplugins") + { + if (!show_emu) _showSourceNotice(); + else + { + imgSelected = true; + bool EnableAll = m_plugin.GetEnabledPlugins(m_cfg).size(); + for(u8 j = 0; m_plugin.PluginExist(j); j++) + m_plugin.SetEnablePlugin(m_cfg, j, EnableAll ? 2 : 1); + if(EnableAll) + m_cfg.setBool(PLUGIN_DOMAIN, "source", true); + else + m_cfg.setBool(PLUGIN_DOMAIN, "source", false); + break; + } + } if (source == "plugin") { if(!show_emu)