-removed the press b on channel icon to switch to emu nand and back,

this is now done on the fly by just selecting NAND as partition, of
course this function is still completely disabled for neek users ;)
-removed the ios and force cios load options from the ini so they
are only settable in the wiiflow startup menu from now on, that
should stop wiiflow with mixing up ini and nand save options
-added a ini option to disable the source menu, use_source (enabled
by default)
-finally added a "Back" button to the startup menu
This commit is contained in:
fix94.1 2013-04-08 21:45:13 +00:00
parent d6af74fb15
commit fac9452af2
8 changed files with 140 additions and 125 deletions

View File

@ -37,6 +37,7 @@
#include "gecko/gecko.hpp" #include "gecko/gecko.hpp"
#include "gui/text.hpp" #include "gui/text.hpp"
#include "loader/fs.h" #include "loader/fs.h"
#include "loader/nk.h"
#include "loader/sys.h" #include "loader/sys.h"
#include "memory/mem2.hpp" #include "memory/mem2.hpp"
#include "wstringEx/wstringEx.hpp" #include "wstringEx/wstringEx.hpp"
@ -187,7 +188,7 @@ void Channels::Search()
{ {
u32 count; u32 count;
u64 *list = NULL; u64 *list = NULL;
if(NANDemuView) if(!neek2o() && NANDemuView)
list = NandHandle.GetChannels(&count); list = NandHandle.GetChannels(&count);
else else
list = GetChannelList(&count); list = GetChannelList(&count);

View File

@ -28,6 +28,8 @@ extern const u8 save_bin[];
extern const u32 save_bin_size; extern const u32 save_bin_size;
NandSave InternalSave; NandSave InternalSave;
bool cur_load = false;
u8 cur_ios = 0;
#define BANNER_PATH "/title/00010000/57465346/data/banner.bin" #define BANNER_PATH "/title/00010000/57465346/data/banner.bin"
#define IOS_SAVE_PATH "/title/00010000/57465346/data/ios" #define IOS_SAVE_PATH "/title/00010000/57465346/data/ios"
@ -161,9 +163,11 @@ void NandSave::LoadSettings()
if(file != NULL && size == sizeof(ios_settings_t)) if(file != NULL && size == sizeof(ios_settings_t))
{ {
gprintf("Loading IOS Settings from NAND\n"); gprintf("Loading IOS Settings from NAND\n");
if(file->cios > 0) cur_ios = file->cios;
mainIOS = file->cios; if(cur_ios > 0)
useMainIOS = file->use_cios; mainIOS = cur_ios;
cur_load = file->use_cios;
useMainIOS = cur_load;
} }
if(file != NULL) if(file != NULL)
free(file); free(file);
@ -179,13 +183,13 @@ void NandSave::LoadSettings()
free(port); free(port);
} }
void NandSave::SaveIOS(u8 ios, bool use_ios) void NandSave::SaveIOS()
{ {
if(loaded == false) if(loaded == false)
return; return;
memset(&ios_settings, 0, sizeof(ios_settings_t)); memset(&ios_settings, 0, sizeof(ios_settings_t));
ios_settings.cios = ios; ios_settings.cios = cur_ios;
ios_settings.use_cios = use_ios; ios_settings.use_cios = cur_load;
gprintf("Saving IOS Settings to NAND\n"); gprintf("Saving IOS Settings to NAND\n");
WriteFile(IOS_SAVE_PATH, (u8*)&ios_settings, sizeof(ios_settings_t)); WriteFile(IOS_SAVE_PATH, (u8*)&ios_settings, sizeof(ios_settings_t));
} }

View File

@ -31,7 +31,7 @@ public:
NandSave(); NandSave();
bool CheckSave(); bool CheckSave();
void LoadSettings(); void LoadSettings();
void SaveIOS(u8 ios, bool use_ios); void SaveIOS();
void SavePort(u8 port); void SavePort(u8 port);
private: private:
void WriteFile(const char *file_name, u8 *content, u32 size); void WriteFile(const char *file_name, u8 *content, u32 size);
@ -43,5 +43,7 @@ private:
}; };
extern NandSave InternalSave; extern NandSave InternalSave;
extern bool cur_load;
extern u8 cur_ios;
#endif #endif

