mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-01 00:55:06 +01:00
-changed name to WiiFlow Lite
-renamed some coverflows and domains for easier code reading. making things more uniform.
This commit is contained in:
parent
7bad8c3fd3
commit
86d768c829
@ -1,4 +1,4 @@
|
||||
#define APP_NAME "WiiFlow"
|
||||
#define APP_NAME "WiiFlow Lite"
|
||||
#define APP_VERSION "Beta 4.2.2"
|
||||
|
||||
#define APPDATA_DIR "wiiflow"
|
||||
@ -8,9 +8,9 @@
|
||||
#define GAMES_DIR "%s:/wbfs"
|
||||
#define HOMEBREW_DIR "%s:/apps"
|
||||
#define DML_DIR "%s:/games"
|
||||
#define CFG_FILENAME "wiiflow.ini"
|
||||
#define CFG_FILENAME "wiiflow_lite.ini"
|
||||
#define LANG_FILENAME "languages.ini"
|
||||
#define CAT_FILENAME "categories_v4.ini"
|
||||
#define CAT_FILENAME "categories_lite.ini"
|
||||
#define SOURCE_FILENAME "source_menu.ini"
|
||||
#define TITLES_FILENAME "titles.ini"
|
||||
#define CTITLES_FILENAME "custom_titles.ini"
|
||||
@ -20,10 +20,10 @@
|
||||
#define GAME_SETTINGS2_FILENAME "gameconfig2.ini"
|
||||
#define PLUGIN_CRCS_FILENAME "plugin_crc32.ini"
|
||||
|
||||
#define WII_DOMAIN "GAMES"
|
||||
#define GC_DOMAIN "DML"
|
||||
#define CHANNEL_DOMAIN "NAND"
|
||||
#define PLUGIN_DOMAIN "EMULATOR"
|
||||
#define WII_DOMAIN "WII"
|
||||
#define GC_DOMAIN "GAMECUBE"
|
||||
#define CHANNEL_DOMAIN "CHANNELS"
|
||||
#define PLUGIN_DOMAIN "PLUGINS"
|
||||
#define HOMEBREW_DOMAIN "HOMEBREW"
|
||||
#define MUSIC_DOMAIN "MUSIC"
|
||||
#define FTP_DOMAIN "FTP"
|
||||
|
@ -253,7 +253,7 @@ void ListGenerator::CreateList(u32 Flow, u32 Device, const string& Path, const v
|
||||
}
|
||||
//if(Flow != COVERFLOW_PLUGIN)
|
||||
OpenConfigs();
|
||||
if(Flow == COVERFLOW_USB)
|
||||
if(Flow == COVERFLOW_WII)
|
||||
{
|
||||
if(DeviceHandle.GetFSType(Device) == PART_FS_WBFS)
|
||||
Create_Wii_WBFS_List(DeviceHandle.GetWbfsHandle(Device));
|
||||
@ -267,7 +267,7 @@ void ListGenerator::CreateList(u32 Flow, u32 Device, const string& Path, const v
|
||||
}
|
||||
else if(DeviceHandle.GetFSType(Device) != PART_FS_WBFS)
|
||||
{
|
||||
if(Flow == COVERFLOW_DML)
|
||||
if(Flow == COVERFLOW_GAMECUBE)
|
||||
GetFiles(Path.c_str(), FileTypes, Create_GC_List, true);
|
||||
else if(Flow == COVERFLOW_PLUGIN)
|
||||
GetFiles(Path.c_str(), FileTypes, Create_Plugin_List, false, 30);
|
||||
|
@ -70,7 +70,7 @@ CMenu::CMenu()
|
||||
m_base_font_size = 0;
|
||||
m_wbf1_font = NULL;
|
||||
m_wbf2_font = NULL;
|
||||
m_current_view = COVERFLOW_USB;
|
||||
m_current_view = COVERFLOW_WII;
|
||||
m_Emulator_boot = false;
|
||||
m_music_info = true;
|
||||
m_prevBg = NULL;
|
||||
@ -325,7 +325,7 @@ void CMenu::init()
|
||||
break;
|
||||
}
|
||||
if (DeviceHandle.IsInserted(i)
|
||||
&& ((m_current_view == COVERFLOW_USB && DeviceHandle.GetFSType(i) == PART_FS_WBFS)
|
||||
&& ((m_current_view == COVERFLOW_WII && DeviceHandle.GetFSType(i) == PART_FS_WBFS)
|
||||
|| stat(fmt(checkDir, DeviceName[i]), &dummy) == 0))
|
||||
{
|
||||
gprintf("Setting Emu NAND to Partition: %i\n",currentPartition);
|
||||
@ -2256,10 +2256,10 @@ bool CMenu::_loadList(void)
|
||||
for(vector<dir_discHdr>::iterator tmp_itr = m_gameList.begin(); tmp_itr != m_gameList.end(); tmp_itr++)
|
||||
combinedList.push_back(*tmp_itr);
|
||||
}
|
||||
if((m_current_view == COVERFLOW_USB && !m_cfg.has(WII_DOMAIN, "source")) ||
|
||||
if((m_current_view == COVERFLOW_WII && !m_cfg.has(WII_DOMAIN, "source")) ||
|
||||
m_cfg.getBool(WII_DOMAIN, "source"))
|
||||
{
|
||||
m_current_view = COVERFLOW_USB;
|
||||
m_current_view = COVERFLOW_WII;
|
||||
_loadGameList();
|
||||
if(m_combined_view)
|
||||
for(vector<dir_discHdr>::iterator tmp_itr = m_gameList.begin(); tmp_itr != m_gameList.end(); tmp_itr++)
|
||||
@ -2274,10 +2274,10 @@ bool CMenu::_loadList(void)
|
||||
for(vector<dir_discHdr>::iterator tmp_itr = m_gameList.begin(); tmp_itr != m_gameList.end(); tmp_itr++)
|
||||
combinedList.push_back(*tmp_itr);
|
||||
}
|
||||
if((m_current_view == COVERFLOW_DML && !m_cfg.has(GC_DOMAIN, "source")) ||
|
||||
if((m_current_view == COVERFLOW_GAMECUBE && !m_cfg.has(GC_DOMAIN, "source")) ||
|
||||
m_cfg.getBool(GC_DOMAIN, "source"))
|
||||
{
|
||||
m_current_view = COVERFLOW_DML;
|
||||
m_current_view = COVERFLOW_GAMECUBE;
|
||||
_loadDmlList();
|
||||
if(m_combined_view)
|
||||
for(vector<dir_discHdr>::iterator tmp_itr = m_gameList.begin(); tmp_itr != m_gameList.end(); tmp_itr++)
|
||||
@ -2316,7 +2316,7 @@ bool CMenu::_loadGameList(void)
|
||||
string gameDir(fmt(wii_games_dir, DeviceName[currentPartition]));
|
||||
string cacheDir(fmt("%s/%s_wii.db", m_listCacheDir.c_str(), DeviceName[currentPartition]));
|
||||
bool updateCache = m_cfg.getBool(WII_DOMAIN, "update_cache");
|
||||
m_gameList.CreateList(COVERFLOW_USB, currentPartition, gameDir, stringToVector(".wbfs|.iso", '|'), cacheDir, updateCache);
|
||||
m_gameList.CreateList(COVERFLOW_WII, currentPartition, gameDir, stringToVector(".wbfs|.iso", '|'), cacheDir, updateCache);
|
||||
WBFS_Close();
|
||||
m_cfg.remove(WII_DOMAIN, "update_cache");
|
||||
return true;
|
||||
@ -2347,7 +2347,7 @@ bool CMenu::_loadDmlList()
|
||||
string gameDir(fmt(currentPartition == SD ? DML_DIR : m_DMLgameDir.c_str(), DeviceName[currentPartition]));
|
||||
string cacheDir(fmt("%s/%s_gamecube.db", m_listCacheDir.c_str(), DeviceName[currentPartition]));
|
||||
bool updateCache = m_cfg.getBool(GC_DOMAIN, "update_cache");
|
||||
m_gameList.CreateList(COVERFLOW_DML, currentPartition, gameDir,
|
||||
m_gameList.CreateList(COVERFLOW_GAMECUBE, currentPartition, gameDir,
|
||||
stringToVector(".iso|root", '|'),cacheDir, updateCache);
|
||||
m_cfg.remove(GC_DOMAIN, "update_cache");
|
||||
return true;
|
||||
@ -2381,10 +2381,9 @@ bool CMenu::_loadEmuList()
|
||||
if(m_plugin_cfg.loaded())
|
||||
{
|
||||
m_plugin.AddPlugin(m_plugin_cfg);
|
||||
const char *MagicNumber = m_plugin_cfg.getString(PLUGIN_INI_DEF,"magic").c_str();
|
||||
if(!m_cfg.getBool("PLUGIN", MagicNumber, false))
|
||||
u32 MagicWord = strtoul(m_plugin_cfg.getString(PLUGIN_INI_DEF,"magic").c_str(), NULL, 16);
|
||||
if(!m_plugin.GetEnableStatus(m_cfg, MagicWord))
|
||||
continue;
|
||||
u32 MagicWord = strtoul(MagicNumber, NULL, 16);
|
||||
if(m_plugin_cfg.getString(PLUGIN_INI_DEF,"romDir").find("scummvm.ini") == string::npos)
|
||||
{
|
||||
string gameDir(fmt("%s:/%s", DeviceName[currentPartition], m_plugin_cfg.getString(PLUGIN_INI_DEF,"romDir").c_str()));
|
||||
@ -2616,7 +2615,7 @@ const char *CMenu::_domainFromView()
|
||||
return CHANNEL_DOMAIN;
|
||||
case COVERFLOW_HOMEBREW:
|
||||
return HOMEBREW_DOMAIN;
|
||||
case COVERFLOW_DML:
|
||||
case COVERFLOW_GAMECUBE:
|
||||
return GC_DOMAIN;
|
||||
case COVERFLOW_PLUGIN:
|
||||
return PLUGIN_DOMAIN;
|
||||
@ -2630,9 +2629,9 @@ void CMenu::UpdateCache(u32 view)
|
||||
{
|
||||
if(view == COVERFLOW_MAX)
|
||||
{
|
||||
UpdateCache(COVERFLOW_USB);
|
||||
UpdateCache(COVERFLOW_WII);
|
||||
UpdateCache(COVERFLOW_HOMEBREW);
|
||||
UpdateCache(COVERFLOW_DML);
|
||||
UpdateCache(COVERFLOW_GAMECUBE);
|
||||
UpdateCache(COVERFLOW_PLUGIN);
|
||||
UpdateCache(COVERFLOW_CHANNEL);
|
||||
return;
|
||||
@ -2645,7 +2644,7 @@ void CMenu::UpdateCache(u32 view)
|
||||
case COVERFLOW_HOMEBREW:
|
||||
m_cfg.setBool(HOMEBREW_DOMAIN, "update_cache", true);
|
||||
break;
|
||||
case COVERFLOW_DML:
|
||||
case COVERFLOW_GAMECUBE:
|
||||
m_cfg.setBool(GC_DOMAIN, "update_cache", true);
|
||||
break;
|
||||
case COVERFLOW_PLUGIN:
|
||||
|
@ -115,16 +115,16 @@ void CMenu::_getIDCats(void)
|
||||
switch(hdr->type)
|
||||
{
|
||||
case TYPE_CHANNEL:
|
||||
catDomain = "NAND";
|
||||
catDomain = "CHANNELS";
|
||||
break;
|
||||
case TYPE_HOMEBREW:
|
||||
catDomain = "HOMEBREW";
|
||||
break;
|
||||
case TYPE_GC_GAME:
|
||||
catDomain = "DML";
|
||||
catDomain = "GAMECUBE";
|
||||
break;
|
||||
case TYPE_WII_GAME:
|
||||
catDomain = "GAMES";
|
||||
catDomain = "WII";
|
||||
break;
|
||||
default:
|
||||
catDomain = (m_plugin.GetPluginName(m_plugin.GetPluginPosition(hdr->settings[0]))).toUTF8();
|
||||
|
@ -12,7 +12,7 @@ void CMenu::_hideConfig3(bool instant)
|
||||
{
|
||||
_hideConfigCommon(instant);
|
||||
|
||||
if(m_current_view != COVERFLOW_DML)
|
||||
if(m_current_view != COVERFLOW_GAMECUBE)
|
||||
{
|
||||
m_btnMgr.hide(m_config3LblGameLanguage, instant);
|
||||
m_btnMgr.hide(m_config3LblLanguage, instant);
|
||||
@ -49,7 +49,7 @@ void CMenu::_showConfig3(void)
|
||||
{
|
||||
_showConfigCommon(m_config3Bg, g_curPage);
|
||||
|
||||
if(m_current_view != COVERFLOW_DML)
|
||||
if(m_current_view != COVERFLOW_GAMECUBE)
|
||||
{
|
||||
m_btnMgr.show(m_config3LblGameLanguage);
|
||||
m_btnMgr.show(m_config3LblLanguage);
|
||||
@ -84,7 +84,7 @@ void CMenu::_showConfig3(void)
|
||||
|
||||
int i;
|
||||
|
||||
if(m_current_view != COVERFLOW_DML)
|
||||
if(m_current_view != COVERFLOW_GAMECUBE)
|
||||
{
|
||||
i = min(max(0, m_cfg.getInt("GENERAL", "video_mode", 0)), (int)ARRAY_SIZE(CMenu::_GlobalVideoModes) - 1);
|
||||
m_btnMgr.setText(m_config3LblVideo, _t(CMenu::_GlobalVideoModes[i].id, CMenu::_GlobalVideoModes[i].text));
|
||||
|
@ -67,7 +67,7 @@ start_main:
|
||||
|
||||
switch(m_current_view)
|
||||
{
|
||||
case COVERFLOW_DML:
|
||||
case COVERFLOW_GAMECUBE:
|
||||
if(show_channel)
|
||||
m_btnMgr.show(m_mainBtnChannel);
|
||||
else if(show_emu)
|
||||
@ -117,8 +117,8 @@ start_main:
|
||||
{
|
||||
switch(m_current_view)
|
||||
{
|
||||
case COVERFLOW_USB:
|
||||
case COVERFLOW_DML:
|
||||
case COVERFLOW_WII:
|
||||
case COVERFLOW_GAMECUBE:
|
||||
m_btnMgr.setText(m_mainLblInit, _t("main2", L"Welcome to WiiFlow. I have not found any games. Click Install to install games, or Select partition to select your partition type."));
|
||||
m_btnMgr.show(m_mainBtnInit);
|
||||
m_btnMgr.show(m_mainBtnInit2);
|
||||
@ -354,9 +354,9 @@ int CMenu::main(void)
|
||||
{
|
||||
u8 lastView = m_current_view;
|
||||
if(BTN_UP_PRESSED)
|
||||
m_current_view = COVERFLOW_USB;
|
||||
m_current_view = COVERFLOW_WII;
|
||||
else if(BTN_DOWN_PRESSED && (m_show_dml || m_devo_installed || m_nintendont_installed))
|
||||
m_current_view = COVERFLOW_DML;
|
||||
m_current_view = COVERFLOW_GAMECUBE;
|
||||
else if(BTN_LEFT_PRESSED && show_emu)
|
||||
m_current_view = COVERFLOW_PLUGIN;
|
||||
else if(BTN_RIGHT_PRESSED && show_channel)
|
||||
@ -366,10 +366,10 @@ int CMenu::main(void)
|
||||
_clearSources();
|
||||
switch(m_current_view)
|
||||
{
|
||||
case COVERFLOW_USB:
|
||||
case COVERFLOW_WII:
|
||||
m_cfg.setBool(WII_DOMAIN, "source", true);
|
||||
break;
|
||||
case COVERFLOW_DML:
|
||||
case COVERFLOW_GAMECUBE:
|
||||
m_cfg.setBool(GC_DOMAIN, "source", true);
|
||||
break;
|
||||
case COVERFLOW_CHANNEL:
|
||||
@ -412,25 +412,25 @@ int CMenu::main(void)
|
||||
}
|
||||
else if(m_btnMgr.selected(m_mainBtnChannel) || m_btnMgr.selected(m_mainBtnUsb) || m_btnMgr.selected(m_mainBtnDML) || m_btnMgr.selected(m_mainBtnHomebrew) || m_btnMgr.selected(m_mainBtnEmu))
|
||||
{
|
||||
if(m_current_view == COVERFLOW_USB)
|
||||
m_current_view = (m_show_dml || m_devo_installed || m_nintendont_installed) ? COVERFLOW_DML :
|
||||
if(m_current_view == COVERFLOW_WII)
|
||||
m_current_view = (m_show_dml || m_devo_installed || m_nintendont_installed) ? COVERFLOW_GAMECUBE :
|
||||
(show_channel ? COVERFLOW_CHANNEL : (show_emu ? COVERFLOW_PLUGIN :
|
||||
((show_homebrew && (parental_homebrew || !m_locked)) ? COVERFLOW_HOMEBREW : COVERFLOW_USB)));
|
||||
else if(m_current_view == COVERFLOW_DML)
|
||||
m_current_view = show_channel ? COVERFLOW_CHANNEL : ((show_emu ? COVERFLOW_PLUGIN : (show_homebrew && (parental_homebrew || !m_locked)) ? COVERFLOW_HOMEBREW : COVERFLOW_USB));
|
||||
((show_homebrew && (parental_homebrew || !m_locked)) ? COVERFLOW_HOMEBREW : COVERFLOW_WII)));
|
||||
else if(m_current_view == COVERFLOW_GAMECUBE)
|
||||
m_current_view = show_channel ? COVERFLOW_CHANNEL : ((show_emu ? COVERFLOW_PLUGIN : (show_homebrew && (parental_homebrew || !m_locked)) ? COVERFLOW_HOMEBREW : COVERFLOW_WII));
|
||||
else if(m_current_view == COVERFLOW_CHANNEL)
|
||||
m_current_view = (show_emu ? COVERFLOW_PLUGIN : (show_homebrew && (parental_homebrew || !m_locked)) ? COVERFLOW_HOMEBREW : COVERFLOW_USB);
|
||||
m_current_view = (show_emu ? COVERFLOW_PLUGIN : (show_homebrew && (parental_homebrew || !m_locked)) ? COVERFLOW_HOMEBREW : COVERFLOW_WII);
|
||||
else if(m_current_view == COVERFLOW_PLUGIN)
|
||||
m_current_view = (show_homebrew && (parental_homebrew || !m_locked)) ? COVERFLOW_HOMEBREW : COVERFLOW_USB;
|
||||
m_current_view = (show_homebrew && (parental_homebrew || !m_locked)) ? COVERFLOW_HOMEBREW : COVERFLOW_WII;
|
||||
else if(m_current_view == COVERFLOW_HOMEBREW || m_current_view == COVERFLOW_MAX)
|
||||
m_current_view = COVERFLOW_USB;
|
||||
m_current_view = COVERFLOW_WII;
|
||||
_clearSources();
|
||||
switch(m_current_view)
|
||||
{
|
||||
case COVERFLOW_USB:
|
||||
case COVERFLOW_WII:
|
||||
m_cfg.setBool(WII_DOMAIN, "source", true);
|
||||
break;
|
||||
case COVERFLOW_DML:
|
||||
case COVERFLOW_GAMECUBE:
|
||||
m_cfg.setBool(GC_DOMAIN, "source", true);
|
||||
break;
|
||||
case COVERFLOW_CHANNEL:
|
||||
@ -829,7 +829,7 @@ int CMenu::main(void)
|
||||
{
|
||||
switch(m_current_view)
|
||||
{
|
||||
case COVERFLOW_DML:
|
||||
case COVERFLOW_GAMECUBE:
|
||||
if(show_channel)
|
||||
m_btnMgr.show(m_mainBtnChannel);
|
||||
else if(show_emu)
|
||||
@ -1186,7 +1186,7 @@ void CMenu::_setPartition(s8 direction)
|
||||
m_cfg.setBool(CHANNEL_DOMAIN, "disable", false);
|
||||
switch_to_real = false;
|
||||
}
|
||||
bool NeedFAT = m_current_view == COVERFLOW_CHANNEL || m_current_view == COVERFLOW_DML;
|
||||
bool NeedFAT = m_current_view == COVERFLOW_CHANNEL || m_current_view == COVERFLOW_GAMECUBE;
|
||||
|
||||
u8 limiter = 0;
|
||||
do
|
||||
@ -1198,7 +1198,7 @@ void CMenu::_setPartition(s8 direction)
|
||||
limiter++;
|
||||
}
|
||||
while(limiter < 12 && (!DeviceHandle.IsInserted(currentPartition) ||
|
||||
(m_current_view != COVERFLOW_USB && FS_Type == PART_FS_WBFS) ||
|
||||
(m_current_view != COVERFLOW_WII && FS_Type == PART_FS_WBFS) ||
|
||||
(NeedFAT && FS_Type != PART_FS_FAT)));
|
||||
|
||||
if(m_current_view == COVERFLOW_CHANNEL && FS_Type == -1)
|
||||
@ -1226,7 +1226,7 @@ void CMenu::_setPartition(s8 direction)
|
||||
char PluginMagicWord[9];
|
||||
memset(PluginMagicWord, 0, sizeof(PluginMagicWord));
|
||||
strncpy(PluginMagicWord, fmt("%08x", m_plugin.getPluginMagic(i)), 8);
|
||||
m_cfg.setInt("PLUGINS/PARTITION", PluginMagicWord, currentPartition);
|
||||
m_cfg.setInt("PLUGINS_PARTITION", PluginMagicWord, currentPartition);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ int CMenu::_FindEmuPart(string &emuPath, bool skipchecks)
|
||||
m_cfg.setString(CHANNEL_DOMAIN, "path", STDEMU_DIR);
|
||||
}
|
||||
}
|
||||
else if(m_current_view == COVERFLOW_USB)
|
||||
else if(m_current_view == COVERFLOW_WII)
|
||||
{
|
||||
emuPart = m_cfg.getInt(WII_DOMAIN, "savepartition", -1);
|
||||
if(emuPart == -1)
|
||||
@ -241,7 +241,7 @@ void CMenu::_showNandEmu(void)
|
||||
if(nandemuPage == 1)
|
||||
{
|
||||
int i;
|
||||
if(((m_current_view == COVERFLOW_CHANNEL && !m_cfg.getBool(CHANNEL_DOMAIN, "disable", true)) || m_current_view == COVERFLOW_USB))
|
||||
if(((m_current_view == COVERFLOW_CHANNEL && !m_cfg.getBool(CHANNEL_DOMAIN, "disable", true)) || m_current_view == COVERFLOW_WII))
|
||||
{
|
||||
m_btnMgr.show(m_nandemuLblEmulation);
|
||||
m_btnMgr.show(m_nandemuLblEmulationVal);
|
||||
@ -249,7 +249,7 @@ void CMenu::_showNandEmu(void)
|
||||
m_btnMgr.show(m_nandemuBtnEmulationM);
|
||||
}
|
||||
|
||||
if((m_current_view == COVERFLOW_CHANNEL || m_current_view == COVERFLOW_USB))
|
||||
if((m_current_view == COVERFLOW_CHANNEL || m_current_view == COVERFLOW_WII))
|
||||
{
|
||||
m_btnMgr.show(m_nandemuLblSaveDump);
|
||||
m_btnMgr.show(m_nandemuBtnAll);
|
||||
@ -261,7 +261,7 @@ void CMenu::_showNandEmu(void)
|
||||
i = min(max(0, m_cfg.getInt(CHANNEL_DOMAIN, "emulation", 0)), (int)ARRAY_SIZE(CMenu::_NandEmu) - 1);
|
||||
m_btnMgr.setText(m_nandemuLblEmulationVal, _t(CMenu::_NandEmu[i].id, CMenu::_NandEmu[i].text));
|
||||
}
|
||||
else if (m_current_view == COVERFLOW_USB)
|
||||
else if (m_current_view == COVERFLOW_WII)
|
||||
{
|
||||
i = min(max(0, m_cfg.getInt(WII_DOMAIN, "save_emulation", 0)), (int)ARRAY_SIZE(CMenu::_GlobalSaveEmu) - 1);
|
||||
m_btnMgr.setText(m_nandemuLblEmulationVal, _t(CMenu::_GlobalSaveEmu[i].id, CMenu::_GlobalSaveEmu[i].text));
|
||||
@ -375,7 +375,7 @@ int CMenu::_NandEmuCfg(void)
|
||||
s8 direction = m_btnMgr.selected(m_nandemuBtnEmulationP) ? 1 : -1;
|
||||
if(m_current_view == COVERFLOW_CHANNEL)
|
||||
m_cfg.setInt(CHANNEL_DOMAIN, "emulation", (int)loopNum((u32)m_cfg.getInt(CHANNEL_DOMAIN, "emulation", 0) + direction, ARRAY_SIZE(CMenu::_NandEmu)));
|
||||
else if(m_current_view == COVERFLOW_USB)
|
||||
else if(m_current_view == COVERFLOW_WII)
|
||||
m_cfg.setInt(WII_DOMAIN, "save_emulation", (int)loopNum((u32)m_cfg.getInt(WII_DOMAIN, "save_emulation", 0) + direction, ARRAY_SIZE(CMenu::_GlobalSaveEmu)));
|
||||
_showNandEmu();
|
||||
}
|
||||
@ -459,7 +459,7 @@ int CMenu::_NandEmuCfg(void)
|
||||
{
|
||||
_hideNandEmu(true);
|
||||
u8 tmpView = m_current_view;
|
||||
m_current_view = COVERFLOW_USB;
|
||||
m_current_view = COVERFLOW_WII;
|
||||
string emuPath;
|
||||
_FindEmuPart(emuPath, true);
|
||||
path = _FolderExplorer(NandHandle.GetPath());
|
||||
@ -804,7 +804,7 @@ int CMenu::_AutoCreateNand(void)
|
||||
}
|
||||
else if(m_btnMgr.selected(m_nandemuBtnPartition))
|
||||
{
|
||||
if(m_current_view == COVERFLOW_USB)
|
||||
if(m_current_view == COVERFLOW_WII)
|
||||
{
|
||||
m_tempView = true;
|
||||
m_current_view = COVERFLOW_CHANNEL;
|
||||
@ -813,7 +813,7 @@ int CMenu::_AutoCreateNand(void)
|
||||
_config(1);
|
||||
if(m_tempView)
|
||||
{
|
||||
m_current_view = COVERFLOW_USB;
|
||||
m_current_view = COVERFLOW_WII;
|
||||
m_tempView = false;
|
||||
return 0;
|
||||
}
|
||||
|
@ -113,7 +113,8 @@ void CMenu::_updateSourceBtns(void)
|
||||
{
|
||||
magicNums.clear();
|
||||
magicNums = m_source.getStrings(fmt("BUTTON_%i", i), "magic", ',');
|
||||
if(m_cfg.getBool(PLUGIN_DOMAIN, "source", false) && m_cfg.getBool("PLUGIN", magicNums.at(0), false))
|
||||
u32 magic = strtoul(magicNums.at(0).c_str(), NULL, 16);
|
||||
if(m_cfg.getBool(PLUGIN_DOMAIN, "source", false) && m_plugin.GetEnableStatus(m_cfg, magic))
|
||||
{
|
||||
sourceBtn = i;
|
||||
selectedBtns++;
|
||||
@ -256,13 +257,13 @@ void CMenu::_sourceFlow()
|
||||
_clearSources();
|
||||
if(source == "wii")
|
||||
{
|
||||
m_current_view = COVERFLOW_USB;
|
||||
m_current_view = COVERFLOW_WII;
|
||||
m_cfg.setBool(WII_DOMAIN, "source", true);
|
||||
m_catStartPage = m_source.getInt(btn_selected, "cat_page", 1);
|
||||
}
|
||||
else if(source == "dml")
|
||||
{
|
||||
m_current_view = COVERFLOW_DML;
|
||||
m_current_view = COVERFLOW_GAMECUBE;
|
||||
m_cfg.setBool(GC_DOMAIN, "source", true);
|
||||
m_catStartPage = m_source.getInt(btn_selected, "cat_page", 1);
|
||||
}
|
||||
@ -312,7 +313,7 @@ void CMenu::_sourceFlow()
|
||||
m_plugin.SetEnablePlugin(m_cfg, exist, 2);
|
||||
if(plugin_magic_nums == 1)
|
||||
{
|
||||
currentPartition = m_cfg.getInt("PLUGINS/PARTITION", itr->c_str(), 1);
|
||||
currentPartition = m_cfg.getInt("PLUGINS_PARTITION", itr->c_str(), 1);
|
||||
m_cfg.setInt(PLUGIN_DOMAIN, "partition", currentPartition);
|
||||
}
|
||||
}
|
||||
@ -476,7 +477,7 @@ bool CMenu::_Source()
|
||||
char PluginMagicWord[9];
|
||||
memset(PluginMagicWord, 0, sizeof(PluginMagicWord));
|
||||
strncpy(PluginMagicWord, fmt("%08x", m_plugin.getPluginMagic(i)), 8);
|
||||
currentPartition = m_cfg.getInt("PLUGINS/PARTITION", PluginMagicWord, 1);
|
||||
currentPartition = m_cfg.getInt("PLUGINS_PARTITION", PluginMagicWord, 1);
|
||||
m_cfg.setInt(PLUGIN_DOMAIN, "partition", currentPartition);
|
||||
}
|
||||
u8 sourceCount = 0;
|
||||
@ -669,7 +670,7 @@ bool CMenu::_Source()
|
||||
m_plugin.SetEnablePlugin(m_cfg, exist, 2);
|
||||
if(plugin_magic_nums == 1)
|
||||
{
|
||||
currentPartition = m_cfg.getInt("PLUGINS/PARTITION", itr->c_str(), 1);
|
||||
currentPartition = m_cfg.getInt("PLUGINS_PARTITION", itr->c_str(), 1);
|
||||
m_cfg.setInt(PLUGIN_DOMAIN, "partition", currentPartition);
|
||||
}
|
||||
}
|
||||
|
@ -511,9 +511,9 @@ bool CMenu::_wbfsOp(CMenu::WBFS_OP op)
|
||||
//m_gameList.SetLanguage(m_loc.getString(m_curLanguage, "gametdb_code", "EN").c_str());
|
||||
_showWaitMessage();
|
||||
if(upd_dml)
|
||||
UpdateCache(COVERFLOW_DML);
|
||||
UpdateCache(COVERFLOW_GAMECUBE);
|
||||
if(upd_usb)
|
||||
UpdateCache(COVERFLOW_USB);
|
||||
UpdateCache(COVERFLOW_WII);
|
||||
if(upd_emu)
|
||||
UpdateCache(COVERFLOW_PLUGIN);
|
||||
if(upd_chan)
|
||||
@ -531,9 +531,9 @@ bool CMenu::_wbfsOp(CMenu::WBFS_OP op)
|
||||
{
|
||||
if(done && op == WO_COPY_GAME)
|
||||
{
|
||||
UpdateCache(COVERFLOW_DML);
|
||||
UpdateCache(COVERFLOW_GAMECUBE);
|
||||
currentPartition = SD;
|
||||
UpdateCache(COVERFLOW_DML);
|
||||
UpdateCache(COVERFLOW_GAMECUBE);
|
||||
}
|
||||
_loadList();
|
||||
_initCF();
|
||||
|
@ -145,11 +145,11 @@ void Plugin::SetEnablePlugin(Config &cfg, u8 pos, u8 ForceMode)
|
||||
{
|
||||
strncpy(PluginMagicWord, fmt("%08x", Plugins[pos].magicWord), 8);
|
||||
if(ForceMode == 1)
|
||||
cfg.setBool(PLUGIN_INI_DEF, PluginMagicWord, false);
|
||||
cfg.setBool(PLUGIN_ENABLED, PluginMagicWord, false);
|
||||
else if(ForceMode == 2)
|
||||
cfg.setBool(PLUGIN_INI_DEF, PluginMagicWord, true);
|
||||
cfg.setBool(PLUGIN_ENABLED, PluginMagicWord, true);
|
||||
else
|
||||
cfg.setBool(PLUGIN_INI_DEF, PluginMagicWord, cfg.getBool(PLUGIN_INI_DEF, PluginMagicWord) ? false : true);
|
||||
cfg.setBool(PLUGIN_ENABLED, PluginMagicWord, cfg.getBool(PLUGIN_ENABLED, PluginMagicWord) ? false : true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -158,7 +158,7 @@ bool Plugin::GetEnableStatus(Config &cfg, u32 magic)
|
||||
if((Plugin_Pos = GetPluginPosition(magic)) >= 0)
|
||||
{
|
||||
strncpy(PluginMagicWord, fmt("%08x", magic), 8);
|
||||
return cfg.getBool(PLUGIN_INI_DEF, PluginMagicWord, true);
|
||||
return cfg.getBool(PLUGIN_ENABLED, PluginMagicWord, true);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -170,7 +170,7 @@ const vector<bool> &Plugin::GetEnabledPlugins(Config &cfg, u8 *num)
|
||||
for(u8 i = 0; i < Plugins.size(); i++)
|
||||
{
|
||||
strncpy(PluginMagicWord, fmt("%08x", Plugins[i].magicWord), 8);
|
||||
if(cfg.getBool(PLUGIN_INI_DEF, PluginMagicWord, true))
|
||||
if(cfg.getBool(PLUGIN_ENABLED, PluginMagicWord, true))
|
||||
{
|
||||
enabledPluginsNumber++;
|
||||
enabledPlugins.push_back(true);
|
||||
|
@ -32,6 +32,7 @@ using namespace std;
|
||||
#define TAG_CONSOLE "{console}"
|
||||
|
||||
#define PLUGIN_INI_DEF "PLUGIN"
|
||||
#define PLUGIN_ENABLED "PLUGINS_ENABLED"
|
||||
#define PLUGIN_DEV "{device}"
|
||||
#define PLUGIN_PATH "{path}"
|
||||
#define PLUGIN_NAME "{name}"
|
||||
|
@ -7,8 +7,8 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
enum {
|
||||
COVERFLOW_USB = 0,
|
||||
COVERFLOW_DML,
|
||||
COVERFLOW_WII = 0,
|
||||
COVERFLOW_GAMECUBE,
|
||||
COVERFLOW_CHANNEL,
|
||||
COVERFLOW_PLUGIN,
|
||||
COVERFLOW_HOMEBREW,
|
||||
|
Loading…
Reference in New Issue
Block a user