View File

@ -125,6 +125,7 @@ CMenu::CMenu()
m_use_sd_logging = false; m_use_sd_logging = false;
m_use_wifi_gecko = false; m_use_wifi_gecko = false;
init_network = false; init_network = false;
m_use_source = true;
} }
void CMenu::init() void CMenu::init()
@ -192,18 +193,6 @@ void CMenu::init()
/* Init Network if wanted */ /* Init Network if wanted */
init_network = (m_cfg.getBool("GENERAL", "async_network") || has_enabled_providers() || m_use_wifi_gecko); init_network = (m_cfg.getBool("GENERAL", "async_network") || has_enabled_providers() || m_use_wifi_gecko);
_netInit(); _netInit();
/* Check if we want a cIOS loaded */
u8 prevCios = mainIOS;
bool prevForceCIOS = useMainIOS;
u8 ForceIOS = min(m_cfg.getInt("GENERAL", "force_cios_rev", 0), 254);
if(ForceIOS > 0 && mainIOS != ForceIOS)
{
gprintf("Using IOS%i instead of IOS%i as main cIOS.\n", ForceIOS, mainIOS);
mainIOS = ForceIOS;
}
useMainIOS = m_cfg.getBool("GENERAL", "force_cios_load", false);
if(prevCios != mainIOS || prevForceCIOS != useMainIOS)
InternalSave.SaveIOS(mainIOS, useMainIOS);
/* Our Wii game dir */ /* Our Wii game dir */
memset(wii_games_dir, 0, 64); memset(wii_games_dir, 0, 64);
strncpy(wii_games_dir, m_cfg.getString("GENERAL", "wii_games_dir", GAMES_DIR).c_str(), 64); strncpy(wii_games_dir, m_cfg.getString("GENERAL", "wii_games_dir", GAMES_DIR).c_str(), 64);

View File

@ -82,6 +82,7 @@ private:
bool m_locked; bool m_locked;
bool m_favorites; bool m_favorites;
bool m_music_info; bool m_music_info;
bool m_use_source;
s16 m_showtimer; s16 m_showtimer;
string m_curLanguage; string m_curLanguage;
@ -875,7 +876,7 @@ private:
void _textExitTo(void); void _textExitTo(void);
void _textBoot(void); void _textBoot(void);
// //
void _refreshBoot(u8 port = 0); void _refreshBoot();
// //
void _hideCheatSettings(bool instant = false); void _hideCheatSettings(bool instant = false);
void _hideError(bool instant = false); void _hideError(bool instant = false);

View File

@ -31,6 +31,10 @@ s16 m_bootLblCIOSrevP;
s16 m_bootLblUSBPort; s16 m_bootLblUSBPort;
s16 m_bootBtnUSBPort; s16 m_bootBtnUSBPort;
s16 m_bootBtnBack;
u8 set_port = 0;
static void showBoot(void) static void showBoot(void)
{ {
m_btnMgr.show(m_bootLblTitle); m_btnMgr.show(m_bootLblTitle);
@ -44,6 +48,8 @@ static void showBoot(void)
m_btnMgr.show(m_bootLblUSBPort); m_btnMgr.show(m_bootLblUSBPort);
m_btnMgr.show(m_bootBtnUSBPort); m_btnMgr.show(m_bootBtnUSBPort);
m_btnMgr.show(m_bootBtnBack);
} }
static void hideBoot(bool instant) static void hideBoot(bool instant)
@ -59,15 +65,17 @@ static void hideBoot(bool instant)
m_btnMgr.hide(m_bootLblUSBPort, instant); m_btnMgr.hide(m_bootLblUSBPort, instant);
m_btnMgr.hide(m_bootBtnUSBPort, instant); m_btnMgr.hide(m_bootBtnUSBPort, instant);
m_btnMgr.hide(m_bootBtnBack, instant);
} }
bool CMenu::_Boot(void) bool CMenu::_Boot(void)
{ {
SetupInput(); SetupInput();
u8 port = currentPort; set_port = currentPort;
bool prev_load = m_cfg.getBool("GENERAL", "force_cios_load", false); bool prev_load = cur_load;
u8 prev_ios = min(m_cfg.getInt("GENERAL", "force_cios_rev", 0), 254); u8 prev_ios = cur_ios;
_refreshBoot(port); _refreshBoot();
while(!m_exit) while(!m_exit)
{ {
@ -76,16 +84,17 @@ bool CMenu::_Boot(void)
break; break;
else if(BTN_A_PRESSED) else if(BTN_A_PRESSED)
{ {
if(m_btnMgr.selected(m_bootBtnLoadCIOS)) if(m_btnMgr.selected(m_bootBtnBack))
break;
else if(m_btnMgr.selected(m_bootBtnLoadCIOS))
{ {
bool old = m_cfg.getBool("GENERAL", "force_cios_load", false); cur_load = !cur_load;
m_cfg.setBool("GENERAL", "force_cios_load", !old); _refreshBoot();
_refreshBoot(port);
} }
else if(m_btnMgr.selected(m_bootLblCIOSrevM) || m_btnMgr.selected(m_bootLblCIOSrevP)) else if(m_btnMgr.selected(m_bootLblCIOSrevM) || m_btnMgr.selected(m_bootLblCIOSrevP))
{ {
bool increase = m_btnMgr.selected(m_bootLblCIOSrevP); bool increase = m_btnMgr.selected(m_bootLblCIOSrevP);
CIOSItr itr = _installed_cios.find(min(m_cfg.getInt("GENERAL", "force_cios_rev", 0), 254)); CIOSItr itr = _installed_cios.find(cur_ios);
if(increase) if(increase)
{ {
itr++; itr++;
@ -98,25 +107,23 @@ bool CMenu::_Boot(void)
itr = _installed_cios.end(); itr = _installed_cios.end();
itr--; itr--;
} }
m_cfg.setInt("GENERAL", "force_cios_rev", itr->first); cur_ios = itr->first;
_refreshBoot(port); _refreshBoot();
} }
else if(m_btnMgr.selected(m_bootBtnUSBPort)) else if(m_btnMgr.selected(m_bootBtnUSBPort))
{ {
port = (port == 0 ? 1 : 0); set_port = !set_port;
_refreshBoot(port); _refreshBoot();
} }
} }
} }
bool cur_load = m_cfg.getBool("GENERAL", "force_cios_load", false);
u8 cur_ios = min(m_cfg.getInt("GENERAL", "force_cios_rev", 0), 254);
if(prev_load != cur_load || prev_ios != cur_ios) if(prev_load != cur_load || prev_ios != cur_ios)
InternalSave.SaveIOS(cur_ios, cur_load); InternalSave.SaveIOS();
if(port != currentPort) if(set_port != currentPort)
InternalSave.SavePort(port); InternalSave.SavePort(set_port);
hideBoot(false); hideBoot(false);
if(prev_load != cur_load || prev_ios != cur_ios || port != currentPort) if(prev_load != cur_load || prev_ios != cur_ios || set_port != currentPort)
{ {
m_exit = true; m_exit = true;
m_reload = true; m_reload = true;
@ -125,13 +132,12 @@ bool CMenu::_Boot(void)
return 0; return 0;
} }
void CMenu::_refreshBoot(u8 port) void CMenu::_refreshBoot()
{ {
m_btnMgr.setText(m_bootBtnLoadCIOS, _optBoolToString(m_cfg.getBool("GENERAL", "force_cios_load", false))); m_btnMgr.setText(m_bootBtnLoadCIOS, _optBoolToString(cur_load));
m_btnMgr.setText(m_bootBtnUSBPort, wfmt(L"%i", port)); m_btnMgr.setText(m_bootBtnUSBPort, wfmt(L"%i", set_port));
u8 IOS_Revision = min(m_cfg.getInt("GENERAL", "force_cios_rev", 0), 254); if(cur_ios > 0)
if(IOS_Revision > 0) m_btnMgr.setText(m_bootLblCurCIOSrev, wfmt(L"%i", cur_ios));
m_btnMgr.setText(m_bootLblCurCIOSrev, wfmt(L"%i", IOS_Revision));
else else
m_btnMgr.setText(m_bootLblCurCIOSrev, L"AUTO"); m_btnMgr.setText(m_bootLblCurCIOSrev, L"AUTO");
showBoot(); showBoot();
@ -143,6 +149,7 @@ void CMenu::_textBoot(void)
m_btnMgr.setText(m_bootLblLoadCIOS, _t("cfgbt2", L"Force Load cIOS")); m_btnMgr.setText(m_bootLblLoadCIOS, _t("cfgbt2", L"Force Load cIOS"));
m_btnMgr.setText(m_bootLblCIOSrev, _t("cfgbt3", L"Force cIOS Revision")); m_btnMgr.setText(m_bootLblCIOSrev, _t("cfgbt3", L"Force cIOS Revision"));
m_btnMgr.setText(m_bootLblUSBPort, _t("cfgbt4", L"USB Port")); m_btnMgr.setText(m_bootLblUSBPort, _t("cfgbt4", L"USB Port"));
m_btnMgr.setText(m_bootBtnBack, _t("cfg10", L"Back"));
} }
@ -161,6 +168,8 @@ void CMenu::_initBoot(void)
m_bootLblUSBPort = _addLabel("BOOT/USB_PORT", theme.lblFont, L"", 40, 250, 290, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE); m_bootLblUSBPort = _addLabel("BOOT/USB_PORT", theme.lblFont, L"", 40, 250, 290, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
m_bootBtnUSBPort = _addButton("BOOT/USB_PORT_BTN", theme.btnFont, L"", 330, 250, 270, 56, theme.btnFontColor); m_bootBtnUSBPort = _addButton("BOOT/USB_PORT_BTN", theme.btnFont, L"", 330, 250, 270, 56, theme.btnFontColor);
m_bootBtnBack = _addButton("BOOT/BACK_BTN", theme.btnFont, L"", 420, 400, 200, 56, theme.btnFontColor);
_setHideAnim(m_bootLblTitle, "BOOT/TITLE", 0, -200, 0.f, 1.f); _setHideAnim(m_bootLblTitle, "BOOT/TITLE", 0, -200, 0.f, 1.f);
_setHideAnim(m_bootLblLoadCIOS, "BOOT/LOAD_CIOS", -200, 0, 1.f, 0.f); _setHideAnim(m_bootLblLoadCIOS, "BOOT/LOAD_CIOS", -200, 0, 1.f, 0.f);
_setHideAnim(m_bootBtnLoadCIOS, "BOOT/LOAD_CIOS_BTN", 200, 0, 1.f, 0.f); _setHideAnim(m_bootBtnLoadCIOS, "BOOT/LOAD_CIOS_BTN", 200, 0, 1.f, 0.f);
@ -173,6 +182,8 @@ void CMenu::_initBoot(void)
_setHideAnim(m_bootLblUSBPort, "BOOT/USB_PORT", -200, 0, 1.f, 0.f); _setHideAnim(m_bootLblUSBPort, "BOOT/USB_PORT", -200, 0, 1.f, 0.f);
_setHideAnim(m_bootBtnUSBPort, "BOOT/USB_PORT_BTN", 200, 0, 1.f, 0.f); _setHideAnim(m_bootBtnUSBPort, "BOOT/USB_PORT_BTN", 200, 0, 1.f, 0.f);
_setHideAnim(m_bootBtnBack, "BOOT/BACK_BTN", 0, 0, -2.f, 0.f);
hideBoot(true); hideBoot(true);
_textBoot(); _textBoot();
} }

View File

@ -156,7 +156,10 @@ void CMenu::_showMain(void)
{ {
_hideMain(); _hideMain();
if(!_AutoCreateNand()) if(!_AutoCreateNand())
m_cfg.setBool(CHANNEL_DOMAIN, "disable", true); {
while(NANDemuView)
_setPartition(1);
}
_loadList(); _loadList();
_showMain(); _showMain();
_initCF(); _initCF();
@ -226,13 +229,14 @@ int CMenu::main(void)
{ {
wstringEx curLetter; wstringEx curLetter;
string prevTheme = m_cfg.getString("GENERAL", "theme", "default"); string prevTheme = m_cfg.getString("GENERAL", "theme", "default");
parental_homebrew = m_cfg.getBool(HOMEBREW_DOMAIN, "parental", false); parental_homebrew = m_cfg.getBool(HOMEBREW_DOMAIN, "parental", false);
show_homebrew = !m_cfg.getBool(HOMEBREW_DOMAIN, "disable", false); show_homebrew = !m_cfg.getBool(HOMEBREW_DOMAIN, "disable", false);
show_channel = !m_cfg.getBool("GENERAL", "hidechannel", false); show_channel = !m_cfg.getBool("GENERAL", "hidechannel", false);
show_emu = !m_cfg.getBool(PLUGIN_DOMAIN, "disable", false); show_emu = !m_cfg.getBool(PLUGIN_DOMAIN, "disable", false);
bool dpad_mode = m_cfg.getBool("GENERAL", "dpad_mode", false); bool dpad_mode = m_cfg.getBool("GENERAL", "dpad_mode", false);
bool b_lr_mode = m_cfg.getBool("GENERAL", "b_lr_mode", false); bool b_lr_mode = m_cfg.getBool("GENERAL", "b_lr_mode", false);
bool use_grab = m_cfg.getBool("GENERAL", "use_grab", false); bool use_grab = m_cfg.getBool("GENERAL", "use_grab", false);
m_use_source = m_cfg.getBool("GENERAL", "use_source", true);
bool bheld = false; bool bheld = false;
bool bUsed = false; bool bUsed = false;
@ -280,7 +284,7 @@ int CMenu::main(void)
WDVD_GetCoverStatus(&disc_check); WDVD_GetCoverStatus(&disc_check);
/* Main Loop */ /* Main Loop */
_mainLoopCommon(true); _mainLoopCommon(true);
if(bheld && !BTN_B_HELD) if(m_use_source && bheld && !BTN_B_HELD)
{ {
bheld = false; bheld = false;
if(bUsed) if(bUsed)
@ -512,14 +516,6 @@ int CMenu::main(void)
bUsed = true; bUsed = true;
continue; continue;
} }
else if(!neek2o())
{
bUsed = true;
m_cfg.setBool(CHANNEL_DOMAIN, "disable", !m_cfg.getBool(CHANNEL_DOMAIN, "disable", true));
gprintf("EmuNand is %s\n", m_cfg.getBool(CHANNEL_DOMAIN, "disable", true) ? "Disabled" : "Enabled");
m_current_view = COVERFLOW_CHANNEL;
LoadView();
}
} }
else if(m_btnMgr.selected(m_mainBtnNext) || m_btnMgr.selected(m_mainBtnPrev)) else if(m_btnMgr.selected(m_mainBtnNext) || m_btnMgr.selected(m_mainBtnPrev))
{ {
@ -690,27 +686,21 @@ int CMenu::main(void)
else if(BTN_MINUS_PRESSED && !m_locked) else if(BTN_MINUS_PRESSED && !m_locked)
{ {
bUsed = true; bUsed = true;
bool block = m_current_view == COVERFLOW_CHANNEL && (m_cfg.getBool(CHANNEL_DOMAIN, "disable", true) || neek2o());
const char *partition = NULL; const char *partition = NULL;
if(!block) _showWaitMessage();
{ _hideMain();
_showWaitMessage(); _setPartition(1);
_hideMain(); if(m_current_view == COVERFLOW_CHANNEL && (m_cfg.getBool(CHANNEL_DOMAIN, "disable", true) || neek2o()))
_setPartition(1);
partition = DeviceName[currentPartition];
}
else
partition = "NAND"; partition = "NAND";
else
partition = DeviceName[currentPartition];
//gprintf("Next item: %s\n", partition); //gprintf("Next item: %s\n", partition);
m_showtimer = 120; m_showtimer = 120;
m_btnMgr.setText(m_mainLblNotice, sfmt("%s (%u) [%s]", _domainFromView(), m_gameList.size(), upperCase(partition).c_str())); m_btnMgr.setText(m_mainLblNotice, sfmt("%s (%u) [%s]", _domainFromView(), m_gameList.size(), upperCase(partition).c_str()));
m_btnMgr.show(m_mainLblNotice); m_btnMgr.show(m_mainLblNotice);
if(!block) _loadList();
{ _showMain();
_loadList(); _initCF();
_showMain();
_initCF();
}
} }
} }
@ -1115,25 +1105,39 @@ wstringEx CMenu::_getNoticeTranslation(int sorting, wstringEx curLetter)
void CMenu::_setPartition(s8 direction) void CMenu::_setPartition(s8 direction)
{ {
if(m_current_view == COVERFLOW_CHANNEL && NANDemuView == false) if(m_current_view == COVERFLOW_CHANNEL && neek2o())
return; return;
_cfNeedsUpdate(); _cfNeedsUpdate();
if(direction != 0) if(direction != 0)
{ {
u8 limiter = 0; bool switch_to_real = true;
bool NeedFAT = m_current_view == COVERFLOW_CHANNEL || m_current_view == COVERFLOW_DML; if(m_current_view == COVERFLOW_CHANNEL && !NANDemuView)
currentPartition = loopNum(currentPartition + direction, 8);
int FS_Type = DeviceHandle.GetFSType(currentPartition);
while(!DeviceHandle.IsInserted(currentPartition) ||
(m_current_view != COVERFLOW_USB && FS_Type == PART_FS_WBFS) ||
(NeedFAT && FS_Type != PART_FS_FAT))
{ {
currentPartition = loopNum(currentPartition + direction, 8); NANDemuView = true;
m_cfg.setBool(CHANNEL_DOMAIN, "disable", false);
switch_to_real = false;
}
bool NeedFAT = m_current_view == COVERFLOW_CHANNEL || m_current_view == COVERFLOW_DML;
u8 limiter = 0;
int FS_Type = 0;
do
{
currentPartition = loopNum(currentPartition + direction, 10);
FS_Type = DeviceHandle.GetFSType(currentPartition); FS_Type = DeviceHandle.GetFSType(currentPartition);
if(limiter > 10) if(m_current_view == COVERFLOW_CHANNEL && switch_to_real && FS_Type == -1)
break; break;
limiter++; limiter++;
} }
while(limiter < 12 && (!DeviceHandle.IsInserted(currentPartition) ||
(m_current_view != COVERFLOW_USB && FS_Type == PART_FS_WBFS) ||
(NeedFAT && FS_Type != PART_FS_FAT)));
if(m_current_view == COVERFLOW_CHANNEL && FS_Type == -1)
{
NANDemuView = false;
m_cfg.setBool(CHANNEL_DOMAIN, "disable", true);
}
} }
if(m_tempView) if(m_tempView)
m_cfg.setInt(WII_DOMAIN, "savepartition", currentPartition); m_cfg.setInt(WII_DOMAIN, "savepartition", currentPartition);

View File

@ -533,56 +533,59 @@ int CMenu::_AutoCreateNand(void)
while(!m_exit) while(!m_exit)
{ {
_mainLoopCommon(); _mainLoopCommon();
if(BTN_A_PRESSED && (m_btnMgr.selected(m_nandemuBtnExtract))) if(BTN_A_PRESSED)
{ {
m_fulldump = true; if(m_btnMgr.selected(m_nandemuBtnExtract))
m_btnMgr.hide(m_nandemuBtnExtract);
m_btnMgr.hide(m_nandemuBtnDisable);
m_btnMgr.hide(m_nandemuBtnPartition);
m_btnMgr.hide(m_nandemuLblInit);
m_btnMgr.show(m_nandemuLblTitle);
m_btnMgr.show(m_nandfilePBar);
m_btnMgr.show(m_nandemuPBar);
m_btnMgr.show(m_nandfileLblMessage);
m_btnMgr.show(m_nandemuLblMessage);
m_btnMgr.show(m_nandfileLblDialog);
m_btnMgr.show(m_nandemuLblDialog);
m_btnMgr.setText(m_nandemuLblMessage, L"");
m_btnMgr.setText(m_nandfileLblMessage, L"");
m_btnMgr.setText(m_nandemuLblDialog, _t("cfgne11", L"Overall Progress:"));
m_btnMgr.setText(m_nandemuLblTitle, _t("cfgne12", L"NAND Extractor"));
m_thrdStop = false;
m_thrdProgress = 0.f;
m_thrdWorking = true;
LWP_CreateThread(&thread, (void *(*)(void *))CMenu::_NandDumper, (void *)this, 0, 32768, 40);
}
else if(BTN_A_PRESSED && (m_btnMgr.selected(m_nandemuBtnDisable)))
{
_hideNandEmu();
return 0;
}
else if(BTN_A_PRESSED && (m_btnMgr.selected(m_nandemuBtnPartition)))
{
if(m_current_view == COVERFLOW_USB)
{ {
m_tempView = true; m_fulldump = true;
m_current_view = COVERFLOW_CHANNEL; m_btnMgr.hide(m_nandemuBtnExtract);
m_btnMgr.hide(m_nandemuBtnDisable);
m_btnMgr.hide(m_nandemuBtnPartition);
m_btnMgr.hide(m_nandemuLblInit);
m_btnMgr.show(m_nandemuLblTitle);
m_btnMgr.show(m_nandfilePBar);
m_btnMgr.show(m_nandemuPBar);
m_btnMgr.show(m_nandfileLblMessage);
m_btnMgr.show(m_nandemuLblMessage);
m_btnMgr.show(m_nandfileLblDialog);
m_btnMgr.show(m_nandemuLblDialog);
m_btnMgr.setText(m_nandemuLblMessage, L"");
m_btnMgr.setText(m_nandfileLblMessage, L"");
m_btnMgr.setText(m_nandemuLblDialog, _t("cfgne11", L"Overall Progress:"));
m_btnMgr.setText(m_nandemuLblTitle, _t("cfgne12", L"NAND Extractor"));
m_thrdStop = false;
m_thrdProgress = 0.f;
m_thrdWorking = true;
LWP_CreateThread(&thread, (void *(*)(void *))CMenu::_NandDumper, (void *)this, 0, 32768, 40);
} }
_hideNandEmu(); else if(m_btnMgr.selected(m_nandemuBtnDisable))
_config(1);
if(m_tempView)
{ {
m_current_view = COVERFLOW_USB; _hideNandEmu();
m_tempView = false;
return 0; return 0;
} }
return 1; else if(m_btnMgr.selected(m_nandemuBtnPartition))
} {
else if(BTN_A_PRESSED && (m_btnMgr.selected(m_nandemuBtnBack))) if(m_current_view == COVERFLOW_USB)
{ {
m_cfg.save(); m_tempView = true;
_hideNandEmu(); m_current_view = COVERFLOW_CHANNEL;
}
_hideNandEmu();
_config(1);
if(m_tempView)
{
m_current_view = COVERFLOW_USB;
m_tempView = false;
return 0;
}
return 1; return 1;
}
else if(m_btnMgr.selected(m_nandemuBtnBack))
{
m_cfg.save();
_hideNandEmu();
return 1;
}
} }
if(m_thrdMessageAdded) if(m_thrdMessageAdded)