mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-23 19:59:16 +01:00
-fixed displaying errors on source menu
-removed vipatch, country patch, private server and cheats defaults from wiiflow.ini. no need for default/global setting for those options. they all default to off internally in wiiflow. -now on file explorer menu pressing home btn returns you to device select so you don't have to keep backing up to get back to devices. -fixed a few minor problems with game configs, especially gc games. now all game config options should work properly. -now using bitwise operators and expressions on m_current_view to control which sources are selected. no more source= under each domain. just sources= under GENERAL. -replaced ocarina option from main settings pg3 with channels type option. no need for a global/default ocarina setting. channels type allows you to select real, emu, or both channels types for channels coverflow. which means no more pressing B on config icon to cycle thru the choices. -fixed a minor bug when downloading covers -changed newid.ini to use only one domain name "[NEWID]". this fixes a possible problem when downloading covers and using newid.ini and multisource. -added install wad option to nand emulation settings menu. I know you can do it via file explorer but this makes it easier for newbies to find. plus you can select which nand to install to. -fixed extract game saves. -fixed extract nand and install GC game by stopping music and controller input while doing these functions. -Install wii game is broke. added a error msg stating this and keeping users from using it. funny the code is almost identical to usbloader gx which works and wiiflow doesn't. -now showing all btns on game selected screen. if wiiflow is locked a error msg appears stating this. -changed makeDir to make the whole path not just one folder. thanks to usbloader gx code. -added .ciso extension to gamecube list maker so you can use them with nintendont.
This commit is contained in:
parent
630594d976
commit
17fa36e898
BIN
out/boot.dol
BIN
out/boot.dol
Binary file not shown.
Before Width: | Height: | Size: 3.1 MiB After Width: | Height: | Size: 3.1 MiB |
@ -388,10 +388,66 @@ bool fsop_FolderExist(const char *path)
|
||||
return false;
|
||||
}
|
||||
|
||||
void fsop_MakeFolder(const char *path)
|
||||
/*void fsop_MakeFolder(const char *path)
|
||||
{
|
||||
if(fsop_FolderExist(path))
|
||||
return;
|
||||
//gprintf("Folder path to create: %s\n", path);
|
||||
mkdir(path, S_IREAD | S_IWRITE);
|
||||
}*/
|
||||
|
||||
bool fsop_MakeFolder(const char *fullpath)
|
||||
{
|
||||
if(!fullpath)
|
||||
return false;
|
||||
|
||||
bool result = false;
|
||||
|
||||
char dirnoslash[strlen(fullpath)+1];
|
||||
strcpy(dirnoslash, fullpath);
|
||||
|
||||
int pos = strlen(dirnoslash)-1;
|
||||
while(dirnoslash[pos] == '/')
|
||||
{
|
||||
dirnoslash[pos] = '\0';
|
||||
pos--;
|
||||
}
|
||||
|
||||
if(fsop_FolderExist(dirnoslash))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
char parentpath[strlen(dirnoslash)+2];
|
||||
strcpy(parentpath, dirnoslash);
|
||||
char * ptr = strrchr(parentpath, '/');
|
||||
|
||||
if(!ptr)
|
||||
{
|
||||
//!Device root directory (must be with '/')
|
||||
strcat(parentpath, "/");
|
||||
struct stat filestat;
|
||||
if (stat(parentpath, &filestat) == 0)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
ptr++;
|
||||
ptr[0] = '\0';
|
||||
|
||||
result = fsop_MakeFolder(parentpath);
|
||||
}
|
||||
|
||||
if(!result)
|
||||
return false;
|
||||
|
||||
if (mkdir(dirnoslash, 0777) == -1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ void fsop_ReadFileLoc(const char *path, const u32 size, void *loc);
|
||||
bool fsop_WriteFile(const char *path, const void *mem, const u32 size);
|
||||
void fsop_deleteFile(const char *source);
|
||||
bool fsop_FolderExist(const char *path);
|
||||
void fsop_MakeFolder(const char *path);
|
||||
bool fsop_MakeFolder(const char *fullpath);
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -17,5 +17,5 @@ const u8 WFB_HASH[] = { 0x4f, 0xad, 0x97, 0xfd, 0x4a, 0x28, 0x8c, 0x47, 0xe0,
|
||||
|
||||
#define TITLEFONT TITLEFONT_PT_SZ, TITLEFONT_PT_SZ - 4, FONT_BOLD, 1, "title_font"
|
||||
#define BUTTONFONT BTNFONT_PT_SZ, BTNFONT_PT_SZ - 4, FONT_BOLD, 1, "button_font"
|
||||
#define LABELFONT LBLFONT_PT_SZ, LBLFONT_PT_SZ, FONT_BOLD, 1, "label_font"
|
||||
#define LABELFONT LBLFONT_PT_SZ, LBLFONT_PT_SZ + 4, FONT_BOLD, 1, "label_font"
|
||||
#define TEXTFONT TEXTFONT_PT_SZ, TEXTFONT_PT_SZ + 6, FONT_BOLD, 1, "text_font"
|
@ -434,8 +434,8 @@ static void free_block(wbfs_t *p,int bl)
|
||||
p->freeblks[i] = wbfs_htonl(v | 1 << j);
|
||||
}
|
||||
|
||||
u32 wbfs_add_disc(wbfs_t *p, read_wiidisc_callback_t read_src_wii_disc, void *callback_data,
|
||||
progress_callback_t spinner,void *spinner_data,partition_selector_t sel,int copy_1_1)
|
||||
u32 wbfs_add_disc(wbfs_t*p, read_wiidisc_callback_t read_src_wii_disc, void *callback_data,
|
||||
progress_callback_t spinner, void *spinner_data, partition_selector_t sel, int copy_1_1)
|
||||
{
|
||||
int i,discn;
|
||||
u32 tot,cur;
|
||||
|
@ -150,6 +150,7 @@ s32 GCDump::__DiscWriteFile(FILE *f, u64 offset, u32 length, u8 *ReadBuffer)
|
||||
while(length)
|
||||
{
|
||||
toread = min(length, gc_readsize);
|
||||
mainMenu.update_pThread(toread);
|
||||
s32 ret = __DiscReadRaw(ReadBuffer, offset, toread);
|
||||
if (ret == 1)
|
||||
memset(ReadBuffer, 0, gc_readsize);
|
||||
@ -160,7 +161,6 @@ s32 GCDump::__DiscWriteFile(FILE *f, u64 offset, u32 length, u8 *ReadBuffer)
|
||||
offset += toread;
|
||||
length -= toread;
|
||||
gc_done += toread;
|
||||
mainMenu.update_pThread(toread);
|
||||
}
|
||||
return wrote;
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ volatile bool networkInit = false;
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
MEM_init(); //Inits both mem1lo and mem2
|
||||
mainIOS = DOL_MAIN_IOS;
|
||||
mainIOS = DOL_MAIN_IOS;// 249
|
||||
__exception_setreload(10);
|
||||
Gecko_Init(); //USB Gecko and SD/WiFi buffer
|
||||
gprintf(" \nWelcome to %s!\nThis is the debug output.\n", VERSION_STRING.c_str());
|
||||
|
@ -288,17 +288,16 @@ void CMenu::init()
|
||||
fsop_MakeFolder(m_helpDir.c_str());
|
||||
|
||||
/* Check to make sure wii games partition is ok */
|
||||
const char *domain = _domainFromView();
|
||||
u8 partition = m_cfg.getInt(domain, "partition", 0);
|
||||
u8 partition = m_cfg.getInt(WII_DOMAIN, "partition", 0);
|
||||
if(partition > USB8 || !DeviceHandle.IsInserted(partition))//if not ok then find wbfs folder or wbfs partition
|
||||
{
|
||||
m_cfg.remove(domain, "partition");
|
||||
m_cfg.remove(WII_DOMAIN, "partition");
|
||||
for(int i = SD; i <= USB8; i++) // Find a usb partition with a wbfs folder or wbfs file system, else leave it blank (defaults to usb1 later)
|
||||
{
|
||||
if(DeviceHandle.IsInserted(i) && (DeviceHandle.GetFSType(i) == PART_FS_WBFS || stat(fmt(GAMES_DIR, DeviceName[i]), &dummy) == 0))
|
||||
{
|
||||
gprintf("Setting Wii games partition to: %i\n", i);
|
||||
m_cfg.setInt(domain, "partition", i);
|
||||
m_cfg.setInt(WII_DOMAIN, "partition", i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -307,8 +306,6 @@ void CMenu::init()
|
||||
/* Emu nands init even if not being used */
|
||||
_checkEmuNandSettings(false);// emu nand
|
||||
_checkEmuNandSettings(true);// saves nand
|
||||
m_cfg.getBool(CHANNEL_DOMAIN, "real_nand", true);
|
||||
m_cfg.getBool(CHANNEL_DOMAIN, "emu_nand", false);
|
||||
|
||||
/* Cache Reload Checks */
|
||||
int ini_rev = m_cfg.getInt("GENERAL", "ini_rev", 0);
|
||||
@ -1637,6 +1634,20 @@ void CMenu::_addUserLabels(s16 *ids, u32 start, u32 size, const char *domain)
|
||||
|
||||
void CMenu::_mainLoopCommon(bool withCF, bool adjusting)
|
||||
{
|
||||
if(m_thrdWorking)
|
||||
{
|
||||
if(!MusicPlayer.IsStopped())
|
||||
MusicPlayer.Stop();
|
||||
m_btnMgr.tick();
|
||||
m_vid.prepare();
|
||||
m_vid.setup2DProjection(false, true);
|
||||
_updateBg();
|
||||
m_vid.setup2DProjection();
|
||||
_drawBg();
|
||||
m_btnMgr.draw();
|
||||
m_vid.render();
|
||||
return;
|
||||
}
|
||||
if(withCF)
|
||||
CoverFlow.tick();
|
||||
m_btnMgr.tick();
|
||||
@ -2127,7 +2138,7 @@ void CMenu::_initCF(void)
|
||||
m_cfg.setBool("GENERAL", "dump_list", false);
|
||||
}
|
||||
|
||||
CoverFlow.setSorting(m_current_view == COVERFLOW_MAX ? (Sorting)0 : (Sorting)m_cfg.getInt(_domainFromView(), "sort", 0));
|
||||
CoverFlow.setSorting(m_source_cnt > 1 ? (Sorting)0 : (Sorting)m_cfg.getInt(_domainFromView(), "sort", 0));
|
||||
if(m_current_view == COVERFLOW_HOMEBREW)
|
||||
CoverFlow.setBoxMode(m_cfg.getBool(HOMEBREW_DOMAIN, "box_mode", true));
|
||||
else if(m_sourceflow)
|
||||
@ -2142,7 +2153,7 @@ void CMenu::_initCF(void)
|
||||
if(!CoverFlow.empty())
|
||||
{
|
||||
bool path = m_sourceflow || m_current_view == COVERFLOW_PLUGIN || m_current_view == COVERFLOW_HOMEBREW;
|
||||
if(m_current_view == COVERFLOW_MAX || !CoverFlow.findId(m_cfg.getString(_domainFromView(), "current_item").c_str(), true, path))
|
||||
if(!CoverFlow.findId(m_cfg.getString(_domainFromView(), "current_item").c_str(), true, path))
|
||||
CoverFlow.defaultLoad();
|
||||
CoverFlow.startCoverLoader();
|
||||
}
|
||||
@ -2170,16 +2181,16 @@ bool CMenu::_loadList(void)
|
||||
return m_gameList.size() > 0 ? true : false;
|
||||
}
|
||||
gprintf("Creating Gamelist\n");
|
||||
if(m_cfg.getBool(PLUGIN_DOMAIN, "source"))
|
||||
if(m_current_view & COVERFLOW_PLUGIN)
|
||||
_loadPluginList();
|
||||
|
||||
if(m_cfg.getBool(WII_DOMAIN, "source"))
|
||||
if(m_current_view & COVERFLOW_WII)
|
||||
_loadWiiList();
|
||||
|
||||
if(m_cfg.getBool(CHANNEL_DOMAIN, "source"))
|
||||
if(m_current_view & COVERFLOW_CHANNEL)
|
||||
_loadChannelList();
|
||||
|
||||
if(m_cfg.getBool(GC_DOMAIN, "source"))
|
||||
if(m_current_view & COVERFLOW_GAMECUBE)
|
||||
_loadGamecubeList();
|
||||
|
||||
m_cacheList.Clear();
|
||||
@ -2229,7 +2240,7 @@ bool CMenu::_loadGamecubeList()
|
||||
string gameDir(fmt(gc_games_dir, 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_cacheList.CreateList(COVERFLOW_GAMECUBE, currentPartition, gameDir, stringToVector(".iso|root", '|'), cacheDir, updateCache);
|
||||
m_cacheList.CreateList(COVERFLOW_GAMECUBE, currentPartition, gameDir, stringToVector(".iso|.ciso|root", '|'), cacheDir, updateCache);
|
||||
m_cfg.remove(GC_DOMAIN, "update_cache");
|
||||
for(vector<dir_discHdr>::iterator tmp_itr = m_cacheList.begin(); tmp_itr != m_cacheList.end(); tmp_itr++)
|
||||
m_gameList.push_back(*tmp_itr);
|
||||
@ -2238,15 +2249,21 @@ bool CMenu::_loadGamecubeList()
|
||||
|
||||
bool CMenu::_loadChannelList(void)
|
||||
{
|
||||
u8 chantypes = m_cfg.getUInt(CHANNEL_DOMAIN, "channels_type", CHANNELS_REAL);
|
||||
if(chantypes < CHANNELS_REAL || chantypes > CHANNELS_BOTH)
|
||||
{
|
||||
m_cfg.setUInt(CHANNEL_DOMAIN, "channels_type", CHANNELS_REAL);
|
||||
chantypes = CHANNELS_REAL;
|
||||
}
|
||||
vector<string> NullVector;
|
||||
if(m_cfg.getBool(CHANNEL_DOMAIN, "real_nand"))
|
||||
if(chantypes & CHANNELS_REAL)
|
||||
{
|
||||
NANDemuView = false;
|
||||
m_cacheList.CreateList(COVERFLOW_CHANNEL, 9, std::string(), NullVector, std::string(), false);
|
||||
for(vector<dir_discHdr>::iterator tmp_itr = m_cacheList.begin(); tmp_itr != m_cacheList.end(); tmp_itr++)
|
||||
m_gameList.push_back(*tmp_itr);
|
||||
}
|
||||
if(m_cfg.getBool(CHANNEL_DOMAIN, "emu_nand"))
|
||||
if(chantypes & CHANNELS_EMU)
|
||||
{
|
||||
NANDemuView = true;
|
||||
string emuPath;
|
||||
@ -2273,8 +2290,8 @@ bool CMenu::_loadPluginList()
|
||||
{
|
||||
bool addGamecube = false;
|
||||
bool addWii = false;
|
||||
bool addChannel = false;
|
||||
bool addEmuChannel = false;
|
||||
u8 addChannel = 0;
|
||||
u8 addEmuChannel = 0;
|
||||
bool updateCache = m_cfg.getBool(PLUGIN_DOMAIN, "update_cache");
|
||||
|
||||
for(u8 i = 0; m_plugin.PluginExist(i); ++i)
|
||||
@ -2303,12 +2320,12 @@ bool CMenu::_loadPluginList()
|
||||
}
|
||||
if(strncasecmp(m_plugin.PluginMagicWord, "4E414E44", 8) == 0)
|
||||
{
|
||||
addChannel = true;
|
||||
addChannel = CHANNELS_REAL;
|
||||
continue;
|
||||
}
|
||||
if(strncasecmp(m_plugin.PluginMagicWord, "454E414E", 8) == 0)
|
||||
{
|
||||
addEmuChannel = true;
|
||||
addEmuChannel = CHANNELS_EMU;
|
||||
continue;
|
||||
}
|
||||
string gameDir(fmt("%s:/%s", DeviceName[currentPartition], romDir));
|
||||
@ -2340,8 +2357,7 @@ bool CMenu::_loadPluginList()
|
||||
|
||||
if(addChannel || addEmuChannel)
|
||||
{
|
||||
m_cfg.setBool(CHANNEL_DOMAIN, "real_nand", addChannel ? true : false);
|
||||
m_cfg.setBool(CHANNEL_DOMAIN, "emu_nand", addEmuChannel ? true : false);
|
||||
m_cfg.setUInt(CHANNEL_DOMAIN, "channels_type", addChannel | addEmuChannel);
|
||||
_loadChannelList();
|
||||
}
|
||||
m_cfg.remove(PLUGIN_DOMAIN, "update_cache");
|
||||
@ -2503,6 +2519,8 @@ const char *CMenu::_domainFromView()
|
||||
{
|
||||
if(m_sourceflow)
|
||||
return SOURCEFLOW_DOMAIN;
|
||||
if(m_source_cnt > 1)
|
||||
return "MULTI";
|
||||
switch(m_current_view)
|
||||
{
|
||||
case COVERFLOW_CHANNEL:
|
||||
@ -2519,44 +2537,6 @@ const char *CMenu::_domainFromView()
|
||||
return "NULL";
|
||||
}
|
||||
|
||||
/*void CMenu::UpdateCache(u32 view)
|
||||
{
|
||||
if(view == COVERFLOW_MAX)
|
||||
{
|
||||
UpdateCache(COVERFLOW_WII);
|
||||
//UpdateCache(COVERFLOW_HOMEBREW);
|
||||
UpdateCache(COVERFLOW_GAMECUBE);
|
||||
UpdateCache(COVERFLOW_PLUGIN);
|
||||
UpdateCache(COVERFLOW_CHANNEL);
|
||||
return;
|
||||
}
|
||||
switch(view)
|
||||
{
|
||||
case COVERFLOW_CHANNEL:
|
||||
m_cfg.setBool(CHANNEL_DOMAIN, "update_cache", true);
|
||||
break;
|
||||
case COVERFLOW_HOMEBREW:
|
||||
m_cfg.setBool(HOMEBREW_DOMAIN, "update_cache", true);
|
||||
break;*/
|
||||
/*case COVERFLOW_GAMECUBE:
|
||||
m_cfg.setBool(GC_DOMAIN, "update_cache", true);
|
||||
break;
|
||||
case COVERFLOW_PLUGIN:
|
||||
m_cfg.setBool(PLUGIN_DOMAIN, "update_cache", true);
|
||||
break;
|
||||
default:
|
||||
m_cfg.setBool(WII_DOMAIN, "update_cache", true);
|
||||
}*/
|
||||
/*if(m_cfg.getBool(WII_DOMAIN, "source"))
|
||||
m_cfg.setBool(WII_DOMAIN, "update_cache", true);
|
||||
if(m_cfg.getBool(GC_DOMAIN, "source"))
|
||||
m_cfg.setBool(GC_DOMAIN, "update_cache", true);
|
||||
if(m_cfg.getBool(CHANNEL_DOMAIN, "source"))
|
||||
m_cfg.setBool(CHANNEL_DOMAIN, "update_cache", true);
|
||||
if(m_cfg.getBool(PLUGIN_DOMAIN, "source"))
|
||||
m_cfg.setBool(PLUGIN_DOMAIN, "update_cache", true);
|
||||
}*/
|
||||
|
||||
void CMenu::RemoveCover(const char *id)
|
||||
{
|
||||
const char *CoverPath = NULL;
|
||||
|
@ -51,6 +51,7 @@ public:
|
||||
private:
|
||||
u8 m_prev_view;
|
||||
u8 m_current_view;
|
||||
u8 m_source_cnt;
|
||||
u8 enabledPluginsCount;
|
||||
u8 m_catStartPage;
|
||||
bool m_clearCats;
|
||||
@ -265,8 +266,10 @@ private:
|
||||
s16 m_config3LblGCLoader;
|
||||
s16 m_config3BtnGCLoaderP;
|
||||
s16 m_config3BtnGCLoaderM;
|
||||
s16 m_config3LblOcarina;
|
||||
s16 m_config3BtnOcarina;
|
||||
s16 m_config3LblChannelsType;
|
||||
s16 m_config3LblChannelsTypeVal;
|
||||
s16 m_config3BtnChannelsTypeP;
|
||||
s16 m_config3BtnChannelsTypeM;
|
||||
s16 m_config3LblUser[4];
|
||||
|
||||
s16 m_config4LblReturnTo;
|
||||
@ -953,6 +956,7 @@ private:
|
||||
void _hideGameInfo(bool instant = false);
|
||||
void _hideCheatDownload(bool instant = false);
|
||||
void _hideNandEmu(bool instant = false);
|
||||
void _hideNandEmuPg();
|
||||
void _hideHome(bool instant = false);
|
||||
void _hideExitTo(bool instant = false);
|
||||
void _hideCoverBanner(bool instant = false);
|
||||
@ -998,7 +1002,6 @@ private:
|
||||
void _setSrcOptions(void);
|
||||
bool _sideCover(const char *magic);
|
||||
bool _shortCover(const char *magic);
|
||||
void _clearSources(void);
|
||||
void _updateSourceBtns(void);
|
||||
void _updatePluginText(void);
|
||||
void _updatePluginCheckboxes(void);
|
||||
@ -1045,6 +1048,7 @@ private:
|
||||
void _CoverBanner(void);
|
||||
void _Explorer(void);
|
||||
const char *_FolderExplorer(const char *startPath);
|
||||
void _wadExplorer(void);
|
||||
void _Wad(const char *wad_path = NULL);
|
||||
void _CheatSettings();
|
||||
bool _Source();
|
||||
@ -1162,6 +1166,7 @@ private:
|
||||
bool _checkSave(string id, bool nand);
|
||||
bool _TestEmuNand(int epart, const char *path, bool indept);
|
||||
void _checkEmuNandSettings(bool savesnand);
|
||||
void _listEmuNands(const char *path, vector<string> &emuNands);
|
||||
|
||||
static u32 _downloadCheatFileAsync(void *obj);
|
||||
static u32 _downloadBannerAsync(void *obj);
|
||||
@ -1174,27 +1179,29 @@ private:
|
||||
static void _load_installed_cioses();
|
||||
|
||||
struct SOption { const char id[10]; const wchar_t text[16]; };
|
||||
static const SOption _languages[11];
|
||||
|
||||
static const SOption _GlobalVideoModes[6];
|
||||
static const SOption _VideoModes[7];
|
||||
static const SOption _languages[11];
|
||||
|
||||
static const SOption _GlobalGCvideoModes[8];
|
||||
static const SOption _GlobalGClanguages[7];
|
||||
static const SOption _GCvideoModes[9];
|
||||
static const SOption _GClanguages[8];
|
||||
static const SOption _GlobalGCLoaders[2];
|
||||
static const SOption _GCLoader[3];
|
||||
|
||||
static const SOption _ChannelsType[3];
|
||||
static const SOption _NandEmu[2];
|
||||
static const SOption _SaveEmu[5];
|
||||
static const SOption _GlobalSaveEmu[4];
|
||||
static const SOption _AspectRatio[3];
|
||||
static const SOption _NinEmuCard[5];
|
||||
static const SOption _GlobalGCLoaders[2];
|
||||
static const SOption _GCLoader[3];
|
||||
static const SOption _vidModePatch[4];
|
||||
static const SOption _debugger[3];
|
||||
static const SOption _hooktype[8];
|
||||
static const SOption _exitTo[5];
|
||||
|
||||
static map<u8, u8> _installed_cios;
|
||||
typedef map<u8, u8>::iterator CIOSItr;
|
||||
static int _version[9];
|
||||
|
@ -41,7 +41,7 @@ void CMenu::_about(bool help)
|
||||
first = false;
|
||||
}
|
||||
|
||||
if ((BTN_DOWN_PRESSED || BTN_DOWN_HELD) && !(m_thrdWorking && m_thrdStop) && thanks_th >thanks_h)
|
||||
if((BTN_DOWN_PRESSED || BTN_DOWN_HELD) && thanks_th >thanks_h)
|
||||
{
|
||||
if((thanks_th - amount_of_skips * pixels_to_skip) >= thanks_h)
|
||||
{
|
||||
@ -54,7 +54,7 @@ void CMenu::_about(bool help)
|
||||
m_btnMgr.moveBy(m_aboutLblInfo, 0, -xtra_skips);
|
||||
}
|
||||
}
|
||||
else if ((BTN_UP_PRESSED || BTN_UP_HELD) && !(m_thrdWorking && m_thrdStop))
|
||||
else if((BTN_UP_PRESSED || BTN_UP_HELD))
|
||||
{
|
||||
if(xtra_skips > 0)
|
||||
{
|
||||
|
@ -55,7 +55,10 @@ void CMenu::_showConfig(void)
|
||||
m_btnMgr.show(m_configLblDownload);
|
||||
m_btnMgr.show(m_configBtnDownload);
|
||||
|
||||
currentPartition = m_cfg.getInt(_domainFromView(), "partition", 0);
|
||||
if(m_source_cnt > 1)
|
||||
currentPartition = 0;
|
||||
else
|
||||
currentPartition = m_cfg.getInt(_domainFromView(), "partition", 0);
|
||||
const char *partitionname = DeviceName[currentPartition];
|
||||
m_btnMgr.setText(m_configLblPartition, upperCase(partitionname));
|
||||
m_btnMgr.show(m_configLblPartitionName);
|
||||
@ -185,7 +188,7 @@ int CMenu::_config1(void)
|
||||
}
|
||||
_showConfig();
|
||||
}
|
||||
else if ((m_btnMgr.selected(m_configBtnPartitionP) || m_btnMgr.selected(m_configBtnPartitionM)) && m_current_view != COVERFLOW_MAX)
|
||||
else if ((m_btnMgr.selected(m_configBtnPartitionP) || m_btnMgr.selected(m_configBtnPartitionM)) && m_source_cnt == 1)
|
||||
{
|
||||
s8 direction = m_btnMgr.selected(m_configBtnPartitionP) ? 1 : -1;
|
||||
_setPartition(direction);
|
||||
|
@ -38,8 +38,12 @@ void CMenu::_hideConfig3(bool instant)
|
||||
m_btnMgr.hide(m_config3LblGCLoader, instant);
|
||||
m_btnMgr.hide(m_config3BtnGCLoaderP, instant);
|
||||
m_btnMgr.hide(m_config3BtnGCLoaderM, instant);
|
||||
m_btnMgr.hide(m_config3LblOcarina, instant);
|
||||
m_btnMgr.hide(m_config3BtnOcarina, instant);
|
||||
|
||||
m_btnMgr.hide(m_config3LblChannelsType, instant);
|
||||
m_btnMgr.hide(m_config3LblChannelsTypeVal, instant);
|
||||
m_btnMgr.hide(m_config3BtnChannelsTypeP, instant);
|
||||
m_btnMgr.hide(m_config3BtnChannelsTypeM, instant);
|
||||
|
||||
for(u8 i = 0; i < ARRAY_SIZE(m_config3LblUser); ++i)
|
||||
if(m_config3LblUser[i] != -1)
|
||||
m_btnMgr.hide(m_config3LblUser[i], instant);
|
||||
@ -75,8 +79,11 @@ void CMenu::_showConfig3(void)
|
||||
m_btnMgr.show(m_config3LblGCLoader);
|
||||
m_btnMgr.show(m_config3BtnGCLoaderP);
|
||||
m_btnMgr.show(m_config3BtnGCLoaderM);
|
||||
m_btnMgr.show(m_config3LblOcarina);
|
||||
m_btnMgr.show(m_config3BtnOcarina);
|
||||
|
||||
m_btnMgr.show(m_config3LblChannelsType);
|
||||
m_btnMgr.show(m_config3LblChannelsTypeVal);
|
||||
m_btnMgr.show(m_config3BtnChannelsTypeP);
|
||||
m_btnMgr.show(m_config3BtnChannelsTypeM);
|
||||
|
||||
for(u8 i = 0; i < ARRAY_SIZE(m_config3LblUser); ++i)
|
||||
if(m_config3LblUser[i] != -1)
|
||||
@ -103,7 +110,8 @@ void CMenu::_showConfig3(void)
|
||||
i = min(max(0, m_cfg.getInt(GC_DOMAIN, "default_loader", 2)), (int)ARRAY_SIZE(CMenu::_GlobalGCLoaders) - 1);
|
||||
m_btnMgr.setText(m_config3LblGCLoader, _t(CMenu::_GlobalGCLoaders[i].id, CMenu::_GlobalGCLoaders[i].text));
|
||||
|
||||
m_btnMgr.setText(m_config3BtnOcarina, m_cfg.getBool(_domainFromView(), "cheat", false) ? _t("on", L"On") : _t("off", L"Off"));
|
||||
i = m_cfg.getInt(CHANNEL_DOMAIN, "channels_type") - 1;
|
||||
m_btnMgr.setText(m_config3LblChannelsTypeVal, _t(CMenu::_ChannelsType[i].id, CMenu::_ChannelsType[i].text));
|
||||
}
|
||||
|
||||
int CMenu::_config3(void)
|
||||
@ -148,10 +156,13 @@ int CMenu::_config3(void)
|
||||
m_cfg.setInt(GC_DOMAIN, "default_loader", (int)loopNum((u32)m_cfg.getInt(GC_DOMAIN, "default_loader", 1) + direction, ARRAY_SIZE(CMenu::_GlobalGCLoaders)));
|
||||
_showConfig3();
|
||||
}
|
||||
else if (m_btnMgr.selected(m_config3BtnOcarina))
|
||||
else if (m_btnMgr.selected(m_config3BtnChannelsTypeP) || m_btnMgr.selected(m_config3BtnChannelsTypeM))
|
||||
{
|
||||
m_cfg.setBool(_domainFromView(), "cheat", !m_cfg.getBool(_domainFromView(), "cheat", false));
|
||||
s8 direction = m_btnMgr.selected(m_config3BtnChannelsTypeP) ? 1 : -1;
|
||||
m_cfg.setInt(CHANNEL_DOMAIN, "channels_type", 1 + (int)loopNum((u32)m_cfg.getInt(CHANNEL_DOMAIN, "channels_type", 1) - 1 + direction, ARRAY_SIZE(CMenu::_ChannelsType)));
|
||||
_showConfig3();
|
||||
if(m_current_view & COVERFLOW_CHANNEL)
|
||||
m_refreshGameList = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -185,8 +196,10 @@ void CMenu::_initConfig3Menu()
|
||||
m_config3BtnGCLoaderM = _addPicButton("CONFIG3/GC_LOADER_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 420, 250, 48, 48);
|
||||
m_config3BtnGCLoaderP = _addPicButton("CONFIG3/GC_LOADER_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 572, 250, 48, 48);
|
||||
|
||||
m_config3LblOcarina = _addLabel("CONFIG3/OCARINA", theme.lblFont, L"", 20, 305, 290, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_config3BtnOcarina = _addButton("CONFIG3/OCARINA_BTN", theme.btnFont, L"", 420, 310, 200, 48, theme.btnFontColor);
|
||||
m_config3LblChannelsType = _addLabel("CONFIG3/CHANNELS_TYPE", theme.lblFont, L"", 20, 305, 290, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_config3LblChannelsTypeVal = _addLabel("CONFIG3/CHANNELS_TYPE_BTN", theme.btnFont, L"", 468, 310, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
|
||||
m_config3BtnChannelsTypeM = _addPicButton("CONFIG3/CHANNELS_TYPE_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 420, 310, 48, 48);
|
||||
m_config3BtnChannelsTypeP = _addPicButton("CONFIG3/CHANNELS_TYPE_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 572, 310, 48, 48);
|
||||
|
||||
_setHideAnim(m_config3LblGameVideo, "CONFIG3/VIDEO", 50, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_config3LblVideo, "CONFIG3/VIDEO_BTN", -50, 0, 1.f, 0.f);
|
||||
@ -210,8 +223,10 @@ void CMenu::_initConfig3Menu()
|
||||
_setHideAnim(m_config3BtnGCLoaderM, "CONFIG3/GC_LOADER_MINUS", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_config3BtnGCLoaderP, "CONFIG3/GC_LOADER_PLUS", -50, 0, 1.f, 0.f);
|
||||
|
||||
_setHideAnim(m_config3LblOcarina, "CONFIG3/OCARINA", 50, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_config3BtnOcarina, "CONFIG3/OCARINA_BTN", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_config3LblChannelsType, "CONFIG3/CHANNELS_TYPE", 50, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_config3LblChannelsTypeVal, "CONFIG3/CHANNELS_TYPE_BTN", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_config3BtnChannelsTypeM, "CONFIG3/CHANNELS_TYPE_MINUS", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_config3BtnChannelsTypeP, "CONFIG3/CHANNELS_TYPE_PLUS", -50, 0, 1.f, 0.f);
|
||||
_hideConfig3(true);
|
||||
_textConfig3();
|
||||
}
|
||||
@ -223,6 +238,6 @@ void CMenu::_textConfig3(void)
|
||||
m_btnMgr.setText(m_config3LblGCGameVideo, _t("cfgb5", L"Default GC video mode"));
|
||||
m_btnMgr.setText(m_config3LblGCGameLanguage, _t("cfgb6", L"Default GC game language"));
|
||||
m_btnMgr.setText(m_config3LblGCGameLoader, _t("cfgb2", L"Default GC game loader"));
|
||||
m_btnMgr.setText(m_config3LblOcarina, _t("cfgb1", L"Ocarina"));
|
||||
m_btnMgr.setText(m_config3LblChannelsType, _t("cfgb7", L"Channels Type"));
|
||||
}
|
||||
|
||||
|
@ -35,6 +35,7 @@ void CMenu::_hideGameSettings(bool instant)
|
||||
m_btnMgr.hide(m_gameSettingsBtnPageP, instant);
|
||||
m_btnMgr.hide(m_gameSettingsBtnBack, instant);
|
||||
m_btnMgr.hide(m_gameSettingsLblTitle, instant);
|
||||
//Wii & Channels
|
||||
m_btnMgr.hide(m_gameSettingsLblManage, instant);
|
||||
m_btnMgr.hide(m_gameSettingsBtnManage, instant);
|
||||
m_btnMgr.hide(m_gameSettingsBtnCategoryMain, instant);
|
||||
@ -47,8 +48,6 @@ void CMenu::_hideGameSettings(bool instant)
|
||||
m_btnMgr.hide(m_gameSettingsBtnVipatch, instant);
|
||||
m_btnMgr.hide(m_gameSettingsLblCountryPatch, instant);
|
||||
m_btnMgr.hide(m_gameSettingsBtnCountryPatch, instant);
|
||||
m_btnMgr.hide(m_gameSettingsLblPrivateServer, instant);
|
||||
m_btnMgr.hide(m_gameSettingsBtnPrivateServer, instant);
|
||||
m_btnMgr.hide(m_gameSettingsLblPatchVidModes, instant);
|
||||
m_btnMgr.hide(m_gameSettingsLblPatchVidModesVal, instant);
|
||||
m_btnMgr.hide(m_gameSettingsBtnPatchVidModesM, instant);
|
||||
@ -57,21 +56,22 @@ void CMenu::_hideGameSettings(bool instant)
|
||||
m_btnMgr.hide(m_gameSettingsLblAspectRatioVal, instant);
|
||||
m_btnMgr.hide(m_gameSettingsBtnAspectRatioP, instant);
|
||||
m_btnMgr.hide(m_gameSettingsBtnAspectRatioM, instant);
|
||||
m_btnMgr.hide(m_gameSettingsLblEmulationVal, instant);
|
||||
m_btnMgr.hide(m_gameSettingsLblEmulation, instant);
|
||||
m_btnMgr.hide(m_gameSettingsBtnEmulationP, instant);
|
||||
m_btnMgr.hide(m_gameSettingsBtnEmulationM, instant);
|
||||
m_btnMgr.hide(m_gameSettingsLblGameIOS, instant);
|
||||
m_btnMgr.hide(m_gameSettingsLblIOS, instant);
|
||||
m_btnMgr.hide(m_gameSettingsBtnIOSP, instant);
|
||||
m_btnMgr.hide(m_gameSettingsBtnIOSM, instant);
|
||||
//
|
||||
m_btnMgr.hide(m_gameSettingsLblEmulation, instant);
|
||||
m_btnMgr.hide(m_gameSettingsLblEmulationVal, instant);
|
||||
m_btnMgr.hide(m_gameSettingsBtnEmulationP, instant);
|
||||
m_btnMgr.hide(m_gameSettingsBtnEmulationM, instant);
|
||||
m_btnMgr.hide(m_gameSettingsLblExtractSave, instant);
|
||||
m_btnMgr.hide(m_gameSettingsBtnExtractSave, instant);
|
||||
m_btnMgr.hide(m_gameSettingsLblFlashSave, instant);
|
||||
m_btnMgr.hide(m_gameSettingsBtnFlashSave, instant);
|
||||
m_btnMgr.hide(m_gameSettingsLblApploader, instant);
|
||||
m_btnMgr.hide(m_gameSettingsBtnApploader, instant);
|
||||
//shared
|
||||
m_btnMgr.hide(m_gameSettingsLblPrivateServer, instant);
|
||||
m_btnMgr.hide(m_gameSettingsBtnPrivateServer, instant);
|
||||
//GC, Wii, and Channels
|
||||
m_btnMgr.hide(m_gameSettingsLblGameLanguage, instant);
|
||||
m_btnMgr.hide(m_gameSettingsLblLanguage, instant);
|
||||
m_btnMgr.hide(m_gameSettingsBtnLanguageP, instant);
|
||||
@ -111,7 +111,9 @@ void CMenu::_hideGameSettings(bool instant)
|
||||
m_btnMgr.hide(m_gameSettingsBtnDeflicker, instant);
|
||||
m_btnMgr.hide(m_gameSettingsLblArcade, instant);
|
||||
m_btnMgr.hide(m_gameSettingsBtnArcade, instant);
|
||||
//
|
||||
// Channels only
|
||||
m_btnMgr.hide(m_gameSettingsLblApploader, instant);
|
||||
m_btnMgr.hide(m_gameSettingsBtnApploader, instant);
|
||||
m_btnMgr.hide(m_gameSettingsLblCustom, instant);
|
||||
m_btnMgr.hide(m_gameSettingsBtnCustom, instant);
|
||||
m_btnMgr.hide(m_gameSettingsLblLaunchNK, instant);
|
||||
@ -448,7 +450,7 @@ void CMenu::_showGameSettings(void)
|
||||
u32 maxpage = m_gameSettingsMaxPgs;
|
||||
|
||||
m_btnMgr.setText(m_gameSettingsLblPage, wfmt(L"%i / %i", page, maxpage));
|
||||
m_btnMgr.setText(m_gameSettingsBtnOcarina, _optBoolToString(m_gcfg2.getOptBool(id, "cheat", 0)));// cheats default to 0 off
|
||||
m_btnMgr.setText(m_gameSettingsBtnOcarina, _optBoolToString(m_gcfg2.getOptBool(id, "cheat", 0)));
|
||||
m_btnMgr.setText(m_gameSettingsBtnLED, _optBoolToString(m_gcfg2.getOptBool(id, "led", 0)));
|
||||
|
||||
i = min((u32)m_gcfg2.getInt(id, "debugger", 0), ARRAY_SIZE(CMenu::_debugger) - 1u);
|
||||
@ -458,12 +460,12 @@ void CMenu::_showGameSettings(void)
|
||||
{
|
||||
//widescreen is shared by devo and nintendont, in the future might seperate them
|
||||
m_btnMgr.setText(m_gameSettingsLblWidescreen, _t("cfgg36", L"Widescreen Patch"));
|
||||
m_btnMgr.setText(m_gameSettingsBtnWidescreen, _optBoolToString(m_gcfg2.getOptBool(id, "widescreen", m_cfg.getBool(GC_DOMAIN, "widescreen", 0))));
|
||||
m_btnMgr.setText(m_gameSettingsBtnDevoMemcardEmu, _optBoolToString(m_gcfg2.getOptBool(id, "devo_memcard_emu", 0)));
|
||||
m_btnMgr.setText(m_gameSettingsBtnUSB_HID, _optBoolToString(m_gcfg2.getOptBool(id, "USB_HID", m_cfg.getBool(GC_DOMAIN, "USB_HID", 0))));
|
||||
m_btnMgr.setText(m_gameSettingsBtnNATIVE_CTL, _optBoolToString(m_gcfg2.getOptBool(id, "NATIVE_CTL", m_cfg.getBool(GC_DOMAIN, "NATIVE_CTL", 0))));
|
||||
m_btnMgr.setText(m_gameSettingsBtnDeflicker, _optBoolToString(m_gcfg2.getOptBool(id, "Deflicker", m_cfg.getBool(GC_DOMAIN, "Deflicker", 0))));
|
||||
m_btnMgr.setText(m_gameSettingsBtnArcade, _optBoolToString(m_gcfg2.getOptBool(id, "triforce_arcade", m_cfg.getBool(GC_DOMAIN, "triforce_arcade", 0))));
|
||||
m_btnMgr.setText(m_gameSettingsBtnWidescreen, _optBoolToString(m_gcfg2.getOptBool(id, "widescreen", 0)));
|
||||
m_btnMgr.setText(m_gameSettingsBtnDevoMemcardEmu, _optBoolToString(m_gcfg2.getOptBool(id, "devo_memcard_emu", 2)));
|
||||
m_btnMgr.setText(m_gameSettingsBtnUSB_HID, _optBoolToString(m_gcfg2.getOptBool(id, "usb_hid", 2)));
|
||||
m_btnMgr.setText(m_gameSettingsBtnNATIVE_CTL, _optBoolToString(m_gcfg2.getOptBool(id, "native_ctl", 2)));
|
||||
m_btnMgr.setText(m_gameSettingsBtnDeflicker, _optBoolToString(m_gcfg2.getOptBool(id, "Deflicker", 0)));
|
||||
m_btnMgr.setText(m_gameSettingsBtnArcade, _optBoolToString(m_gcfg2.getOptBool(id, "triforce_arcade", 0)));
|
||||
|
||||
i = min((u32)m_gcfg2.getInt(id, "video_mode", 0), ARRAY_SIZE(CMenu::_GCvideoModes) - 1u);
|
||||
m_btnMgr.setText(m_gameSettingsLblVideo, _t(CMenu::_GCvideoModes[i].id, CMenu::_GCvideoModes[i].text));
|
||||
@ -474,12 +476,12 @@ void CMenu::_showGameSettings(void)
|
||||
if(GCLoader == NINTENDONT)
|
||||
{
|
||||
m_btnMgr.setText(m_gameSettingsLblEmuMemCard, _t("cfgg47", L"Emulated MemCard"));
|
||||
i = min((u32)m_gcfg2.getInt(id, "nin_memcard", 0), ARRAY_SIZE(CMenu::_NinEmuCard) - 1u);
|
||||
i = min((u32)m_gcfg2.getInt(id, "emu_memcard", 0), ARRAY_SIZE(CMenu::_NinEmuCard) - 1u);
|
||||
m_btnMgr.setText(m_gameSettingsLblEmuMemCard_Val, _t(CMenu::_NinEmuCard[i].id, CMenu::_NinEmuCard[i].text));
|
||||
if(IsOnWiiU())
|
||||
{
|
||||
m_btnMgr.setText(m_gameSettingsLblWidescreen, _t("cfgg46", L"WiiU Widescreen"));
|
||||
m_btnMgr.setText(m_gameSettingsBtnWidescreen, _optBoolToString(m_gcfg2.getOptBool(id, "wiiu_widescreen", m_cfg.getBool(GC_DOMAIN, "wiiu_widescreen", 0))));
|
||||
m_btnMgr.setText(m_gameSettingsBtnWidescreen, _optBoolToString(m_gcfg2.getOptBool(id, "wiiu_widescreen", 0)));
|
||||
}
|
||||
}
|
||||
|
||||
@ -490,9 +492,9 @@ void CMenu::_showGameSettings(void)
|
||||
{
|
||||
m_btnMgr.setText(m_gameSettingsBtnVipatch, _optBoolToString(m_gcfg2.getOptBool(id, "vipatch", 0)));
|
||||
m_btnMgr.setText(m_gameSettingsBtnCountryPatch, _optBoolToString(m_gcfg2.getOptBool(id, "country_patch", 0)));
|
||||
m_btnMgr.setText(m_gameSettingsBtnPrivateServer, _optBoolToString(m_gcfg2.getOptBool(id, "private_server", m_cfg.getBool(WII_DOMAIN, "private_server", 0))));
|
||||
m_btnMgr.setText(m_gameSettingsBtnPrivateServer, _optBoolToString(m_gcfg2.getOptBool(id, "private_server", 0)));
|
||||
m_btnMgr.setText(m_gameSettingsBtnCustom, _optBoolToString(m_gcfg2.getOptBool(id, "custom", 0)));
|
||||
m_btnMgr.setText(m_gameSettingsBtnLaunchNK, _optBoolToString(m_gcfg2.getOptBool(id, "useneek", m_cfg.getBool(CHANNEL_DOMAIN, "useneek", 0))));
|
||||
m_btnMgr.setText(m_gameSettingsBtnLaunchNK, _optBoolToString(m_gcfg2.getOptBool(id, "useneek", 0)));
|
||||
m_btnMgr.setText(m_gameSettingsBtnApploader, _optBoolToString(m_gcfg2.getOptBool(id, "apploader", 0)));
|
||||
|
||||
i = min((u32)m_gcfg2.getInt(id, "video_mode", 0), ARRAY_SIZE(CMenu::_VideoModes) - 1u);
|
||||
@ -571,11 +573,7 @@ void CMenu::_gameSettings(void)
|
||||
break;
|
||||
else if(m_btnMgr.selected(m_gameSettingsBtnOcarina))
|
||||
{
|
||||
int intoption = loopNum(m_gcfg2.getBool(id, "cheat") + 1, 3);
|
||||
if(intoption > 1)
|
||||
m_gcfg2.remove(id, "cheat");
|
||||
else
|
||||
m_gcfg2.setOptBool(id, "cheat", intoption);
|
||||
m_gcfg2.setBool(id, "cheat", !m_gcfg2.getBool(id, "cheat", 0));
|
||||
_showGameSettings();
|
||||
}
|
||||
else if(m_btnMgr.selected(m_gameSettingsBtnVipatch))
|
||||
@ -602,11 +600,11 @@ void CMenu::_gameSettings(void)
|
||||
error(_t("cfgg49", L"Neek2o Not Found!"));
|
||||
else
|
||||
m_gcfg2.setBool(id, "useneek", !m_gcfg2.getBool(id, "useneek", 0));
|
||||
_showGameSettings();
|
||||
_showGameSettings();
|
||||
}
|
||||
else if(m_btnMgr.selected(m_gameSettingsBtnDevoMemcardEmu))
|
||||
{
|
||||
m_gcfg2.setBool(id, "devo_memcard_emu", !m_gcfg2.getBool(id, "devo_memcard_emu", 0));
|
||||
m_gcfg2.setOptBool(id, "devo_memcard_emu", loopNum(m_gcfg2.getOptBool(id, "devo_memcard_emu") + 1, 3));
|
||||
_showGameSettings();
|
||||
}
|
||||
else if(m_btnMgr.selected(m_gameSettingsBtnWidescreen))
|
||||
@ -644,7 +642,7 @@ void CMenu::_gameSettings(void)
|
||||
else if(m_btnMgr.selected(m_gameSettingsBtnEmuMemCard_P) || m_btnMgr.selected(m_gameSettingsBtnEmuMemCard_M))
|
||||
{
|
||||
s8 direction = m_btnMgr.selected(m_gameSettingsBtnEmuMemCard_P) ? 1 : -1;
|
||||
m_gcfg2.setInt(id, "nin_memcard", (int)loopNum((u32)m_gcfg2.getInt(id, "nin_memcard", 2) + direction, ARRAY_SIZE(CMenu::_NinEmuCard)));
|
||||
m_gcfg2.setInt(id, "emu_memcard", (int)loopNum((u32)m_gcfg2.getInt(id, "emu_memcard", 2) + direction, ARRAY_SIZE(CMenu::_NinEmuCard)));
|
||||
_showGameSettings();
|
||||
}
|
||||
else if(m_btnMgr.selected(m_gameSettingsBtnGCLoader_P) || m_btnMgr.selected(m_gameSettingsBtnGCLoader_M))
|
||||
@ -726,7 +724,7 @@ void CMenu::_gameSettings(void)
|
||||
}
|
||||
else if(m_btnMgr.selected(m_gameSettingsBtnNATIVE_CTL))
|
||||
{
|
||||
m_gcfg2.setBool(id, "NATIVE_CTL", !m_gcfg2.getBool(id, "NATIVE_CTL", 0));
|
||||
m_gcfg2.setOptBool(id, "native_ctl", loopNum(m_gcfg2.getOptBool(id, "native_ctl") + 1, 3));
|
||||
_showGameSettings();
|
||||
}
|
||||
else if(m_btnMgr.selected(m_gameSettingsBtnDeflicker))
|
||||
@ -736,7 +734,7 @@ void CMenu::_gameSettings(void)
|
||||
}
|
||||
else if(m_btnMgr.selected(m_gameSettingsBtnUSB_HID))
|
||||
{
|
||||
m_gcfg2.setBool(id, "USB_HID", !m_gcfg2.getBool(id, "USB_HID", 0));
|
||||
m_gcfg2.setOptBool(id, "usb_hid", loopNum(m_gcfg2.getOptBool(id, "usb_hid") + 1, 3));
|
||||
_showGameSettings();
|
||||
}
|
||||
else if(m_btnMgr.selected(m_gameSettingsBtnArcade))
|
||||
@ -749,7 +747,7 @@ void CMenu::_gameSettings(void)
|
||||
m_gcfg2.setBool(id, "private_server", !m_gcfg2.getBool(id, "private_server", 0));
|
||||
_showGameSettings();
|
||||
}
|
||||
else if(m_btnMgr.selected(m_gameSettingsBtnCategoryMain) && !m_locked)
|
||||
else if(m_btnMgr.selected(m_gameSettingsBtnCategoryMain))
|
||||
{
|
||||
_hideGameSettings();
|
||||
_CategorySettings(true);
|
||||
|
@ -305,7 +305,7 @@ void CMenu::_showDownload(void)
|
||||
_setBg(m_downloadBg, m_downloadBg);
|
||||
m_btnMgr.show(m_downloadLblGameTDB);
|
||||
m_btnMgr.show(m_downloadLblTitle);
|
||||
m_btnMgr.show(m_downloadBtnCancel);
|
||||
m_btnMgr.show(m_downloadBtnBack);
|
||||
m_btnMgr.show(m_downloadLblCovers);
|
||||
m_btnMgr.show(m_downloadBtnAll);
|
||||
m_btnMgr.show(m_downloadBtnMissing);
|
||||
@ -435,7 +435,7 @@ int CMenu::_initNetwork()
|
||||
int CMenu::_coverDownloader(bool missingOnly)
|
||||
{
|
||||
vector<string> coverList;
|
||||
vector<dir_discHdr> pluginCoverList;
|
||||
//vector<dir_discHdr> pluginCoverList;
|
||||
|
||||
int count = 0, countFlat = 0;
|
||||
float listWeight = missingOnly ? 0.125f : 0.f; // 1/8 of the progress bar for testing the PNGs we already have
|
||||
@ -468,8 +468,8 @@ int CMenu::_coverDownloader(bool missingOnly)
|
||||
c_gameTDB.SetLanguageCode(m_curLanguage.c_str());
|
||||
}
|
||||
|
||||
Config m_checksums;
|
||||
m_checksums.load(fmt("%s/%s", m_settingsDir.c_str(), PLUGIN_CRCS_FILENAME));
|
||||
//Config m_checksums;
|
||||
//m_checksums.load(fmt("%s/%s", m_settingsDir.c_str(), PLUGIN_CRCS_FILENAME));
|
||||
|
||||
if (m_coverDLGameId.empty())
|
||||
{
|
||||
@ -484,13 +484,14 @@ int CMenu::_coverDownloader(bool missingOnly)
|
||||
const char *id = NULL;
|
||||
if(m_gameList[i].type == TYPE_PLUGIN)
|
||||
{
|
||||
char gamePath[256];
|
||||
continue;
|
||||
/* char gamePath[256];
|
||||
if(strchr(m_gameList[i].path, '/') != NULL)
|
||||
strncpy(gamePath, strrchr(m_gameList[i].path, '/') + 1, sizeof(gamePath));
|
||||
else
|
||||
strncpy(gamePath, m_gameList[i].path, sizeof(gamePath));
|
||||
path = fmt_malloc("%s/%s.png", m_boxPicDir.c_str(), gamePath);
|
||||
id = path;
|
||||
id = path;*/
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -499,8 +500,8 @@ int CMenu::_coverDownloader(bool missingOnly)
|
||||
}
|
||||
if(!missingOnly || (id != NULL && !CoverFlow.fullCoverCached(id) && path != NULL && !checkPNGFile(path)))
|
||||
{
|
||||
if(m_gameList[i].type == TYPE_PLUGIN)
|
||||
pluginCoverList.push_back(m_gameList[i]);
|
||||
//if(m_gameList[i].type == TYPE_PLUGIN)
|
||||
// pluginCoverList.push_back(m_gameList[i]);
|
||||
if(id != NULL)
|
||||
coverList.push_back(id);
|
||||
}
|
||||
@ -539,7 +540,7 @@ int CMenu::_coverDownloader(bool missingOnly)
|
||||
for(u32 i = 0; i < coverList.size() && !m_thrdStop; ++i)
|
||||
{
|
||||
string url;
|
||||
const char *domain = _domainFromView();
|
||||
const char *domain = "NEWID";
|
||||
bool success = false;
|
||||
bool original = true;
|
||||
bool custom = false;
|
||||
@ -584,9 +585,9 @@ int CMenu::_coverDownloader(bool missingOnly)
|
||||
{
|
||||
for (u32 j = 0; !success && j < fmtURLBox.size() && !m_thrdStop; ++j)
|
||||
{
|
||||
if(pluginCoverList.size() && pluginCoverList[i].type == TYPE_PLUGIN)
|
||||
/*if(pluginCoverList.size() && pluginCoverList[i].type == TYPE_PLUGIN)
|
||||
url = m_plugin.GenerateCoverLink(pluginCoverList[i], fmtURLBox[j], m_checksums);
|
||||
else
|
||||
else*/
|
||||
url = makeURL(fmtURLBox[j], newID, countryCode(newID));
|
||||
if (j == 0) ++step;
|
||||
m_thrdStep = listWeight + dlWeight * (float)step / (float)nbSteps;
|
||||
@ -600,8 +601,8 @@ int CMenu::_coverDownloader(bool missingOnly)
|
||||
bool tdl = false;
|
||||
if(download.data != NULL && download.size > 0 && checkPNGBuf(download.data))
|
||||
break;
|
||||
if(pluginCoverList.size() && pluginCoverList[i].type == TYPE_PLUGIN)
|
||||
break;
|
||||
//if(pluginCoverList.size() && pluginCoverList[i].type == TYPE_PLUGIN)
|
||||
// break;
|
||||
switch( o )
|
||||
{
|
||||
case EN:
|
||||
@ -727,9 +728,9 @@ int CMenu::_coverDownloader(bool missingOnly)
|
||||
{
|
||||
for (u32 j = 0; !success && j < fmtURLCBox.size() && !m_thrdStop; ++j)
|
||||
{
|
||||
if(pluginCoverList.size() && pluginCoverList[i].type == TYPE_PLUGIN)
|
||||
/*if(pluginCoverList.size() && pluginCoverList[i].type == TYPE_PLUGIN)
|
||||
url = m_plugin.GenerateCoverLink(pluginCoverList[i], fmtURLCBox[j], m_checksums);
|
||||
else
|
||||
else*/
|
||||
url = makeURL(fmtURLCBox[j], newID, countryCode(newID));
|
||||
if (j == 0) ++step;
|
||||
m_thrdStep = listWeight + dlWeight * (float)step / (float)nbSteps;
|
||||
@ -742,8 +743,8 @@ int CMenu::_coverDownloader(bool missingOnly)
|
||||
bool tdl = false;
|
||||
if(download.data != NULL && download.size > 0 && checkPNGBuf(download.data))
|
||||
break;
|
||||
if(pluginCoverList.size() && pluginCoverList[i].type == TYPE_PLUGIN)
|
||||
break;
|
||||
//if(pluginCoverList.size() && pluginCoverList[i].type == TYPE_PLUGIN)
|
||||
// break;
|
||||
switch( o )
|
||||
{
|
||||
case EN:
|
||||
@ -873,9 +874,9 @@ int CMenu::_coverDownloader(bool missingOnly)
|
||||
if (m_thrdStop) break;
|
||||
for (u32 j = 0; !success && j < fmtURLFlat.size() && !m_thrdStop; ++j)
|
||||
{
|
||||
if(pluginCoverList.size() && pluginCoverList[i].type == TYPE_PLUGIN)
|
||||
/*if(pluginCoverList.size() && pluginCoverList[i].type == TYPE_PLUGIN)
|
||||
url = m_plugin.GenerateCoverLink(pluginCoverList[i], fmtURLFlat[j], m_checksums);
|
||||
else
|
||||
else*/
|
||||
url = makeURL(fmtURLFlat[j], newID, countryCode(newID));
|
||||
LWP_MutexLock(m_mutex);
|
||||
_setThrdMsg(wfmt(_fmt("dlmsg8", L"Full cover not found. Downloading from %s"), url.c_str()), listWeight + dlWeight * (float)step / (float)nbSteps);
|
||||
@ -887,8 +888,8 @@ int CMenu::_coverDownloader(bool missingOnly)
|
||||
bool tdl = false;
|
||||
if(download.data != NULL && download.size > 0 && checkPNGBuf(download.data))
|
||||
break;
|
||||
if(pluginCoverList.size() && pluginCoverList[i].type == TYPE_PLUGIN)
|
||||
break;
|
||||
//if(pluginCoverList.size() && pluginCoverList[i].type == TYPE_PLUGIN)
|
||||
// break;
|
||||
switch( o )
|
||||
{
|
||||
case EN:
|
||||
@ -1152,7 +1153,7 @@ int CMenu::_coverDownloader(bool missingOnly)
|
||||
if(c_gameTDB.IsLoaded())
|
||||
c_gameTDB.CloseFile();
|
||||
coverList.clear();
|
||||
m_checksums.unload();
|
||||
//m_checksums.unload();
|
||||
m_newID.unload();
|
||||
}
|
||||
LWP_MutexLock(m_mutex);
|
||||
@ -1162,7 +1163,7 @@ int CMenu::_coverDownloader(bool missingOnly)
|
||||
_setThrdMsg(wfmt(_fmt("dlmsg9", L"%i/%i files downloaded. %i are front covers only."), count + countFlat, n, countFlat), 1.f);
|
||||
LWP_MutexUnlock(m_mutex);
|
||||
m_thrdWorking = false;
|
||||
pluginCoverList.clear();
|
||||
//pluginCoverList.clear();
|
||||
free(buffer);
|
||||
return 0;
|
||||
}
|
||||
@ -1181,7 +1182,7 @@ void CMenu::_download(string gameId)
|
||||
m_thrdStop = false;
|
||||
m_thrdMessageAdded = false;
|
||||
|
||||
if(gameId.size() && CoverFlow.getHdr()->type == TYPE_PLUGIN)
|
||||
/*if(gameId.size() && CoverFlow.getHdr()->type == TYPE_PLUGIN)
|
||||
{
|
||||
char gamePath[256];
|
||||
if(strchr(CoverFlow.getHdr()->path, '/') != NULL)
|
||||
@ -1190,7 +1191,7 @@ void CMenu::_download(string gameId)
|
||||
strncpy(gamePath, CoverFlow.getHdr()->path, sizeof(gamePath));
|
||||
m_coverDLGameId = gamePath;
|
||||
}
|
||||
else
|
||||
else*/
|
||||
m_coverDLGameId = gameId;
|
||||
|
||||
while(!m_exit)
|
||||
@ -1339,8 +1340,14 @@ void CMenu::_download(string gameId)
|
||||
}
|
||||
else if (m_btnMgr.selected(m_downloadBtnBack) && !m_thrdWorking)
|
||||
{
|
||||
_hideSettings();
|
||||
_showDownload();
|
||||
if(settingsmenu)
|
||||
{
|
||||
settingsmenu = false;
|
||||
_hideSettings();
|
||||
_showDownload();
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
else if ((m_btnMgr.selected(m_downloadBtnEN) || m_btnMgr.selected(m_downloadBtnENs)) && !m_thrdWorking)
|
||||
{
|
||||
@ -1616,43 +1623,20 @@ void CMenu::_initDownloadMenu()
|
||||
|
||||
void CMenu::_textDownload(void)
|
||||
{
|
||||
m_btnMgr.setText(m_downloadBtnCancel, _t("dl1", L"Cancel"));
|
||||
m_btnMgr.setText(m_downloadLblTitle, _t("dl5", L"Download"));
|
||||
m_btnMgr.setText(m_downloadLblCovers, _t("dl8", L"Covers"));
|
||||
m_btnMgr.setText(m_downloadBtnAll, _t("dl3", L"All"));
|
||||
m_btnMgr.setText(m_downloadBtnMissing, _t("dl4", L"Missing"));
|
||||
m_btnMgr.setText(m_downloadLblTitle, _t("dl5", L"Download"));
|
||||
m_btnMgr.setText(m_downloadBtnGameTDBDownload, _t("dl6", L"Download"));
|
||||
m_btnMgr.setText(m_downloadLblCovers, _t("dl8", L"Covers"));
|
||||
m_btnMgr.setText(m_downloadLblCoverSet, _t("dl15", L"Cover download settings"));
|
||||
m_btnMgr.setText(m_downloadBtnCoverSet, _t("dl16", L"Set"));
|
||||
m_btnMgr.setText(m_downloadLblGameTDBDownload, _t("dl12", L"GameTDB"));
|
||||
m_btnMgr.setText(m_downloadBtnGameTDBDownload, _t("dl6", L"Download"));
|
||||
m_btnMgr.setText(m_downloadLblGameTDB, _t("dl10", L"Please donate\nto GameTDB.com"));
|
||||
m_btnMgr.setText(m_downloadBtnCancel, _t("dl1", L"Cancel"));
|
||||
|
||||
m_btnMgr.setText(m_downloadLblSetTitle, _t("dl17", L"Cover Download Settings"));
|
||||
m_btnMgr.setText(m_downloadLblCoverPrio, _t("dl13", L"Download order"));
|
||||
m_btnMgr.setText(m_downloadLblRegion, _t("dl14", L"Select regions to check for covers:"));
|
||||
m_btnMgr.setText(m_downloadLblCoverSet, _t("dl15", L"Cover download settings"));
|
||||
m_btnMgr.setText(m_downloadBtnCoverSet, _t("dl16", L"Set"));
|
||||
m_btnMgr.setText(m_downloadLblSetTitle, _t("dl17", L"Cover download settings"));
|
||||
m_btnMgr.setText(m_downloadBtnEN, L"EN");
|
||||
m_btnMgr.setText(m_downloadBtnJA, L"JA");
|
||||
m_btnMgr.setText(m_downloadBtnFR, L"FR");
|
||||
m_btnMgr.setText(m_downloadBtnDE, L"DE");
|
||||
m_btnMgr.setText(m_downloadBtnES, L"ES");
|
||||
m_btnMgr.setText(m_downloadBtnIT, L"IT");
|
||||
m_btnMgr.setText(m_downloadBtnNL, L"NL");
|
||||
m_btnMgr.setText(m_downloadBtnPT, L"PT");
|
||||
m_btnMgr.setText(m_downloadBtnRU, L"RU");
|
||||
m_btnMgr.setText(m_downloadBtnKO, L"KO");
|
||||
m_btnMgr.setText(m_downloadBtnZHCN, L"ZHCN");
|
||||
m_btnMgr.setText(m_downloadBtnAU, L"AU");
|
||||
m_btnMgr.setText(m_downloadBtnENs, L"EN");
|
||||
m_btnMgr.setText(m_downloadBtnJAs, L"JA");
|
||||
m_btnMgr.setText(m_downloadBtnFRs, L"FR");
|
||||
m_btnMgr.setText(m_downloadBtnDEs, L"DE");
|
||||
m_btnMgr.setText(m_downloadBtnESs, L"ES");
|
||||
m_btnMgr.setText(m_downloadBtnITs, L"IT");
|
||||
m_btnMgr.setText(m_downloadBtnNLs, L"NL");
|
||||
m_btnMgr.setText(m_downloadBtnPTs, L"PT");
|
||||
m_btnMgr.setText(m_downloadBtnRUs, L"RU");
|
||||
m_btnMgr.setText(m_downloadBtnKOs, L"KO");
|
||||
m_btnMgr.setText(m_downloadBtnZHCNs, L"ZHCN");
|
||||
m_btnMgr.setText(m_downloadBtnAUs, L"AU");
|
||||
m_btnMgr.setText(m_downloadBtnBack, _t("dl18", L"Back"));
|
||||
}
|
||||
|
||||
|
@ -26,6 +26,7 @@ void CMenu::error(const wstringEx &msg)
|
||||
_hideGameInfo();
|
||||
_hideCheatDownload();
|
||||
_hideGameSettings();
|
||||
_hideSource();
|
||||
_hideWaitMessage();
|
||||
m_btnMgr.setText(m_errorLblMessage, msg, true);
|
||||
_showError();
|
||||
|
@ -47,6 +47,7 @@ char folderPath[MAX_FAT_PATH];
|
||||
char tmpPath[MAX_FAT_PATH];
|
||||
u8 explorer_partition = 0;
|
||||
bool folderExplorer = false;
|
||||
bool wadsOnly = false;
|
||||
|
||||
void CMenu::_hideExplorer(bool instant)
|
||||
{
|
||||
@ -99,11 +100,17 @@ void CMenu::_Explorer(void)
|
||||
while(!m_exit)
|
||||
{
|
||||
_mainLoopCommon();
|
||||
if(BTN_HOME_PRESSED || BTN_B_PRESSED)
|
||||
if(BTN_B_PRESSED)
|
||||
{
|
||||
memset(folderPath, 0, MAX_FAT_PATH);
|
||||
break;
|
||||
}
|
||||
else if(BTN_HOME_PRESSED)
|
||||
{
|
||||
memset(dir, 0, MAX_FAT_PATH);
|
||||
memset(folderPath, 0, MAX_FAT_PATH);
|
||||
_refreshExplorer();
|
||||
}
|
||||
else if(BTN_PLUS_PRESSED || BTN_RIGHT_PRESSED)
|
||||
{
|
||||
_refreshExplorer(1);
|
||||
@ -366,7 +373,11 @@ void CMenu::_refreshExplorer(s8 direction)
|
||||
if(pent->d_type == DT_DIR)
|
||||
dirs++;
|
||||
else if(pent->d_type == DT_REG)
|
||||
files++;
|
||||
{
|
||||
const char *fileType = strrchr(pent->d_name, '.');
|
||||
if(!wadsOnly || (fileType != NULL && strcasecmp(fileType, ".wad") == 0))
|
||||
files++;
|
||||
}
|
||||
}
|
||||
u32 pos = 0;
|
||||
if(elements != NULL)
|
||||
@ -397,8 +408,13 @@ void CMenu::_refreshExplorer(s8 direction)
|
||||
continue;
|
||||
if(pent->d_type == DT_REG)
|
||||
{
|
||||
memcpy(elements[pos].name, pent->d_name, NAME_MAX);
|
||||
pos++;
|
||||
// here we will check pent->d_name to make sure it's a wad file and add it if it is
|
||||
const char *fileType = strrchr(pent->d_name, '.');
|
||||
if(!wadsOnly || (fileType != NULL && strcasecmp(fileType, ".wad") == 0))
|
||||
{
|
||||
memcpy(elements[pos].name, pent->d_name, NAME_MAX);
|
||||
pos++;
|
||||
}
|
||||
}
|
||||
}
|
||||
std::sort(elements+dirs, elements+pos, list_element_cmp);
|
||||
@ -444,3 +460,10 @@ const char *CMenu::_FolderExplorer(const char *startPath)
|
||||
*strrchr(folderPath, '/') = '\0';
|
||||
return folderPath;
|
||||
}
|
||||
|
||||
void CMenu::_wadExplorer(void)
|
||||
{
|
||||
wadsOnly = true;
|
||||
_Explorer();
|
||||
wadsOnly = false;
|
||||
}
|
||||
|
@ -122,8 +122,13 @@ const CMenu::SOption CMenu::_GClanguages[8] = {
|
||||
{ "lngdut", L"Dutch" }
|
||||
};
|
||||
|
||||
const CMenu::SOption CMenu::_ChannelsType[3] = {
|
||||
{ "ChanReal", L"Real NAND" },
|
||||
{ "ChanEmu", L"Emu NAND" },
|
||||
{ "ChanBoth", L"Both" },
|
||||
};
|
||||
|
||||
const CMenu::SOption CMenu::_NandEmu[2] = {
|
||||
//{ "SaveOff", L"Off" },
|
||||
{ "NANDpart", L"Partial" },
|
||||
{ "NANDfull", L"Full" },
|
||||
};
|
||||
@ -276,7 +281,6 @@ static u8 GetRequestedGameIOS(dir_discHdr *hdr)
|
||||
|
||||
void CMenu::_hideGame(bool instant)
|
||||
{
|
||||
m_gameSelected = false;
|
||||
_cleanupVideo();
|
||||
m_fa.unload();
|
||||
CoverFlow.showCover();
|
||||
@ -371,26 +375,27 @@ static const char *getVideoDefaultPath(const string &videoDir)
|
||||
|
||||
bool CMenu::_startVideo()
|
||||
{
|
||||
const dir_discHdr *GameHdr = CoverFlow.getHdr();
|
||||
char curId3[4];
|
||||
memset(curId3, 0, 4);
|
||||
const char *videoId = CoverFlow.getPathId(CoverFlow.getHdr());
|
||||
if(!NoGameID(CoverFlow.getHdr()->type))
|
||||
const char *videoId = CoverFlow.getPathId(GameHdr);
|
||||
if(!NoGameID(GameHdr->type))
|
||||
{ //id3
|
||||
memcpy(curId3, CoverFlow.getId(), 3);
|
||||
memcpy(curId3, GameHdr->id, 3);
|
||||
videoId = curId3;
|
||||
}
|
||||
const char *videoPath = getVideoPath(m_videoDir, videoId);
|
||||
const char *THP_Path = fmt("%s.thp", videoPath);
|
||||
if(!fsop_FileExist(THP_Path))
|
||||
{
|
||||
if(m_current_view == COVERFLOW_PLUGIN)
|
||||
if(GameHdr->type == TYPE_PLUGIN)
|
||||
{
|
||||
videoPath = getVideoDefaultPath(m_videoDir);
|
||||
THP_Path = fmt("%s.thp", videoPath);
|
||||
}
|
||||
else if(!NoGameID(CoverFlow.getHdr()->type))
|
||||
else if(!NoGameID(GameHdr->type))
|
||||
{
|
||||
videoPath = getVideoPath(m_videoDir, CoverFlow.getId());
|
||||
videoPath = getVideoPath(m_videoDir, GameHdr->id);
|
||||
THP_Path = fmt("%s.thp", videoPath);
|
||||
}
|
||||
}
|
||||
@ -424,7 +429,7 @@ void CMenu::_game(bool launch)
|
||||
memcpy(hdr, CoverFlow.getHdr(), sizeof(dir_discHdr));
|
||||
|
||||
const char *id = NULL;
|
||||
char tmp1[74];// title plus / plus magic#
|
||||
char tmp1[74];// title/magic#
|
||||
memset(tmp1, 0, 74);
|
||||
char tmp2[64];
|
||||
memset(tmp2, 0, 64);
|
||||
@ -447,9 +452,9 @@ void CMenu::_game(bool launch)
|
||||
}
|
||||
|
||||
m_zoom_banner = m_cfg.getBool(_domainFromView(), "show_full_banner", false);
|
||||
if(NoGameID(hdr->type))
|
||||
if(NoGameID(hdr->type))//need to fix this
|
||||
{
|
||||
bool video_available = (m_current_view == COVERFLOW_PLUGIN && fsop_FileExist(fmt("%s.thp", getVideoDefaultPath(m_videoDir)))) ||
|
||||
bool video_available = (hdr->type == TYPE_PLUGIN && fsop_FileExist(fmt("%s.thp", getVideoDefaultPath(m_videoDir)))) ||
|
||||
fsop_FileExist(fmt("%s.thp", getVideoPath(m_videoDir, CoverFlow.getPathId(hdr))));
|
||||
m_zoom_banner = m_zoom_banner && video_available;
|
||||
m_cfg.setBool(_domainFromView(), "show_full_banner", m_zoom_banner);
|
||||
@ -478,6 +483,7 @@ void CMenu::_game(bool launch)
|
||||
startGameSound = 1;
|
||||
_playGameSound();
|
||||
}
|
||||
/* move and zoom flipped cover */
|
||||
if(coverFlipped &&
|
||||
(BTN_PLUS_PRESSED || BTN_MINUS_PRESSED ||
|
||||
BTN_LEFT_PRESSED || BTN_RIGHT_PRESSED ||
|
||||
@ -492,7 +498,7 @@ void CMenu::_game(bool launch)
|
||||
}
|
||||
else if(BTN_LEFT_PRESSED || BTN_RIGHT_PRESSED)
|
||||
{
|
||||
if(BTN_LEFT_PRESSED)
|
||||
if(BTN_RIGHT_PRESSED)
|
||||
step = -step;
|
||||
v.x = min(max(-15.f, v.x + step), 15.f);
|
||||
}
|
||||
@ -504,17 +510,22 @@ void CMenu::_game(bool launch)
|
||||
}
|
||||
CoverFlow.setCoverFlipPos(v);
|
||||
}
|
||||
if(BTN_B_PRESSED && !m_locked && (m_btnMgr.selected(m_gameBtnFavoriteOn) || m_btnMgr.selected(m_gameBtnFavoriteOff)))
|
||||
/* if B on favorites btn goto game categories */
|
||||
if(BTN_B_PRESSED && (m_btnMgr.selected(m_gameBtnFavoriteOn) || m_btnMgr.selected(m_gameBtnFavoriteOff)))
|
||||
{
|
||||
_hideGame();
|
||||
m_banner.SetShowBanner(false);
|
||||
_CategorySettings(true);
|
||||
if(m_locked)
|
||||
error(_t("errgame15", L"WiiFlow locked! Unlock WiiFlow to use this feature."));
|
||||
else
|
||||
_CategorySettings(true);
|
||||
_showGame();
|
||||
m_banner.SetShowBanner(true);
|
||||
if(!m_gameSound.IsPlaying())
|
||||
startGameSound = -6;
|
||||
continue;
|
||||
}
|
||||
/* exit game menu or reset flipped cover */
|
||||
if(BTN_HOME_PRESSED || BTN_B_PRESSED)
|
||||
{
|
||||
if(BTN_B_PRESSED && coverFlipped)
|
||||
@ -528,6 +539,7 @@ void CMenu::_game(bool launch)
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* press + for game info screen */
|
||||
else if(BTN_PLUS_PRESSED && !NoGameID(hdr->type) && !coverFlipped)
|
||||
{
|
||||
GameTDB m_gametdb;
|
||||
@ -536,15 +548,15 @@ void CMenu::_game(bool launch)
|
||||
{
|
||||
_hideGame();
|
||||
m_banner.SetShowBanner(false);
|
||||
m_gameSelected = true;// guess its reset to true to keep game/banner sound playing (if it is) during gameinfo menu
|
||||
_gameinfo();
|
||||
m_gametdb.CloseFile();
|
||||
_showGame();
|
||||
m_banner.SetShowBanner(true);
|
||||
if(!m_gameSound.IsPlaying())
|
||||
if(!m_gameSound.IsPlaying())// this makes the game sound play when we return
|
||||
startGameSound = -6;
|
||||
}
|
||||
}
|
||||
/* play or stop a video (this is the old video play for non plugin games) */
|
||||
else if(BTN_MINUS_PRESSED && !coverFlipped)
|
||||
{
|
||||
if(m_video_playing)
|
||||
@ -569,11 +581,15 @@ void CMenu::_game(bool launch)
|
||||
}
|
||||
else if(launch || BTN_A_PRESSED)
|
||||
{
|
||||
if(m_btnMgr.selected(m_gameBtnDelete) && !m_locked)
|
||||
if(m_btnMgr.selected(m_gameBtnDelete))
|
||||
{
|
||||
_hideGame();
|
||||
m_banner.SetShowBanner(false);
|
||||
if(hdr->type == TYPE_PLUGIN)
|
||||
if(m_locked)
|
||||
error(_t("errgame15", L"WiiFlow locked! Unlock WiiFlow to use this feature."));
|
||||
else if(hdr->type == TYPE_CHANNEL)
|
||||
error(_t("errgame17", L"Can not delete real NAND Channels!"));
|
||||
else if(hdr->type == TYPE_PLUGIN)
|
||||
{
|
||||
const char *wfcPath = NULL;
|
||||
const char *coverDir = NULL;
|
||||
@ -584,7 +600,8 @@ void CMenu::_game(bool launch)
|
||||
else
|
||||
wfcPath = fmt("%s/%s/%s.wfc", m_cacheDir.c_str(), coverDir, CoverFlow.getPathId(hdr, true));
|
||||
fsop_deleteFile(wfcPath);
|
||||
m_refreshGameList = true;
|
||||
CoverFlow.stopCoverLoader(true);
|
||||
CoverFlow.startCoverLoader();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -594,20 +611,32 @@ void CMenu::_game(bool launch)
|
||||
break;
|
||||
}
|
||||
}
|
||||
_showGame();
|
||||
m_banner.SetShowBanner(true);
|
||||
if(!m_gameSound.IsPlaying())
|
||||
startGameSound = -6;
|
||||
_showGame();
|
||||
}
|
||||
else if(m_btnMgr.selected(m_gameBtnSettings) && !NoGameID(hdr->type) && !m_locked)
|
||||
else if(m_btnMgr.selected(m_gameBtnSettings))
|
||||
{
|
||||
_hideGame();
|
||||
m_gameSelected = true;// reset to true to make sure sound plays during settings
|
||||
|
||||
m_banner.ToggleGameSettings();
|
||||
_gameSettings();
|
||||
m_banner.ToggleGameSettings();
|
||||
|
||||
if(m_locked)
|
||||
{
|
||||
m_banner.SetShowBanner(false);
|
||||
error(_t("errgame15", L"WiiFlow locked! Unlock WiiFlow to use this feature."));
|
||||
m_banner.SetShowBanner(true);
|
||||
}
|
||||
else if(hdr->type == TYPE_PLUGIN)
|
||||
{
|
||||
m_banner.SetShowBanner(false);
|
||||
error(_t("errgame16", L"Not available for plugin games!"));
|
||||
m_banner.SetShowBanner(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_banner.ToggleGameSettings();
|
||||
_gameSettings();
|
||||
m_banner.ToggleGameSettings();
|
||||
}
|
||||
_showGame();
|
||||
if(!m_gameSound.IsPlaying())
|
||||
startGameSound = -6;
|
||||
@ -619,12 +648,24 @@ void CMenu::_game(bool launch)
|
||||
else
|
||||
m_gcfg1.setBool("FAVORITES", id, !m_gcfg1.getBool("FAVORITES", id, false));
|
||||
}
|
||||
else if((m_btnMgr.selected(m_gameBtnAdultOn) || m_btnMgr.selected(m_gameBtnAdultOff)) && !m_locked)
|
||||
else if(m_btnMgr.selected(m_gameBtnAdultOn) || m_btnMgr.selected(m_gameBtnAdultOff))
|
||||
{
|
||||
if(hdr->type == TYPE_PLUGIN)
|
||||
m_gcfg1.setBool("ADULTONLY_PLUGINS", id, !m_gcfg1.getBool("ADULTONLY_PLUGINS", id, false));
|
||||
if(m_locked)
|
||||
{
|
||||
m_banner.SetShowBanner(false);
|
||||
error(_t("errgame15", L"WiiFlow locked! Unlock WiiFlow to use this feature."));
|
||||
m_banner.SetShowBanner(true);
|
||||
_showGame();
|
||||
if(!m_gameSound.IsPlaying())
|
||||
startGameSound = -6;
|
||||
}
|
||||
else
|
||||
m_gcfg1.setBool("ADULTONLY", id, !m_gcfg1.getBool("ADULTONLY", id, false));
|
||||
{
|
||||
if(hdr->type == TYPE_PLUGIN)
|
||||
m_gcfg1.setBool("ADULTONLY_PLUGINS", id, !m_gcfg1.getBool("ADULTONLY_PLUGINS", id, false));
|
||||
else
|
||||
m_gcfg1.setBool("ADULTONLY", id, !m_gcfg1.getBool("ADULTONLY", id, false));
|
||||
}
|
||||
}
|
||||
else if(m_btnMgr.selected(m_gameBtnBack) || m_btnMgr.selected(m_gameBtnBackFull))
|
||||
{
|
||||
@ -647,9 +688,9 @@ void CMenu::_game(bool launch)
|
||||
_hideGame();
|
||||
MusicPlayer.Stop();
|
||||
_cleanupBanner();
|
||||
m_gcfg2.load(fmt("%s/" GAME_SETTINGS2_FILENAME, m_settingsDir.c_str()));
|
||||
// change to current game's partition and set categories start page for recall later
|
||||
m_cfg.setInt("GENERAL", "cat_startpage", m_catStartPage);
|
||||
m_gcfg2.load(fmt("%s/" GAME_SETTINGS2_FILENAME, m_settingsDir.c_str()));
|
||||
/* change to current game's partition */
|
||||
switch(hdr->type)
|
||||
{
|
||||
case TYPE_CHANNEL:
|
||||
@ -689,10 +730,10 @@ void CMenu::_game(bool launch)
|
||||
if(Playlog_Update(hdr->id, banner_title) < 0)
|
||||
Playlog_Delete();
|
||||
}
|
||||
gprintf("Launching game %s\n", hdr->id);
|
||||
CurrentBanner.ClearBanner();
|
||||
|
||||
/* Finally boot it */
|
||||
gprintf("Launching game %s\n", hdr->id);
|
||||
_launch(hdr);
|
||||
|
||||
if(m_exit)
|
||||
@ -706,6 +747,7 @@ void CMenu::_game(bool launch)
|
||||
m_gcfg2.unload();
|
||||
_showGame();
|
||||
}
|
||||
/* flip cover if mouse over */
|
||||
else if(!coverFlipped)
|
||||
{
|
||||
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
||||
@ -753,7 +795,6 @@ void CMenu::_game(bool launch)
|
||||
if(startGameSound == -10)// if -10 then we moved to new cover
|
||||
{
|
||||
m_gameSelected = false; // deselect game if moved to new cover
|
||||
_setBg(m_gameBg, m_gameBgLQ);
|
||||
memcpy(hdr, CoverFlow.getHdr(), sizeof(dir_discHdr));// get new game header
|
||||
memset(tmp1, 0, 74);
|
||||
memset(tmp2, 0, 64);
|
||||
@ -778,6 +819,28 @@ void CMenu::_game(bool launch)
|
||||
}
|
||||
if(m_show_zone_game && !m_zoom_banner)
|
||||
{
|
||||
m_btnMgr.hide(m_gameBtnPlayFull);
|
||||
m_btnMgr.hide(m_gameBtnBackFull);
|
||||
m_btnMgr.hide(m_gameBtnToggleFull);
|
||||
m_btnMgr.show(m_gameBtnPlay);
|
||||
m_btnMgr.show(m_gameBtnBack);
|
||||
if(!m_fa.isLoaded())
|
||||
m_btnMgr.show(m_gameBtnToggle);
|
||||
else
|
||||
m_btnMgr.hide(m_gameBtnToggle);
|
||||
|
||||
/* show small banner frame if available */
|
||||
if(m_gameLblUser[4] != -1 && !NoGameID(hdr->type) && !m_fa.isLoaded())
|
||||
m_btnMgr.show(m_gameLblUser[4]);
|
||||
else
|
||||
m_btnMgr.hide(m_gameLblUser[4]);
|
||||
|
||||
for(u8 i = 0; i < ARRAY_SIZE(m_gameLblUser) - 1; ++i)
|
||||
if(m_gameLblUser[i] != -1)
|
||||
m_btnMgr.show(m_gameLblUser[i]);
|
||||
|
||||
m_btnMgr.show(m_gameBtnSettings);
|
||||
m_btnMgr.show(m_gameBtnDelete);
|
||||
bool b;
|
||||
if(hdr->type == TYPE_PLUGIN)
|
||||
b = m_gcfg1.getBool("FAVORITES_PLUGINS", id, false);
|
||||
@ -785,36 +848,12 @@ void CMenu::_game(bool launch)
|
||||
b = m_gcfg1.getBool("FAVORITES", id, false);
|
||||
m_btnMgr.show(b ? m_gameBtnFavoriteOn : m_gameBtnFavoriteOff);
|
||||
m_btnMgr.hide(b ? m_gameBtnFavoriteOff : m_gameBtnFavoriteOn);
|
||||
m_btnMgr.show(m_gameBtnPlay);
|
||||
m_btnMgr.show(m_gameBtnBack);
|
||||
if(!m_fa.isLoaded())
|
||||
m_btnMgr.show(m_gameBtnToggle);
|
||||
if(hdr->type == TYPE_PLUGIN)
|
||||
b = m_gcfg1.getBool("ADULTONLY_PLUGINS", id, false);
|
||||
else
|
||||
m_btnMgr.hide(m_gameBtnToggle);
|
||||
m_btnMgr.hide(m_gameBtnPlayFull);
|
||||
m_btnMgr.hide(m_gameBtnBackFull);
|
||||
m_btnMgr.hide(m_gameBtnToggleFull);
|
||||
if(m_gameLblUser[4] != -1 && !NoGameID(hdr->type) && !m_fa.isLoaded())
|
||||
m_btnMgr.show(m_gameLblUser[4]);
|
||||
else
|
||||
m_btnMgr.hide(m_gameLblUser[4]);
|
||||
for(u8 i = 0; i < ARRAY_SIZE(m_gameLblUser) - 1; ++i)
|
||||
{
|
||||
if(m_gameLblUser[i] != -1)
|
||||
m_btnMgr.show(m_gameLblUser[i]);
|
||||
}
|
||||
if(!m_locked)
|
||||
{
|
||||
if(hdr->type == TYPE_PLUGIN)
|
||||
b = m_gcfg1.getBool("ADULTONLY_PLUGINS", id, false);
|
||||
else
|
||||
b = m_gcfg1.getBool("ADULTONLY", id, false);
|
||||
m_btnMgr.show(b ? m_gameBtnAdultOn : m_gameBtnAdultOff);
|
||||
m_btnMgr.hide(b ? m_gameBtnAdultOff : m_gameBtnAdultOn);
|
||||
m_btnMgr.show(m_gameBtnSettings);
|
||||
}
|
||||
if(hdr->type != TYPE_HOMEBREW && hdr->type != TYPE_CHANNEL && !m_locked)
|
||||
m_btnMgr.show(m_gameBtnDelete);
|
||||
b = m_gcfg1.getBool("ADULTONLY", id, false);
|
||||
m_btnMgr.show(b ? m_gameBtnAdultOn : m_gameBtnAdultOff);
|
||||
m_btnMgr.hide(b ? m_gameBtnAdultOff : m_gameBtnAdultOn);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -851,10 +890,11 @@ void CMenu::_game(bool launch)
|
||||
_loadCFLayout(cf_version, true);
|
||||
CoverFlow.applySettings();
|
||||
}
|
||||
m_gameSelected = false;
|
||||
_hideGame();
|
||||
}
|
||||
|
||||
void CMenu::directlaunch(const char *GameID)// from boot arg for wii only
|
||||
void CMenu::directlaunch(const char *GameID)// from boot arg for wii game only
|
||||
{
|
||||
m_directLaunch = true;
|
||||
for(currentPartition = SD; currentPartition < USB8; currentPartition++)
|
||||
@ -904,19 +944,19 @@ void CMenu::_launch(const dir_discHdr *hdr)
|
||||
_launchChannel(&launchHdr);
|
||||
else if(launchHdr.type == TYPE_PLUGIN)
|
||||
{
|
||||
//get dol name and length
|
||||
//get dol name and name length for music plugin
|
||||
const char *plugin_dol_name = m_plugin.GetDolName(launchHdr.settings[0]);
|
||||
u8 plugin_dol_len = strlen(plugin_dol_name);
|
||||
//get title and path from hdr
|
||||
//example rom path - sd:/roms/super mario bros.zip
|
||||
//example scummvm path - kq1-coco3
|
||||
char title[101];
|
||||
memset(&title, 0, sizeof(title));
|
||||
u32 title_len_no_ext = 0;
|
||||
const char *path = NULL;
|
||||
//example rom path - sd:/roms/super mario bros.zip
|
||||
//example scummvm path - kq1-coco3
|
||||
if(strchr(launchHdr.path, ':') != NULL)//it's a rom path
|
||||
{
|
||||
//check if music player plugin, if so launch wiiflow's music player
|
||||
//check if music player plugin, if so set wiiflow's bckgrnd music player to play this song
|
||||
if(plugin_dol_len == 5 && strcasecmp(plugin_dol_name, "music") == 0)
|
||||
{
|
||||
MusicPlayer.LoadFile(launchHdr.path, false);
|
||||
@ -925,7 +965,8 @@ void CMenu::_launch(const dir_discHdr *hdr)
|
||||
}
|
||||
//get rom title after last '/'
|
||||
strncpy(title, strrchr(launchHdr.path, '/') + 1, 100);
|
||||
if(strchr(launchHdr.path, '.') != NULL) // if there's extension get length of title without extension
|
||||
//if there's extension get length of title without extension
|
||||
if(strchr(launchHdr.path, '.') != NULL)
|
||||
title_len_no_ext = strlen(title) - strlen(strrchr(title, '.'));
|
||||
//get path
|
||||
*strrchr(launchHdr.path, '/') = '\0'; //cut title off end of path
|
||||
@ -936,7 +977,7 @@ void CMenu::_launch(const dir_discHdr *hdr)
|
||||
path = launchHdr.path;// kq1-coco3
|
||||
wcstombs(title, launchHdr.title, 63);// King's Quest I: Quest for the Crown (CoCo3/English)
|
||||
}
|
||||
m_cfg.setString(PLUGIN_DOMAIN, "current_item", title);
|
||||
m_cfg.setString(_domainFromView(), "current_item", title);
|
||||
|
||||
const char *device = (currentPartition == 0 ? "sd" : (DeviceHandle.GetFSType(currentPartition) == PART_FS_NTFS ? "ntfs" : "usb"));
|
||||
// I believe the loader is set just in case the user is using a old plugin where the arguments line still requires loader
|
||||
@ -989,8 +1030,8 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool disc)
|
||||
loader = (loader == 0) ? min((u32)m_cfg.getInt(GC_DOMAIN, "default_loader", 1), ARRAY_SIZE(CMenu::_GlobalGCLoaders) - 1u) : loader-1;
|
||||
|
||||
if(disc)
|
||||
loader = 1;
|
||||
if((loader == 1 && !m_nintendont_installed) || (loader == 0 && !m_devo_installed))
|
||||
loader = NINTENDONT;
|
||||
if((loader == NINTENDONT && !m_nintendont_installed) || (loader == DEVOLUTION && !m_devo_installed))
|
||||
{
|
||||
error(_t("errgame11", L"GameCube Loader not found! Can't launch game."));
|
||||
gcLaunchFail = true;
|
||||
@ -1001,7 +1042,7 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool disc)
|
||||
_launchShutdown();
|
||||
m_gcfg1.setInt("PLAYCOUNT", id, m_gcfg1.getInt("PLAYCOUNT", id, 0) + 1);
|
||||
m_gcfg1.setUInt("LASTPLAYED", id, time(NULL));
|
||||
m_cfg.setString(GC_DOMAIN, "current_item", id);
|
||||
m_cfg.setString(_domainFromView(), "current_item", id);
|
||||
|
||||
if(has_enabled_providers() && _initNetwork() == 0)
|
||||
add_game_to_card(id);
|
||||
@ -1023,21 +1064,21 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool disc)
|
||||
|
||||
bool widescreen = m_gcfg2.getBool(id, "widescreen", false);
|
||||
|
||||
if(loader == 0)
|
||||
if(loader == DEVOLUTION)
|
||||
{
|
||||
bool memcard_emu = m_gcfg2.getBool(id, "devo_memcard_emu", false);
|
||||
bool memcard_emu = m_gcfg2.testOptBool(id, "devo_memcard_emu", m_cfg.getBool(GC_DOMAIN, "devo_memcard_emu", false));
|
||||
bool activity_led = m_gcfg2.getBool(id, "led", false);
|
||||
DEVO_GetLoader(m_dataDir.c_str());
|
||||
DEVO_SetOptions(path, id, memcard_emu, widescreen, activity_led, m_use_wifi_gecko);
|
||||
}
|
||||
else if(loader == 1)
|
||||
else if(loader == NINTENDONT)
|
||||
{
|
||||
u8 emuMC = min((u32)m_gcfg2.getInt(id, "emu_memcard", m_cfg.getInt(GC_DOMAIN, "emu_memcard", 2)), ARRAY_SIZE(CMenu::_NinEmuCard) - 1u);
|
||||
emuMC = (emuMC == 0) ? m_cfg.getInt(GC_DOMAIN, "emu_memcard", 2) : emuMC-1;
|
||||
bool usb_hid = m_gcfg2.getBool(id, "usb_hid", m_cfg.getBool(GC_DOMAIN, "usb_hid", false));
|
||||
bool native_ctl = m_gcfg2.getBool(id, "native_ctl", m_cfg.getBool(GC_DOMAIN, "native_ctl", false));
|
||||
bool deflicker = m_gcfg2.getBool(id, "Deflicker", m_cfg.getBool(GC_DOMAIN, "Deflicker", false));
|
||||
bool tri_arcade = m_gcfg2.getBool(id, "triforce_arcade", m_cfg.getBool(GC_DOMAIN, "triforce_arcade", false));
|
||||
bool usb_hid = m_gcfg2.testOptBool(id, "usb_hid", m_cfg.getBool(GC_DOMAIN, "usb_hid", false));
|
||||
bool native_ctl = m_gcfg2.testOptBool(id, "native_ctl", m_cfg.getBool(GC_DOMAIN, "native_ctl", false));
|
||||
bool deflicker = m_gcfg2.getBool(id, "Deflicker", false);
|
||||
bool tri_arcade = m_gcfg2.getBool(id, "triforce_arcade", false);
|
||||
if(disc == true)
|
||||
{
|
||||
//emuMC = m_cfg.getInt(GC_DOMAIN, "emu_memcard", 1);
|
||||
@ -1047,7 +1088,7 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool disc)
|
||||
{
|
||||
bool NIN_Debugger = (m_gcfg2.getInt(id, "debugger", 0) == 2);
|
||||
bool wiiu_widescreen = m_gcfg2.getBool(id, "wiiu_widescreen", false);
|
||||
bool cheats = m_gcfg2.testOptBool(id, "cheat", m_cfg.getBool(GC_DOMAIN, "cheat", false));
|
||||
bool cheats = m_gcfg2.getBool(id, "cheat", false);
|
||||
/* Generate gct path */
|
||||
char GC_Path[256];
|
||||
GC_Path[255] = '\0';
|
||||
@ -1073,7 +1114,7 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool disc)
|
||||
m_gcfg2.save(true);
|
||||
m_cat.save(true);
|
||||
m_cfg.save(true);
|
||||
if(loader == 1)
|
||||
if(loader == NINTENDONT)
|
||||
{
|
||||
bool ret = (Nintendont_GetLoader() && LoadAppBooter(fmt("%s/app_booter.bin", m_binsDir.c_str())));
|
||||
if(ret == false)
|
||||
@ -1091,7 +1132,7 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool disc)
|
||||
if(id[3] == 'J')
|
||||
*HW_PPCSPEED = 0x0002A9E0;
|
||||
|
||||
if(loader == 0)
|
||||
if(loader == DEVOLUTION)
|
||||
{
|
||||
if(AHBRPOT_Patched())
|
||||
loadIOS(58, false);
|
||||
@ -1228,12 +1269,14 @@ void CMenu::_launchChannel(dir_discHdr *hdr)
|
||||
_launchShutdown();
|
||||
string id = string(hdr->id);
|
||||
|
||||
/* WII_Launch is used for launching real nand channels */
|
||||
bool WII_Launch = (m_gcfg2.getBool(id, "custom", false) && (!NANDemuView || neek2o()));
|
||||
/* use_dol = true to use the channels dol or false to use the old apploader method to boot channel */
|
||||
bool use_dol = !m_gcfg2.getBool(id, "apploader", false);
|
||||
|
||||
bool vipatch = m_gcfg2.testOptBool(id, "vipatch", m_cfg.getBool("GENERAL", "vipatch", false));
|
||||
bool cheat = m_gcfg2.testOptBool(id, "cheat", m_cfg.getBool(CHANNEL_DOMAIN, "cheat", false));
|
||||
bool countryPatch = m_gcfg2.testOptBool(id, "country_patch", m_cfg.getBool("GENERAL", "country_patch", false));
|
||||
bool vipatch = m_gcfg2.getBool(id, "vipatch", false);
|
||||
bool cheat = m_gcfg2.getBool(id, "cheat", false);
|
||||
bool countryPatch = m_gcfg2.getBool(id, "country_patch", false);
|
||||
|
||||
u8 videoMode = (u8)min((u32)m_gcfg2.getInt(id, "video_mode", 0), ARRAY_SIZE(CMenu::_VideoModes) - 1u);
|
||||
videoMode = (videoMode == 0) ? (u8)min((u32)m_cfg.getInt("GENERAL", "video_mode", 0), ARRAY_SIZE(CMenu::_GlobalVideoModes) - 1) : videoMode-1;
|
||||
@ -1241,9 +1284,9 @@ void CMenu::_launchChannel(dir_discHdr *hdr)
|
||||
int language = min((u32)m_gcfg2.getInt(id, "language", 0), ARRAY_SIZE(CMenu::_languages) - 1u);
|
||||
language = (language == 0) ? min((u32)m_cfg.getInt("GENERAL", "game_language", 0), ARRAY_SIZE(CMenu::_languages) - 1) : language;
|
||||
|
||||
const char *rtrn = m_gcfg2.getBool(id, "returnto", true) ? m_cfg.getString("GENERAL", "returnto").c_str() : NULL;
|
||||
u8 patchVidMode = min((u32)m_gcfg2.getInt(id, "patch_video_modes", 0), ARRAY_SIZE(CMenu::_vidModePatch) - 1u);
|
||||
int aspectRatio = min((u32)m_gcfg2.getInt(id, "aspect_ratio", 0), ARRAY_SIZE(CMenu::_AspectRatio) - 1u)-1;
|
||||
const char *rtrn = m_gcfg2.getBool(id, "returnto", true) ? m_cfg.getString("GENERAL", "returnto").c_str() : NULL;
|
||||
u32 returnTo = rtrn[0] << 24 | rtrn[1] << 16 | rtrn[2] << 8 | rtrn[3];
|
||||
|
||||
u8 *cheatFile = NULL;
|
||||
@ -1262,7 +1305,7 @@ void CMenu::_launchChannel(dir_discHdr *hdr)
|
||||
if(has_enabled_providers() && _initNetwork() == 0)
|
||||
add_game_to_card(id.c_str());
|
||||
}
|
||||
m_cfg.setString(CHANNEL_DOMAIN, "current_item", id);
|
||||
m_cfg.setString(_domainFromView(), "current_item", id);
|
||||
m_gcfg1.setInt("PLAYCOUNT", id, m_gcfg1.getInt("PLAYCOUNT", id, 0) + 1);
|
||||
m_gcfg1.setUInt("LASTPLAYED", id, time(NULL));
|
||||
|
||||
@ -1429,11 +1472,10 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
|
||||
gprintf("Game ID: %s\n", id.c_str());
|
||||
}
|
||||
|
||||
bool vipatch = m_gcfg2.testOptBool(id, "vipatch", m_cfg.getBool("GENERAL", "vipatch", false));
|
||||
bool countryPatch = m_gcfg2.testOptBool(id, "country_patch", m_cfg.getBool("GENERAL", "country_patch", false));
|
||||
bool private_server = m_gcfg2.testOptBool(id, "private_server", m_cfg.getBool("GENERAL", "private_server", false));
|
||||
bool vipatch = m_gcfg2.getBool(id, "vipatch", false);
|
||||
bool countryPatch = m_gcfg2.getBool(id, "country_patch", false);
|
||||
bool private_server = m_gcfg2.getBool(id, "private_server", false);
|
||||
|
||||
u8 patchVidMode = min((u32)m_gcfg2.getInt(id, "patch_video_modes", 0), ARRAY_SIZE(CMenu::_vidModePatch) - 1u);
|
||||
u8 videoMode = (u8)min((u32)m_gcfg2.getInt(id, "video_mode", 0), ARRAY_SIZE(CMenu::_VideoModes) - 1u);
|
||||
videoMode = (videoMode == 0) ? (u8)min((u32)m_cfg.getInt("GENERAL", "video_mode", 0), ARRAY_SIZE(CMenu::_GlobalVideoModes) - 1) : videoMode-1;
|
||||
|
||||
@ -1441,7 +1483,8 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
|
||||
language = (language == 0) ? min((u32)m_cfg.getInt("GENERAL", "game_language", 0), ARRAY_SIZE(CMenu::_languages) - 1) : language;
|
||||
|
||||
const char *rtrn = m_cfg.getString("GENERAL", "returnto", "").c_str();
|
||||
int aspectRatio = min((u32)m_gcfg2.getInt(id, "aspect_ratio", 0), ARRAY_SIZE(CMenu::_AspectRatio) - 1u)-1;
|
||||
int aspectRatio = min((u32)m_gcfg2.getInt(id, "aspect_ratio", 0), ARRAY_SIZE(CMenu::_AspectRatio) - 1u) - 1;
|
||||
u8 patchVidMode = min((u32)m_gcfg2.getInt(id, "patch_video_modes", 0), ARRAY_SIZE(CMenu::_vidModePatch) - 1u);
|
||||
|
||||
u8 emulate_mode = min((u32)m_gcfg2.getInt(id, "emulate_save", 0), ARRAY_SIZE(CMenu::_SaveEmu) - 1u);
|
||||
if(emulate_mode == 0)// default then use global
|
||||
@ -1466,6 +1509,7 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
|
||||
{
|
||||
m_forceext = false;
|
||||
_hideWaitMessage();
|
||||
m_exit = false;
|
||||
/*_AutoExtractSave(id) returns
|
||||
true if the save is already on emu nand (then no extraction)
|
||||
true if the save was successfully extracted
|
||||
@ -1474,6 +1518,7 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
|
||||
if(!_AutoExtractSave(id))
|
||||
NandHandle.CreateTitleTMD(hdr);//setup emu nand for gamesave
|
||||
_showWaitMessage();
|
||||
m_exit = true;
|
||||
}
|
||||
else if(emulate_mode > 1)//region switch or full
|
||||
{
|
||||
@ -1489,7 +1534,7 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
|
||||
emulate_mode = 0;//sets to off we are using neek2o or launching a DVD game
|
||||
|
||||
bool use_led = m_gcfg2.getBool(id, "led", false);
|
||||
bool cheat = m_gcfg2.testOptBool(id, "cheat", m_cfg.getBool(WII_DOMAIN, "cheat", false));
|
||||
bool cheat = m_gcfg2.getBool(id, "cheat", false);
|
||||
debuggerselect = m_gcfg2.getInt(id, "debugger", 0); // debuggerselect is defined in fst.h
|
||||
if((id == "RPWE41" || id == "RPWZ41" || id == "SPXP41") && debuggerselect == 1) // Prince of Persia, Rival Swords
|
||||
debuggerselect = 0;
|
||||
@ -1503,7 +1548,7 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
|
||||
u8 *gameconfig = NULL;
|
||||
u32 cheatSize = 0, gameconfigSize = 0, returnTo = 0;
|
||||
|
||||
m_cfg.setString(WII_DOMAIN, "current_item", id);
|
||||
m_cfg.setString(_domainFromView(), "current_item", id);
|
||||
m_gcfg1.setInt("PLAYCOUNT", id, m_gcfg1.getInt("PLAYCOUNT", id, 0) + 1);
|
||||
m_gcfg1.setUInt("LASTPLAYED", id, time(NULL));
|
||||
|
||||
|
@ -26,7 +26,7 @@ void CMenu::_gameinfo(void)
|
||||
_mainLoopCommon();
|
||||
if(BTN_HOME_PRESSED || BTN_B_PRESSED)
|
||||
break;
|
||||
if ((BTN_DOWN_PRESSED || BTN_DOWN_HELD) && !(m_thrdWorking && m_thrdStop) && page == 2 && synopsis_th > synopsis_h)
|
||||
if((BTN_DOWN_PRESSED || BTN_DOWN_HELD) && page == 2 && synopsis_th > synopsis_h)
|
||||
{
|
||||
if((synopsis_th - amount_of_skips * pixels_to_skip) >= synopsis_h)
|
||||
{
|
||||
@ -39,7 +39,7 @@ void CMenu::_gameinfo(void)
|
||||
m_btnMgr.moveBy(m_gameinfoLblSynopsis, 0, -xtra_skips);
|
||||
}
|
||||
}
|
||||
else if ((BTN_UP_PRESSED || BTN_UP_HELD) && !(m_thrdWorking && m_thrdStop) && page == 2)
|
||||
else if((BTN_UP_PRESSED || BTN_UP_HELD) && page == 2)
|
||||
{
|
||||
if(xtra_skips > 0)
|
||||
{
|
||||
@ -52,7 +52,7 @@ void CMenu::_gameinfo(void)
|
||||
amount_of_skips--;
|
||||
}
|
||||
}
|
||||
else if (BTN_RIGHT_PRESSED && !(m_thrdWorking && m_thrdStop) && page == 1 && !gameinfo_Synopsis_w.empty())
|
||||
else if(BTN_RIGHT_PRESSED && page == 1 && !gameinfo_Synopsis_w.empty())
|
||||
{
|
||||
page = 2;
|
||||
amount_of_skips = 0;
|
||||
@ -86,7 +86,7 @@ void CMenu::_gameinfo(void)
|
||||
m_btnMgr.getTotalHeight(m_gameinfoLblSynopsis, synopsis_th);
|
||||
m_btnMgr.moveBy(m_gameinfoLblSynopsis, 0, -1);
|
||||
}
|
||||
else if (BTN_LEFT_PRESSED && !(m_thrdWorking && m_thrdStop))
|
||||
else if(BTN_LEFT_PRESSED)
|
||||
{
|
||||
page = 1;
|
||||
m_btnMgr.show(m_gameinfoLblID);
|
||||
|
@ -67,14 +67,13 @@ bool CMenu::_Home(void)
|
||||
}
|
||||
else if(m_btnMgr.selected(m_homeBtnReloadCache))
|
||||
{
|
||||
//UpdateCache(m_current_view);
|
||||
if(m_cfg.getBool(WII_DOMAIN, "source"))
|
||||
if(m_current_view & COVERFLOW_WII)
|
||||
m_cfg.setBool(WII_DOMAIN, "update_cache", true);
|
||||
if(m_cfg.getBool(GC_DOMAIN, "source"))
|
||||
if(m_current_view & COVERFLOW_GAMECUBE)
|
||||
m_cfg.setBool(GC_DOMAIN, "update_cache", true);
|
||||
if(m_cfg.getBool(CHANNEL_DOMAIN, "source"))
|
||||
if(m_current_view & COVERFLOW_CHANNEL)
|
||||
m_cfg.setBool(CHANNEL_DOMAIN, "update_cache", true);
|
||||
if(m_cfg.getBool(PLUGIN_DOMAIN, "source"))
|
||||
if(m_current_view & COVERFLOW_PLUGIN)
|
||||
m_cfg.setBool(PLUGIN_DOMAIN, "update_cache", true);
|
||||
m_refreshGameList = true;
|
||||
break;
|
||||
|
@ -107,32 +107,40 @@ void CMenu::_showCF(bool refreshList)
|
||||
wstringEx Pth;
|
||||
if(m_gameList.empty())
|
||||
{
|
||||
switch(m_current_view)
|
||||
if(m_source_cnt > 1)
|
||||
{
|
||||
case COVERFLOW_WII:
|
||||
Msg = _t("main2", L"No games found in ");
|
||||
Pth = wstringEx(fmt(wii_games_dir, DeviceName[currentPartition]));
|
||||
break;
|
||||
case COVERFLOW_GAMECUBE:
|
||||
Msg = _t("main2", L"No games found in ");
|
||||
Pth = wstringEx(fmt(gc_games_dir, DeviceName[currentPartition]));
|
||||
break;
|
||||
case COVERFLOW_CHANNEL:
|
||||
Msg = _t("main3", L"No titles found in ");
|
||||
Pth = wstringEx(fmt("%s:/%s/%s", DeviceName[currentPartition], EMU_NANDS_DIR, m_cfg.getString(CHANNEL_DOMAIN, "current_emunand").c_str()));
|
||||
break;
|
||||
case COVERFLOW_HOMEBREW:
|
||||
Msg = _t("main4", L"No apps found in ");
|
||||
Pth = wstringEx(fmt(HOMEBREW_DIR, DeviceName[currentPartition]));
|
||||
break;
|
||||
case COVERFLOW_PLUGIN:
|
||||
m_plugin.GetEnabledPlugins(m_cfg, &enabledPluginsCount);
|
||||
if(enabledPluginsCount == 0)
|
||||
Msg = _t("main6", L"No plugins selected.");
|
||||
else
|
||||
Msg = _t("main5", L"No roms/items found.");
|
||||
Pth = "";
|
||||
break;
|
||||
Msg = _t("main8", L"game list empty!");
|
||||
Pth = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
switch(m_current_view)
|
||||
{
|
||||
case COVERFLOW_WII:
|
||||
Msg = _t("main2", L"No games found in ");
|
||||
Pth = wstringEx(fmt(wii_games_dir, DeviceName[currentPartition]));
|
||||
break;
|
||||
case COVERFLOW_GAMECUBE:
|
||||
Msg = _t("main2", L"No games found in ");
|
||||
Pth = wstringEx(fmt(gc_games_dir, DeviceName[currentPartition]));
|
||||
break;
|
||||
case COVERFLOW_CHANNEL:
|
||||
Msg = _t("main3", L"No titles found in ");
|
||||
Pth = wstringEx(fmt("%s:/%s/%s", DeviceName[currentPartition], EMU_NANDS_DIR, m_cfg.getString(CHANNEL_DOMAIN, "current_emunand").c_str()));
|
||||
break;
|
||||
case COVERFLOW_HOMEBREW:
|
||||
Msg = _t("main4", L"No apps found in ");
|
||||
Pth = wstringEx(fmt(HOMEBREW_DIR, DeviceName[currentPartition]));
|
||||
break;
|
||||
case COVERFLOW_PLUGIN:
|
||||
m_plugin.GetEnabledPlugins(m_cfg, &enabledPluginsCount);
|
||||
if(enabledPluginsCount == 0)
|
||||
Msg = _t("main6", L"No plugins selected.");
|
||||
else
|
||||
Msg = _t("main5", L"No roms/items found.");
|
||||
Pth = "";
|
||||
break;
|
||||
}
|
||||
}
|
||||
Msg.append(Pth);
|
||||
m_btnMgr.setText(m_mainLblMessage, Msg);
|
||||
@ -213,45 +221,21 @@ int CMenu::main(void)
|
||||
m_reload = false;
|
||||
u32 disc_check = 0;
|
||||
|
||||
u8 sourceCount = 0;
|
||||
if(m_cfg.getBool(WII_DOMAIN, "source", false))
|
||||
{
|
||||
sourceCount++;
|
||||
m_current_view = COVERFLOW_WII;
|
||||
}
|
||||
if(m_cfg.getBool(GC_DOMAIN, "source", false))
|
||||
{
|
||||
sourceCount++;
|
||||
m_current_view = COVERFLOW_GAMECUBE;
|
||||
}
|
||||
if(m_cfg.getBool(CHANNEL_DOMAIN, "source", false))
|
||||
{
|
||||
sourceCount++;
|
||||
m_current_view = COVERFLOW_CHANNEL;
|
||||
}
|
||||
if(m_cfg.getBool(HOMEBREW_DOMAIN, "source", false))
|
||||
{
|
||||
sourceCount++;
|
||||
m_current_view = COVERFLOW_HOMEBREW;
|
||||
}
|
||||
if(m_cfg.getBool(PLUGIN_DOMAIN, "source", false))
|
||||
{
|
||||
sourceCount++;
|
||||
m_current_view = COVERFLOW_PLUGIN;
|
||||
}
|
||||
if(sourceCount > 1)
|
||||
{
|
||||
m_current_view = COVERFLOW_MAX;
|
||||
}
|
||||
if(sourceCount == 0 || m_current_view == COVERFLOW_HOMEBREW)
|
||||
m_current_view = m_cfg.getUInt("GENERAL", "sources", COVERFLOW_WII);
|
||||
m_source_cnt = 0;
|
||||
for(u8 i = 1; i < 16; i <<= 1)//not including coverflow_homebrew
|
||||
if(m_current_view & i)
|
||||
m_source_cnt++;
|
||||
|
||||
if(m_source_cnt == 0 || m_current_view == COVERFLOW_HOMEBREW)
|
||||
{
|
||||
m_current_view = COVERFLOW_WII;
|
||||
m_cfg.setBool(HOMEBREW_DOMAIN, "source", false);
|
||||
m_cfg.setBool(WII_DOMAIN, "source", true);
|
||||
m_cfg.setUInt("GENERAL", "sources", m_current_view);
|
||||
m_source_cnt++;
|
||||
}
|
||||
|
||||
m_catStartPage = m_cfg.getInt("GENERAL", "cat_startpage", 1);
|
||||
if(m_current_view != COVERFLOW_MAX)
|
||||
if(m_source_cnt == 1)
|
||||
m_cfg.remove("GENERAL", "cat_startpage");
|
||||
|
||||
if(m_cfg.getBool("GENERAL", "update_cache", false))
|
||||
@ -376,14 +360,11 @@ int CMenu::main(void)
|
||||
m_current_view = show_channel ? COVERFLOW_CHANNEL : (show_plugin ? COVERFLOW_PLUGIN : COVERFLOW_WII);
|
||||
else if(m_current_view == COVERFLOW_CHANNEL)
|
||||
m_current_view = show_plugin ? COVERFLOW_PLUGIN : COVERFLOW_WII;
|
||||
else if(m_current_view == COVERFLOW_PLUGIN || m_current_view == COVERFLOW_MAX)
|
||||
else if(m_current_view == COVERFLOW_PLUGIN || m_source_cnt > 1)
|
||||
m_current_view = COVERFLOW_WII;
|
||||
_clearSources();
|
||||
m_cfg.setBool(_domainFromView(), "source", true);
|
||||
m_source_cnt = 1;
|
||||
m_cfg.setUInt("GENERAL", "sources", m_current_view);
|
||||
m_catStartPage = 1;
|
||||
if(m_current_view == COVERFLOW_CHANNEL
|
||||
&& !m_cfg.getBool(CHANNEL_DOMAIN, "emu_nand") && !m_cfg.getBool(CHANNEL_DOMAIN, "real_nand"))
|
||||
m_cfg.setBool(CHANNEL_DOMAIN, "real_nand", true);
|
||||
_showCF(true);
|
||||
}
|
||||
else if(m_btnMgr.selected(m_mainBtnConfig))
|
||||
@ -399,11 +380,21 @@ int CMenu::main(void)
|
||||
bUsed = true;
|
||||
_showMain();
|
||||
}
|
||||
else if(m_btnMgr.selected(m_mainBtnHomebrew) && (!m_locked || !m_cfg.getBool(HOMEBREW_DOMAIN, "parental", false)))
|
||||
else if(m_btnMgr.selected(m_mainBtnHomebrew))
|
||||
{
|
||||
m_prev_view = m_current_view;
|
||||
m_current_view = COVERFLOW_HOMEBREW;
|
||||
_showCF(true);
|
||||
if(m_locked && m_cfg.getBool(HOMEBREW_DOMAIN, "parental", false))
|
||||
{
|
||||
error(_t("errgame15", L"WiiFlow locked! Unlock WiiFlow to use this feature."));
|
||||
_showMain();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_prev_view = m_current_view;
|
||||
m_current_view = COVERFLOW_HOMEBREW;
|
||||
_showCF(true);
|
||||
}
|
||||
if(BTN_B_HELD)
|
||||
bUsed = true;
|
||||
}
|
||||
else if(m_btnMgr.selected(m_mainBtnDVD))
|
||||
{
|
||||
@ -448,8 +439,8 @@ int CMenu::main(void)
|
||||
bUsed = true;
|
||||
CoverFlow.cancel();
|
||||
if(m_refreshGameList)
|
||||
_initCF();
|
||||
//_showMain(m_refreshGameList);
|
||||
//_initCF();
|
||||
_showCF(m_refreshGameList);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -466,25 +457,6 @@ int CMenu::main(void)
|
||||
if(m_refreshGameList)
|
||||
_initCF();
|
||||
}
|
||||
/* switch channels type to show */
|
||||
else if(m_btnMgr.selected(m_mainBtnConfig) && m_current_view == COVERFLOW_CHANNEL)
|
||||
{
|
||||
bUsed = true;
|
||||
if(m_cfg.getBool(CHANNEL_DOMAIN, "real_nand"))
|
||||
{
|
||||
if(m_cfg.getBool(CHANNEL_DOMAIN, "emu_nand"))
|
||||
m_cfg.setBool(CHANNEL_DOMAIN, "real_nand", false);// shows emunand
|
||||
else
|
||||
m_cfg.setBool(CHANNEL_DOMAIN, "emu_nand", true);// shows both
|
||||
}
|
||||
else //if(m_cfg.getBool(CHANNEL_DOMAIN, "emu_nand")) doesn't matter
|
||||
{
|
||||
m_cfg.setBool(CHANNEL_DOMAIN, "real_nand", true);
|
||||
m_cfg.setBool(CHANNEL_DOMAIN, "emu_nand", false);// show real
|
||||
}
|
||||
_showCF(true);
|
||||
|
||||
}
|
||||
else if(m_btnMgr.selected(m_mainBtnNext) || m_btnMgr.selected(m_mainBtnPrev))
|
||||
{
|
||||
bUsed = true;
|
||||
@ -592,13 +564,14 @@ int CMenu::main(void)
|
||||
bUsed = true;
|
||||
MusicPlayer.Next();
|
||||
}
|
||||
else if(BTN_PLUS_PRESSED && !m_locked && !m_sourceflow && m_current_view < 3)
|
||||
/* change sorting with btn B and + */
|
||||
else if(BTN_PLUS_PRESSED && !m_locked && !m_sourceflow && m_current_view < 8)
|
||||
{
|
||||
bUsed = true;
|
||||
u32 sort = 0;
|
||||
sort = loopNum((m_cfg.getInt(domain, "sort", 0)) + 1, SORT_MAX);
|
||||
if((m_current_view == COVERFLOW_HOMEBREW || m_current_view == COVERFLOW_PLUGIN) && sort > SORT_LASTPLAYED)
|
||||
sort = SORT_ALPHA;
|
||||
//if((m_current_view == COVERFLOW_HOMEBREW || m_current_view == COVERFLOW_PLUGIN) && sort > SORT_LASTPLAYED)
|
||||
// sort = SORT_ALPHA;
|
||||
m_cfg.setInt(domain, "sort", sort);
|
||||
_initCF();
|
||||
wstringEx curSort ;
|
||||
@ -678,6 +651,16 @@ int CMenu::main(void)
|
||||
{
|
||||
switch(m_current_view)
|
||||
{
|
||||
case COVERFLOW_WII:
|
||||
if(show_gamecube)
|
||||
m_btnMgr.show(m_mainBtnGamecube);
|
||||
else if(show_channel)
|
||||
m_btnMgr.show(m_mainBtnChannel);
|
||||
else if(show_plugin)
|
||||
m_btnMgr.show(m_mainBtnPlugin);
|
||||
else
|
||||
m_btnMgr.show(m_mainBtnWii);
|
||||
break;
|
||||
case COVERFLOW_GAMECUBE:
|
||||
if(show_channel)
|
||||
m_btnMgr.show(m_mainBtnChannel);
|
||||
@ -692,20 +675,9 @@ int CMenu::main(void)
|
||||
else
|
||||
m_btnMgr.show(m_mainBtnWii);
|
||||
break;
|
||||
case COVERFLOW_PLUGIN:
|
||||
case COVERFLOW_HOMEBREW:
|
||||
case COVERFLOW_MAX:
|
||||
default:
|
||||
m_btnMgr.show(m_mainBtnWii);
|
||||
break;
|
||||
default:
|
||||
if(show_gamecube)
|
||||
m_btnMgr.show(m_mainBtnGamecube);
|
||||
else if(show_channel)
|
||||
m_btnMgr.show(m_mainBtnChannel);
|
||||
else if(show_plugin)
|
||||
m_btnMgr.show(m_mainBtnPlugin);
|
||||
else
|
||||
m_btnMgr.show(m_mainBtnWii);
|
||||
}
|
||||
m_btnMgr.show(m_mainLblUser[2]);
|
||||
m_btnMgr.show(m_mainLblUser[3]);
|
||||
@ -993,7 +965,7 @@ wstringEx CMenu::_getNoticeTranslation(int sorting, wstringEx curLetter)
|
||||
|
||||
void CMenu::_setPartition(s8 direction)
|
||||
{
|
||||
if((m_current_view == COVERFLOW_CHANNEL && neek2o()) || m_current_view == COVERFLOW_MAX)
|
||||
if((m_current_view == COVERFLOW_CHANNEL && neek2o()) || (m_source_cnt > 1 && !m_emuSaveNand))
|
||||
return;
|
||||
int FS_Type = 0;
|
||||
/* change partition if direction is not zero */
|
||||
|
@ -42,6 +42,9 @@ s16 m_nandemuLblSavePartitionVal;
|
||||
s16 m_nandemuBtnSavePartitionM;
|
||||
s16 m_nandemuBtnSavePartitionP;
|
||||
|
||||
s16 m_nandemuLblInstallWad;
|
||||
s16 m_nandemuBtnInstallWad;
|
||||
|
||||
s16 m_nandfileLblMessage;
|
||||
s16 m_nandemuLblMessage;
|
||||
s16 m_nandfileLblDialog;
|
||||
@ -51,7 +54,6 @@ s16 m_nandfilePBar;
|
||||
s16 m_nandemuPBar;
|
||||
s16 m_nandemuBtnExtract;
|
||||
s16 m_nandemuBtnDisable;
|
||||
s16 m_nandemuBtnPartition;
|
||||
s16 m_nandemuLblInit;
|
||||
s16 m_nandemuLblUser[4];
|
||||
TexData m_nandemuBg;
|
||||
@ -68,7 +70,7 @@ static inline int loopNum(int i, int s)
|
||||
return (i + s) % s;
|
||||
}
|
||||
|
||||
static void listEmuNands(const char * path, vector<string> &emuNands)
|
||||
void CMenu::_listEmuNands(const char *path, vector<string> &emuNands)
|
||||
{
|
||||
DIR *d;
|
||||
struct dirent *dir;
|
||||
@ -292,8 +294,10 @@ void CMenu::_hideNandEmu(bool instant)
|
||||
m_btnMgr.hide(m_nandemuBtnSavePartitionP, instant);
|
||||
m_btnMgr.hide(m_nandemuBtnSavePartitionM, instant);
|
||||
|
||||
m_btnMgr.hide(m_nandemuLblInstallWad, instant);
|
||||
m_btnMgr.hide(m_nandemuBtnInstallWad, instant);
|
||||
|
||||
m_btnMgr.hide(m_nandemuBtnExtract, instant);
|
||||
m_btnMgr.hide(m_nandemuBtnPartition, instant);
|
||||
m_btnMgr.hide(m_nandemuBtnDisable, instant);
|
||||
m_btnMgr.hide(m_nandemuLblInit, instant);
|
||||
|
||||
@ -302,6 +306,52 @@ void CMenu::_hideNandEmu(bool instant)
|
||||
m_btnMgr.hide(m_nandemuLblUser[i], instant);
|
||||
}
|
||||
|
||||
void CMenu::_hideNandEmuPg(void)
|
||||
{
|
||||
//Does not hide title, page, back, or user labels
|
||||
if(nandemuPage == 1)
|
||||
{
|
||||
m_btnMgr.hide(m_nandemuLblNandSelect);
|
||||
m_btnMgr.hide(m_nandemuLblNandSelectVal);
|
||||
m_btnMgr.hide(m_nandemuBtnNandSelectP);
|
||||
m_btnMgr.hide(m_nandemuBtnNandSelectM);
|
||||
|
||||
m_btnMgr.hide(m_nandemuLblEmulationVal);
|
||||
m_btnMgr.hide(m_nandemuLblEmulation);
|
||||
m_btnMgr.hide(m_nandemuBtnEmulationP);
|
||||
m_btnMgr.hide(m_nandemuBtnEmulationM);
|
||||
|
||||
m_btnMgr.hide(m_nandemuLblSaveNandSelect);
|
||||
m_btnMgr.hide(m_nandemuLblSaveNandSelectVal);
|
||||
m_btnMgr.hide(m_nandemuBtnSaveNandSelectP);
|
||||
m_btnMgr.hide(m_nandemuBtnSaveNandSelectM);
|
||||
|
||||
m_btnMgr.hide(m_nandemuLblSaveEmulationVal);
|
||||
m_btnMgr.hide(m_nandemuLblSaveEmulation);
|
||||
m_btnMgr.hide(m_nandemuBtnSaveEmulationP);
|
||||
m_btnMgr.hide(m_nandemuBtnSaveEmulationM);
|
||||
}
|
||||
else if(nandemuPage == 2)
|
||||
{
|
||||
m_btnMgr.hide(m_nandemuLblSaveDump);
|
||||
m_btnMgr.hide(m_nandemuBtnAll);
|
||||
m_btnMgr.hide(m_nandemuBtnMissing);
|
||||
|
||||
m_btnMgr.hide(m_nandemuLblNandDump);
|
||||
m_btnMgr.hide(m_nandemuBtnNandDump);
|
||||
|
||||
m_btnMgr.hide(m_nandemuLblInstallWad);
|
||||
m_btnMgr.hide(m_nandemuBtnInstallWad);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_btnMgr.hide(m_nandemuLblSavePartition);
|
||||
m_btnMgr.hide(m_nandemuLblSavePartitionVal);
|
||||
m_btnMgr.hide(m_nandemuBtnSavePartitionP);
|
||||
m_btnMgr.hide(m_nandemuBtnSavePartitionM);
|
||||
}
|
||||
}
|
||||
|
||||
void CMenu::_showNandEmu(void)
|
||||
{
|
||||
_setBg(m_nandemuBg, m_nandemuBg);
|
||||
@ -309,7 +359,7 @@ void CMenu::_showNandEmu(void)
|
||||
m_btnMgr.show(m_nandemuLblTitle);
|
||||
m_btnMgr.show(m_nandemuBtnBack);
|
||||
|
||||
m_btnMgr.setText(m_nandemuLblPage, wfmt(L"%i / 2", nandemuPage));
|
||||
m_btnMgr.setText(m_nandemuLblPage, wfmt(L"%i / 3", nandemuPage));
|
||||
m_btnMgr.show(m_nandemuLblPage);
|
||||
m_btnMgr.show(m_nandemuBtnPageM);
|
||||
m_btnMgr.show(m_nandemuBtnPageP);
|
||||
@ -345,11 +395,8 @@ void CMenu::_showNandEmu(void)
|
||||
m_btnMgr.show(m_nandemuBtnSaveEmulationP);
|
||||
m_btnMgr.show(m_nandemuBtnSaveEmulationM);
|
||||
}
|
||||
else //page 2
|
||||
else if(nandemuPage == 2)
|
||||
{
|
||||
const char *partitionname = DeviceName[m_cfg.getInt(WII_DOMAIN, "savepartition")];
|
||||
m_btnMgr.setText(m_nandemuLblSavePartitionVal, upperCase(partitionname));
|
||||
|
||||
m_btnMgr.show(m_nandemuLblSaveDump);
|
||||
m_btnMgr.show(m_nandemuBtnAll);
|
||||
m_btnMgr.show(m_nandemuBtnMissing);
|
||||
@ -357,6 +404,14 @@ void CMenu::_showNandEmu(void)
|
||||
m_btnMgr.show(m_nandemuLblNandDump);
|
||||
m_btnMgr.show(m_nandemuBtnNandDump);
|
||||
|
||||
m_btnMgr.show(m_nandemuLblInstallWad);
|
||||
m_btnMgr.show(m_nandemuBtnInstallWad);
|
||||
}
|
||||
else
|
||||
{
|
||||
const char *partitionname = DeviceName[m_cfg.getInt(WII_DOMAIN, "savepartition")];
|
||||
m_btnMgr.setText(m_nandemuLblSavePartitionVal, upperCase(partitionname));
|
||||
|
||||
m_btnMgr.show(m_nandemuLblSavePartition);
|
||||
m_btnMgr.show(m_nandemuLblSavePartitionVal);
|
||||
m_btnMgr.show(m_nandemuBtnSavePartitionP);
|
||||
@ -371,6 +426,7 @@ void CMenu::_showNandEmu(void)
|
||||
int CMenu::_NandEmuCfg(void)
|
||||
{
|
||||
nandemuPage = 1;
|
||||
string ExtNand = "";
|
||||
|
||||
vector<string> emuNands;
|
||||
vector<string> savesNands;
|
||||
@ -379,7 +435,7 @@ int CMenu::_NandEmuCfg(void)
|
||||
string savesNand = m_cfg.getString(WII_DOMAIN, "current_save_emunand");
|
||||
int savesPart = m_cfg.getInt(WII_DOMAIN, "savepartition");
|
||||
|
||||
listEmuNands(fmt("%s:/%s", DeviceName[emuPart], EMU_NANDS_DIR), emuNands);
|
||||
_listEmuNands(fmt("%s:/%s", DeviceName[emuPart], EMU_NANDS_DIR), emuNands);
|
||||
int curEmuNand = 0;
|
||||
for(u8 i = 0; i < emuNands.size(); ++i)
|
||||
{
|
||||
@ -390,7 +446,7 @@ int CMenu::_NandEmuCfg(void)
|
||||
}
|
||||
}
|
||||
|
||||
listEmuNands(fmt("%s:/%s", DeviceName[savesPart], EMU_NANDS_DIR), savesNands);
|
||||
_listEmuNands(fmt("%s:/%s", DeviceName[savesPart], EMU_NANDS_DIR), savesNands);
|
||||
int curSavesNand = 0;
|
||||
for(u8 i = 0; i < savesNands.size(); ++i)
|
||||
{
|
||||
@ -414,77 +470,26 @@ int CMenu::_NandEmuCfg(void)
|
||||
_mainLoopCommon();
|
||||
if((BTN_MINUS_PRESSED || BTN_LEFT_PRESSED) || (BTN_A_PRESSED && m_btnMgr.selected(m_nandemuBtnPageM)))
|
||||
{
|
||||
bool instant = true;
|
||||
m_btnMgr.hide(m_nandemuLblNandSelect, instant);
|
||||
m_btnMgr.hide(m_nandemuLblNandSelectVal, instant);
|
||||
m_btnMgr.hide(m_nandemuBtnNandSelectP, instant);
|
||||
m_btnMgr.hide(m_nandemuBtnNandSelectM, instant);
|
||||
m_btnMgr.hide(m_nandemuLblEmulationVal, instant);
|
||||
m_btnMgr.hide(m_nandemuLblEmulation, instant);
|
||||
m_btnMgr.hide(m_nandemuBtnEmulationP, instant);
|
||||
m_btnMgr.hide(m_nandemuBtnEmulationM, instant);
|
||||
|
||||
m_btnMgr.hide(m_nandemuLblSaveNandSelect, instant);
|
||||
m_btnMgr.hide(m_nandemuLblSaveNandSelectVal, instant);
|
||||
m_btnMgr.hide(m_nandemuBtnSaveNandSelectP, instant);
|
||||
m_btnMgr.hide(m_nandemuBtnSaveNandSelectM, instant);
|
||||
m_btnMgr.hide(m_nandemuLblSaveEmulationVal, instant);
|
||||
m_btnMgr.hide(m_nandemuLblSaveEmulation, instant);
|
||||
m_btnMgr.hide(m_nandemuBtnSaveEmulationP, instant);
|
||||
m_btnMgr.hide(m_nandemuBtnSaveEmulationM, instant);
|
||||
|
||||
m_btnMgr.hide(m_nandemuLblSaveDump, instant);
|
||||
m_btnMgr.hide(m_nandemuBtnAll, instant);
|
||||
m_btnMgr.hide(m_nandemuBtnMissing, instant);
|
||||
|
||||
m_btnMgr.hide(m_nandemuLblNandDump, instant);
|
||||
m_btnMgr.hide(m_nandemuBtnNandDump, instant);
|
||||
|
||||
m_btnMgr.hide(m_nandemuLblSavePartition, instant);
|
||||
m_btnMgr.hide(m_nandemuLblSavePartitionVal, instant);
|
||||
m_btnMgr.hide(m_nandemuBtnSavePartitionP, instant);
|
||||
m_btnMgr.hide(m_nandemuBtnSavePartitionM, instant);
|
||||
|
||||
nandemuPage = nandemuPage == 1 ? 2 : 1;
|
||||
_hideNandEmuPg();
|
||||
if(nandemuPage == 1)
|
||||
nandemuPage = 3;
|
||||
else --nandemuPage;
|
||||
if(BTN_LEFT_PRESSED || BTN_MINUS_PRESSED)
|
||||
m_btnMgr.click(m_nandemuBtnPageM);
|
||||
_showNandEmu();
|
||||
}
|
||||
else if((BTN_PLUS_PRESSED || BTN_RIGHT_PRESSED) || (BTN_A_PRESSED && m_btnMgr.selected(m_nandemuBtnPageP)))
|
||||
{
|
||||
bool instant = true;
|
||||
m_btnMgr.hide(m_nandemuLblNandSelect, instant);
|
||||
m_btnMgr.hide(m_nandemuLblNandSelectVal, instant);
|
||||
m_btnMgr.hide(m_nandemuBtnNandSelectP, instant);
|
||||
m_btnMgr.hide(m_nandemuBtnNandSelectM, instant);
|
||||
m_btnMgr.hide(m_nandemuLblEmulationVal, instant);
|
||||
m_btnMgr.hide(m_nandemuLblEmulation, instant);
|
||||
m_btnMgr.hide(m_nandemuBtnEmulationP, instant);
|
||||
m_btnMgr.hide(m_nandemuBtnEmulationM, instant);
|
||||
|
||||
m_btnMgr.hide(m_nandemuLblSaveNandSelect, instant);
|
||||
m_btnMgr.hide(m_nandemuLblSaveNandSelectVal, instant);
|
||||
m_btnMgr.hide(m_nandemuBtnSaveNandSelectP, instant);
|
||||
m_btnMgr.hide(m_nandemuBtnSaveNandSelectM, instant);
|
||||
m_btnMgr.hide(m_nandemuLblSaveEmulationVal, instant);
|
||||
m_btnMgr.hide(m_nandemuLblSaveEmulation, instant);
|
||||
m_btnMgr.hide(m_nandemuBtnSaveEmulationP, instant);
|
||||
m_btnMgr.hide(m_nandemuBtnSaveEmulationM, instant);
|
||||
|
||||
m_btnMgr.hide(m_nandemuLblSaveDump, instant);
|
||||
m_btnMgr.hide(m_nandemuBtnAll, instant);
|
||||
m_btnMgr.hide(m_nandemuBtnMissing, instant);
|
||||
|
||||
m_btnMgr.hide(m_nandemuLblNandDump, instant);
|
||||
m_btnMgr.hide(m_nandemuBtnNandDump, instant);
|
||||
|
||||
m_btnMgr.hide(m_nandemuLblSavePartition, instant);
|
||||
m_btnMgr.hide(m_nandemuLblSavePartitionVal, instant);
|
||||
m_btnMgr.hide(m_nandemuBtnSavePartitionP, instant);
|
||||
m_btnMgr.hide(m_nandemuBtnSavePartitionM, instant);
|
||||
|
||||
nandemuPage = nandemuPage == 1 ? 2 : 1;
|
||||
_hideNandEmuPg();
|
||||
if(nandemuPage == 3)
|
||||
nandemuPage = 1;
|
||||
else
|
||||
++nandemuPage;
|
||||
if(BTN_RIGHT_PRESSED || BTN_PLUS_PRESSED)
|
||||
m_btnMgr.click(m_nandemuBtnPageP);
|
||||
_showNandEmu();
|
||||
}
|
||||
else if((BTN_HOME_PRESSED || BTN_B_PRESSED) && !m_thrdWorking)
|
||||
else if((BTN_HOME_PRESSED || BTN_B_PRESSED))// && !m_thrdWorking)
|
||||
break;
|
||||
else if(BTN_UP_PRESSED)
|
||||
m_btnMgr.up();
|
||||
@ -516,15 +521,9 @@ int CMenu::_NandEmuCfg(void)
|
||||
m_fulldump = m_btnMgr.selected(m_nandemuBtnNandDump) ? true : false;
|
||||
m_saveall = m_btnMgr.selected(m_nandemuBtnAll) ? true : false;
|
||||
m_btnMgr.hide(m_nandemuBtnBack);
|
||||
m_btnMgr.hide(m_nandemuLblSaveDump);
|
||||
m_btnMgr.hide(m_nandemuBtnAll);
|
||||
m_btnMgr.hide(m_nandemuBtnMissing);
|
||||
m_btnMgr.hide(m_nandemuLblNandDump);
|
||||
m_btnMgr.hide(m_nandemuBtnNandDump);
|
||||
m_btnMgr.hide(m_nandemuLblPage);
|
||||
m_btnMgr.hide(m_nandemuBtnPageM);
|
||||
m_btnMgr.hide(m_nandemuBtnPageP);
|
||||
_hideNandEmu(true);
|
||||
|
||||
m_btnMgr.show(m_nandemuLblTitle);
|
||||
m_btnMgr.show(m_nandfilePBar);
|
||||
m_btnMgr.show(m_nandemuPBar);
|
||||
m_btnMgr.show(m_nandfileLblMessage);
|
||||
@ -536,7 +535,7 @@ int CMenu::_NandEmuCfg(void)
|
||||
m_btnMgr.setText(m_nandemuLblDialog, _t("cfgne11", L"Overall Progress:"));
|
||||
if(m_fulldump)
|
||||
{
|
||||
m_refreshGameList = true;
|
||||
ExtNand = emuNands[curEmuNand];
|
||||
m_btnMgr.setText(m_nandemuLblTitle, _t("cfgne12", L"NAND Extractor"));
|
||||
}
|
||||
else
|
||||
@ -560,24 +559,31 @@ int CMenu::_NandEmuCfg(void)
|
||||
m_cfg.setString(WII_DOMAIN, "current_save_emunand", savesNands[curSavesNand]);
|
||||
_showNandEmu();
|
||||
}
|
||||
else if(BTN_A_PRESSED && (m_btnMgr.selected(m_nandemuBtnBack)))
|
||||
else if(BTN_A_PRESSED && m_btnMgr.selected(m_nandemuBtnInstallWad))
|
||||
{
|
||||
_hideNandEmu();
|
||||
_wadExplorer();
|
||||
nandemuPage = 1;
|
||||
_showNandEmu();
|
||||
}
|
||||
else if(BTN_A_PRESSED && m_btnMgr.selected(m_nandemuBtnBack))
|
||||
{
|
||||
m_cfg.save();
|
||||
break;
|
||||
}
|
||||
|
||||
if (m_thrdMessageAdded)
|
||||
if(m_thrdMessageAdded)
|
||||
{
|
||||
LockMutex lock(m_mutex);
|
||||
m_thrdMessageAdded = false;
|
||||
if (!m_thrdMessage.empty())
|
||||
if(!m_thrdMessage.empty())
|
||||
m_btnMgr.setText(m_nandfileLblDialog, m_thrdMessage);
|
||||
m_btnMgr.setProgress(m_nandfilePBar, m_fileProgress);
|
||||
m_btnMgr.setProgress(m_nandemuPBar, m_thrdProgress);
|
||||
m_btnMgr.setText(m_nandfileLblMessage, wfmt(_fmt("fileprogress", L"%d / %dKB"), m_fileprog/0x400, m_filesize/0x400));
|
||||
m_btnMgr.setText(m_nandemuLblMessage, wfmt(_fmt("dumpprogress", L"%i%%"), (int)(m_thrdProgress*100.f)));
|
||||
|
||||
if (!m_thrdWorking)
|
||||
if(!m_thrdWorking)
|
||||
{
|
||||
if(m_sgdump)
|
||||
m_btnMgr.setText(m_nandfinLblDialog, wfmt(_fmt("cfgne14", L"Extracted: %d saves / %d files / %d folders"), m_nandexentry, m_filesdone, m_foldersdone));
|
||||
@ -589,14 +595,25 @@ int CMenu::_NandEmuCfg(void)
|
||||
m_btnMgr.setText(m_nandemuLblDialog, wfmt(_fmt("cfgne17", L"Total size: %uKB (%d blocks)"), (m_dumpsize/0x400), (m_dumpsize/0x8000)>>2));
|
||||
m_btnMgr.show(m_nandemuBtnBack);
|
||||
m_btnMgr.show(m_nandfinLblDialog);
|
||||
while(!m_exit)
|
||||
{
|
||||
_mainLoopCommon();
|
||||
if(BTN_HOME_PRESSED || BTN_B_PRESSED || (BTN_A_PRESSED && m_btnMgr.selected(m_nandemuBtnBack)))
|
||||
{
|
||||
_hideNandEmu();
|
||||
nandemuPage = 1;
|
||||
_showNandEmu();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
_hideNandEmu();
|
||||
if(emuNand != m_cfg.getString(CHANNEL_DOMAIN, "current_emunand"))
|
||||
if(emuNand != m_cfg.getString(CHANNEL_DOMAIN, "current_emunand") || emuNand == ExtNand)
|
||||
{
|
||||
m_cfg.setBool(CHANNEL_DOMAIN, "update_cache", true);
|
||||
if(m_cfg.getBool(CHANNEL_DOMAIN, "source"))// or source is set - need to fix
|
||||
if(m_current_view & COVERFLOW_CHANNEL)
|
||||
m_refreshGameList = true;
|
||||
}
|
||||
return 0;
|
||||
@ -608,7 +625,7 @@ int CMenu::_FlashSave(string gameId)
|
||||
char basepath[MAX_FAT_PATH];
|
||||
snprintf(basepath, sizeof(basepath), "%s:/%s/%s", DeviceName[emuPartition], EMU_NANDS_DIR, m_cfg.getString(WII_DOMAIN, "current_save_emunand").c_str());
|
||||
|
||||
if(!_checkSave(gameId, false))
|
||||
if(!_checkSave(gameId, false))// if save not on emu nand
|
||||
return 0;
|
||||
|
||||
lwp_t thread = 0;
|
||||
@ -625,7 +642,6 @@ int CMenu::_FlashSave(string gameId)
|
||||
if(m_forceext)
|
||||
{
|
||||
m_forceext = false;
|
||||
m_btnMgr.hide(m_nandemuLblInit);
|
||||
m_btnMgr.show(m_nandemuLblTitle);
|
||||
m_btnMgr.show(m_nandfilePBar);
|
||||
m_btnMgr.show(m_nandemuPBar);
|
||||
@ -642,7 +658,7 @@ int CMenu::_FlashSave(string gameId)
|
||||
m_thrdWorking = true;
|
||||
LWP_CreateThread(&thread, (void *(*)(void *))CMenu::_NandFlasher, (void *)this, 0, 32768, 40);
|
||||
}
|
||||
else if(BTN_A_PRESSED && (m_btnMgr.selected(m_nandemuBtnBack)))
|
||||
else if(BTN_HOME_PRESSED || BTN_B_PRESSED || (BTN_A_PRESSED && m_btnMgr.selected(m_nandemuBtnBack)))
|
||||
{
|
||||
_hideNandEmu();
|
||||
return 1;
|
||||
@ -652,14 +668,14 @@ int CMenu::_FlashSave(string gameId)
|
||||
{
|
||||
LockMutex lock(m_mutex);
|
||||
m_thrdMessageAdded = false;
|
||||
if (!m_thrdMessage.empty())
|
||||
if(!m_thrdMessage.empty())
|
||||
m_btnMgr.setText(m_nandfileLblDialog, m_thrdMessage);
|
||||
m_btnMgr.setProgress(m_nandfilePBar, m_fileProgress);
|
||||
m_btnMgr.setProgress(m_nandemuPBar, m_thrdProgress);
|
||||
m_btnMgr.setText(m_nandfileLblMessage, wfmt(_fmt("fileprogress", L"%d / %dKB"), m_fileprog/0x400, m_filesize/0x400));
|
||||
m_btnMgr.setText(m_nandemuLblMessage, wfmt(_fmt("dumpprogress", L"%i%%"), (int)(m_thrdProgress*100.f)));
|
||||
|
||||
if (!m_thrdWorking)
|
||||
if(!m_thrdWorking)
|
||||
{
|
||||
m_btnMgr.setText(m_nandfinLblDialog, wfmt(_fmt("cfgne29", L"Flashed: %d saves / %d files / %d folders"), m_nandexentry, m_filesdone, m_foldersdone));
|
||||
if(m_dumpsize/0x400 > 0x270f)
|
||||
@ -676,9 +692,9 @@ int CMenu::_FlashSave(string gameId)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int CMenu::_AutoExtractSave(string gameId)
|
||||
int CMenu::_AutoExtractSave(string gameId)// called from wii game config menu or launching wii game
|
||||
{
|
||||
if(!_checkSave(gameId, true))//if save not on real nand or emunand path no good
|
||||
if(!_checkSave(gameId, true))//if save not on real nand
|
||||
return 0;
|
||||
|
||||
if(!m_forceext && _checkSave(gameId, false))//if not force extract and save is already on emunand
|
||||
@ -705,7 +721,7 @@ int CMenu::_AutoExtractSave(string gameId)
|
||||
while(!m_exit)
|
||||
{
|
||||
_mainLoopCommon();
|
||||
if((BTN_A_PRESSED && (m_btnMgr.selected(m_nandemuBtnExtract))) || m_forceext)
|
||||
if((BTN_A_PRESSED && m_btnMgr.selected(m_nandemuBtnExtract)) || m_forceext)
|
||||
{
|
||||
m_forceext = false;
|
||||
m_fulldump = false;
|
||||
@ -728,7 +744,7 @@ int CMenu::_AutoExtractSave(string gameId)
|
||||
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)))//create new save
|
||||
else if(BTN_A_PRESSED && m_btnMgr.selected(m_nandemuBtnDisable))//create new save
|
||||
{
|
||||
int emuPart = m_cfg.getInt(WII_DOMAIN, "savepartition");
|
||||
const char *emuPath = fmt("/%s/%s", EMU_NANDS_DIR, m_cfg.getString(WII_DOMAIN, "current_save_emunand").c_str());
|
||||
@ -745,7 +761,7 @@ int CMenu::_AutoExtractSave(string gameId)
|
||||
_hideNandEmu();
|
||||
return 0;
|
||||
}
|
||||
else if(BTN_A_PRESSED && (m_btnMgr.selected(m_nandemuBtnBack)))
|
||||
else if(BTN_A_PRESSED && m_btnMgr.selected(m_nandemuBtnBack))
|
||||
{
|
||||
_hideNandEmu();
|
||||
return 1;
|
||||
@ -755,14 +771,14 @@ int CMenu::_AutoExtractSave(string gameId)
|
||||
{
|
||||
LockMutex lock(m_mutex);
|
||||
m_thrdMessageAdded = false;
|
||||
if (!m_thrdMessage.empty())
|
||||
if(!m_thrdMessage.empty())
|
||||
m_btnMgr.setText(m_nandfileLblDialog, m_thrdMessage);
|
||||
m_btnMgr.setProgress(m_nandfilePBar, m_fileProgress);
|
||||
m_btnMgr.setProgress(m_nandemuPBar, m_thrdProgress);
|
||||
m_btnMgr.setText(m_nandfileLblMessage, wfmt(_fmt("fileprogress", L"%d / %dKB"), m_fileprog/0x400, m_filesize/0x400));
|
||||
m_btnMgr.setText(m_nandemuLblMessage, wfmt(_fmt("dumpprogress", L"%i%%"), (int)(m_thrdProgress*100.f)));
|
||||
|
||||
if (!m_thrdWorking)
|
||||
if(!m_thrdWorking)
|
||||
{
|
||||
m_btnMgr.setText(m_nandfinLblDialog, wfmt(_fmt("cfgne14", L"Extracted: %d saves / %d files / %d folders"), m_nandexentry, m_filesdone, m_foldersdone));
|
||||
if(m_dumpsize/0x400 > 0x270f)
|
||||
@ -811,6 +827,8 @@ int CMenu::_NandFlasher(void *obj)
|
||||
LWP_MutexLock(m.m_mutex);
|
||||
m_btnMgr.hide(m_nandfilePBar);
|
||||
m_btnMgr.hide(m_nandfileLblMessage);
|
||||
m_btnMgr.hide(m_nandemuPBar);
|
||||
m_btnMgr.hide(m_nandemuLblMessage);
|
||||
m._setDumpMsg(m._t("cfgne30", L"Flashing save files finished!"), 1.f, 1.f);
|
||||
LWP_MutexUnlock(m.m_mutex);
|
||||
return 0;
|
||||
@ -837,6 +855,8 @@ int CMenu::_NandDumper(void *obj)
|
||||
LWP_MutexLock(m.m_mutex);
|
||||
m_btnMgr.hide(m_nandfilePBar);
|
||||
m_btnMgr.hide(m_nandfileLblMessage);
|
||||
m_btnMgr.hide(m_nandemuPBar);
|
||||
m_btnMgr.hide(m_nandemuLblMessage);
|
||||
m._setDumpMsg(m._t("cfgne8", L"No valid FAT partition found for NAND Emulation!"), 1.f, 1.f);
|
||||
LWP_MutexUnlock(m.m_mutex);
|
||||
return 0;
|
||||
@ -863,21 +883,21 @@ int CMenu::_NandDumper(void *obj)
|
||||
|
||||
if(m.m_saveExtGameId.empty())
|
||||
{
|
||||
LWP_MutexLock(m.m_mutex);
|
||||
m._setDumpMsg(m._t("cfgne18", L"Listing game saves to extract..."), 0.f, 0.f);
|
||||
LWP_MutexUnlock(m.m_mutex);
|
||||
m.m_nandexentry = 0;
|
||||
saveList.reserve(m.m_gameList.size());
|
||||
for(u32 i = 0; i < m.m_gameList.size() && !m.m_thrdStop; ++i)
|
||||
{
|
||||
LWP_MutexLock(m.m_mutex);
|
||||
m._setDumpMsg(m._t("cfgne18", L"Listing game saves to extract..."), 0.f, 0.f);
|
||||
LWP_MutexUnlock(m.m_mutex);
|
||||
|
||||
if(m.m_gameList[i].type == TYPE_CHANNEL)
|
||||
if(m.m_gameList[i].type == TYPE_WII_GAME)
|
||||
{
|
||||
string id((const char *)m.m_gameList[i].id, 4);
|
||||
|
||||
if(!missingOnly || !m._checkSave(id, false))
|
||||
if(!missingOnly || !m._checkSave(id, false))// all or if save not on emu nand
|
||||
{
|
||||
if(m._checkSave(id, true))
|
||||
if(m._checkSave(id, true))// if save on real nand
|
||||
{
|
||||
m.m_nandexentry++;
|
||||
saveList.push_back(id);
|
||||
@ -919,6 +939,8 @@ int CMenu::_NandDumper(void *obj)
|
||||
LWP_MutexLock(m.m_mutex);
|
||||
m_btnMgr.hide(m_nandfilePBar);
|
||||
m_btnMgr.hide(m_nandfileLblMessage);
|
||||
m_btnMgr.hide(m_nandemuPBar);
|
||||
m_btnMgr.hide(m_nandemuLblMessage);
|
||||
m._setDumpMsg(m._t("cfgne19", L"Extraction finished!"), 1.f, 1.f);
|
||||
LWP_MutexUnlock(m.m_mutex);
|
||||
return 0;
|
||||
@ -930,13 +952,13 @@ void CMenu::_initNandEmuMenu()
|
||||
m_nandemuBg = _texture("NANDEMU/BG", "texture", theme.bg, false);
|
||||
m_nandemuLblTitle = _addTitle("NANDEMU/TITLE", theme.titleFont, L"", 0, 10, 640, 60, theme.titleFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE);
|
||||
|
||||
m_nandfilePBar = _addProgressBar("NANDEMU/FILEPROGRESS_BAR", 40, 80, 560, 20);
|
||||
m_nandfileLblMessage = _addLabel("NANDEMU/FMESSAGE", theme.lblFont, L"", 40, 110, 560, 100, theme.lblFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_TOP);
|
||||
m_nandfileLblDialog = _addLabel("NANDEMU/FDIALOG", theme.lblFont, L"", 40, 60, 560, 200, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_nandemuPBar = _addProgressBar("NANDEMU/PROGRESS_BAR", 40, 220, 560, 20);
|
||||
m_nandemuLblMessage = _addLabel("NANDEMU/MESSAGE", theme.lblFont, L"", 40, 280, 560, 100, theme.lblFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_TOP);
|
||||
m_nandemuLblDialog = _addLabel("NANDEMU/DIALOG", theme.lblFont, L"", 40, 190, 560, 200, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_nandfinLblDialog = _addLabel("NANDEMU/FINDIALOG", theme.lblFont, L"", 40, 120, 560, 200, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_nandemuLblDialog = _addLabel("NANDEMU/DIALOG", theme.lblFont, L"", 40, 180, 560, 200, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_nandfilePBar = _addProgressBar("NANDEMU/FILEPROGRESS_BAR", 40, 200, 560, 20);
|
||||
m_nandemuPBar = _addProgressBar("NANDEMU/PROGRESS_BAR", 40, 200, 560, 20);
|
||||
m_nandfileLblMessage = _addLabel("NANDEMU/FMESSAGE", theme.lblFont, L"", 40, 230, 560, 100, theme.lblFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_TOP);
|
||||
m_nandemuLblMessage = _addLabel("NANDEMU/MESSAGE", theme.lblFont, L"", 40, 350, 560, 100, theme.lblFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_TOP);
|
||||
|
||||
m_nandemuLblNandSelect = _addLabel("NANDEMU/NAND_SELECT", theme.lblFont, L"", 20, 125, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_nandemuLblNandSelectVal = _addLabel("NANDEMU/NAND_SELECT_BTN", theme.btnFont, L"", 468, 130, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
|
||||
@ -960,10 +982,13 @@ void CMenu::_initNandEmuMenu()
|
||||
m_nandemuBtnMissing = _addButton("NANDEMU/MISSING_BTN", theme.btnFont, L"", 420, 190, 200, 48, theme.btnFontColor);
|
||||
m_nandemuLblNandDump = _addLabel("NANDEMU/NAND_DUMP", theme.lblFont, L"", 20, 245, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_nandemuBtnNandDump = _addButton("NANDEMU/NAND_DUMP_BTN", theme.btnFont, L"", 420, 250, 200, 48, theme.btnFontColor);
|
||||
m_nandemuLblSavePartition = _addLabel("NANDEMU/SAVE_PART", theme.lblFont, L"", 20, 305, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_nandemuLblSavePartitionVal = _addLabel("NANDEMU/SAVE_PART_BTN", theme.btnFont, L"", 468, 310, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
|
||||
m_nandemuBtnSavePartitionM = _addPicButton("NANDEMU/SAVE_PART_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 420, 310, 48, 48);
|
||||
m_nandemuBtnSavePartitionP = _addPicButton("NANDEMU/SAVE_PART_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 572, 310, 48, 48);
|
||||
m_nandemuLblInstallWad = _addLabel("NANDEMU/INSTALL_WAD", theme.lblFont, L"", 20, 305, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_nandemuBtnInstallWad = _addButton("NANDEMU/INSTALL_WAD_BTN", theme.btnFont, L"", 420, 310, 200, 48, theme.btnFontColor);
|
||||
|
||||
m_nandemuLblSavePartition = _addLabel("NANDEMU/SAVE_PART", theme.lblFont, L"", 20, 125, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_nandemuLblSavePartitionVal = _addLabel("NANDEMU/SAVE_PART_BTN", theme.btnFont, L"", 468,130, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
|
||||
m_nandemuBtnSavePartitionM = _addPicButton("NANDEMU/SAVE_PART_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 420, 130, 48, 48);
|
||||
m_nandemuBtnSavePartitionP = _addPicButton("NANDEMU/SAVE_PART_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 572, 130, 48, 48);
|
||||
|
||||
m_nandemuBtnBack = _addButton("NANDEMU/BACK_BTN", theme.btnFont, L"", 420, 400, 200, 48, theme.btnFontColor);
|
||||
m_nandemuLblPage = _addLabel("NANDEMU/PAGE_BTN", theme.btnFont, L"", 68, 400, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
|
||||
@ -972,7 +997,6 @@ void CMenu::_initNandEmuMenu()
|
||||
|
||||
m_nandemuBtnExtract = _addButton("NANDEMU/EXTRACT", theme.titleFont, L"", 72, 180, 496, 48, theme.titleFontColor);
|
||||
m_nandemuBtnDisable = _addButton("NANDEMU/DISABLE", theme.titleFont, L"", 72, 270, 496, 48, theme.titleFontColor);
|
||||
m_nandemuBtnPartition = _addButton("NANDEMU/PARTITION", theme.titleFont, L"", 72, 360, 496, 48, theme.titleFontColor);
|
||||
m_nandemuLblInit = _addLabel("NANDEMU/INIT", theme.lblFont, L"", 40, 40, 560, 140, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
|
||||
_setHideAnim(m_nandemuLblTitle, "NANDEMU/TITLE", 0, 0, -2.f, 0.f);
|
||||
@ -1011,13 +1035,15 @@ void CMenu::_initNandEmuMenu()
|
||||
_setHideAnim(m_nandemuBtnSavePartitionM, "NANDEMU/SAVE_PART_MINUS", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_nandemuBtnSavePartitionP, "NANDEMU/SAVE_PART_PLUS", -50, 0, 1.f, 0.f);
|
||||
|
||||
_setHideAnim(m_nandemuLblInstallWad, "NANDEMU/INSTALL_WAD", 50, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_nandemuBtnInstallWad, "NANDEMU/INSTALL_WAD_BTN", -50, 0, 1.f, 0.f);
|
||||
|
||||
_setHideAnim(m_nandemuBtnBack, "NANDEMU/BACK_BTN", 0, 0, 1.f, -1.f);
|
||||
_setHideAnim(m_nandemuLblPage, "NANDEMU/PAGE_BTN", 0, 0, 1.f, -1.f);
|
||||
_setHideAnim(m_nandemuBtnPageM, "NANDEMU/PAGE_MINUS", 0, 0, 1.f, -1.f);
|
||||
_setHideAnim(m_nandemuBtnPageP, "NANDEMU/PAGE_PLUS", 0, 0, 1.f, -1.f);
|
||||
|
||||
_setHideAnim(m_nandemuBtnExtract, "NANDEMU/EXTRACT", 0, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_nandemuBtnPartition, "NANDEMU/PARTITION", 0, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_nandemuBtnDisable, "NANDEMU/DISABLE", 0, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_nandemuLblInit, "NANDEMU/INIT", 0, 0, -2.f, 0.f);
|
||||
|
||||
@ -1037,5 +1063,7 @@ void CMenu::_textNandEmu(void)
|
||||
m_btnMgr.setText(m_nandemuBtnMissing, _t("cfgne4", L"Missing"));
|
||||
m_btnMgr.setText(m_nandemuLblNandDump, _t("cfgne5", L"Extract NAND"));
|
||||
m_btnMgr.setText(m_nandemuBtnNandDump, _t("cfgne6", L"Start"));
|
||||
m_btnMgr.setText(m_nandemuLblInstallWad, _t("cfgne98", L"Install Wad"));
|
||||
m_btnMgr.setText(m_nandemuBtnInstallWad, _t("cfgne99", L"Go"));
|
||||
m_btnMgr.setText(m_nandemuBtnBack, _t("cfgne7", L"Back"));
|
||||
}
|
||||
|
@ -130,8 +130,8 @@ void CMenu::_Paths(void)
|
||||
{
|
||||
m_cfg.setString("GENERAL", "dir_box_covers", path);
|
||||
m_boxPicDir = path;
|
||||
//user needs to do a reload cache or we should just delete cache folder
|
||||
//m_refreshGameList = true;
|
||||
_initCF();
|
||||
}
|
||||
_showPaths();
|
||||
}
|
||||
@ -144,6 +144,7 @@ void CMenu::_Paths(void)
|
||||
m_cfg.setString("GENERAL", "dir_flat_covers", path);
|
||||
m_picDir = path;
|
||||
//m_refreshGameList = true;
|
||||
_initCF();
|
||||
}
|
||||
_showPaths();
|
||||
}
|
||||
@ -194,7 +195,7 @@ void CMenu::_Paths(void)
|
||||
memset(wii_games_dir, 0, 64);
|
||||
strncpy(wii_games_dir, tmpPath, 64);
|
||||
m_cfg.setBool(WII_DOMAIN, "update_cache", true);
|
||||
if(m_cfg.getBool(WII_DOMAIN, "source"))
|
||||
if(m_current_view & COVERFLOW_WII)
|
||||
m_refreshGameList = true;
|
||||
}
|
||||
_showPaths();
|
||||
@ -222,7 +223,7 @@ void CMenu::_Paths(void)
|
||||
memset(gc_games_dir, 0, 64);
|
||||
strncpy(gc_games_dir, tmpPath, 64);
|
||||
m_cfg.setBool(GC_DOMAIN, "update_cache", true);
|
||||
if(m_cfg.getBool(GC_DOMAIN, "source"))
|
||||
if(m_current_view & COVERFLOW_GAMECUBE)
|
||||
m_refreshGameList = true;
|
||||
}
|
||||
_showPaths();
|
||||
|
@ -84,7 +84,7 @@ void CMenu::_updatePluginCheckboxes(void)
|
||||
u32 IteratorHelp = (Plugin_curPage - 1) * 10;
|
||||
for(u8 i = 1; i < min(IteratorHelp+10, (u32)m_max_plugins)-IteratorHelp+1; ++i)
|
||||
{
|
||||
if(EnabledPlugins.size() == 0 || EnabledPlugins.at(i+IteratorHelp-1) == true)
|
||||
if(m_current_view == COVERFLOW_PLUGIN && (EnabledPlugins.size() == 0 || EnabledPlugins.at(i+IteratorHelp-1) == true))
|
||||
m_pluginBtn[i] = m_pluginBtnCats[i];
|
||||
else
|
||||
m_pluginBtn[i] = m_pluginBtnCat[i];
|
||||
@ -145,6 +145,12 @@ void CMenu::_PluginSettings()
|
||||
if(m_btnMgr.selected(m_pluginBtn[i]))
|
||||
{
|
||||
m_refreshGameList = true;
|
||||
if(m_current_view != COVERFLOW_PLUGIN)
|
||||
{
|
||||
for(u8 j = 0; m_plugin.PluginExist(j); j++)
|
||||
m_plugin.SetEnablePlugin(m_cfg, j, 1);
|
||||
m_current_view = COVERFLOW_PLUGIN;
|
||||
}
|
||||
if(i == 0)
|
||||
{
|
||||
m_plugin.GetEnabledPlugins(m_cfg, &enabledPluginsCount);
|
||||
@ -161,12 +167,13 @@ void CMenu::_PluginSettings()
|
||||
}
|
||||
_hidePluginSettings();
|
||||
m_plugin.GetEnabledPlugins(m_cfg, &enabledPluginsCount);
|
||||
if(m_refreshGameList || (m_current_view != COVERFLOW_PLUGIN && enabledPluginsCount > 0))
|
||||
if(m_refreshGameList && enabledPluginsCount > 0)
|
||||
{
|
||||
m_current_view = COVERFLOW_PLUGIN;
|
||||
_clearSources();
|
||||
m_cfg.setBool(_domainFromView(), "source", true);
|
||||
m_cfg.setUInt("GENERAL", "sources", m_current_view);
|
||||
m_source_cnt = 1;
|
||||
}
|
||||
else
|
||||
m_current_view = m_cfg.getUInt("GENERAL", "sources");
|
||||
}
|
||||
|
||||
void CMenu::_initPluginSettingsMenu()
|
||||
|
@ -40,53 +40,29 @@ void CMenu::_sourceFlow()
|
||||
strncpy(btn_selected, fmt("BUTTON_%i", hdr->settings[0]), 15);
|
||||
source = m_source.getString(btn_selected, "source", "");
|
||||
cf_domain = "_COVERFLOW";
|
||||
_clearSources();
|
||||
//this was my attempt or idea at making sourceflow multi-select
|
||||
/*if(source == "wii")
|
||||
{
|
||||
m_cfg.setBool(WII_DOMAIN, "source", true);
|
||||
if(sf_mode == 0)
|
||||
{
|
||||
m_current_view = COVERFLOW_WII;
|
||||
m_catStartPage = m_source.getInt(btn_selected, "cat_page", 1);
|
||||
}
|
||||
}*/
|
||||
if(source == "wii")
|
||||
{
|
||||
m_current_view = COVERFLOW_WII;
|
||||
m_cfg.setBool(WII_DOMAIN, "source", true);
|
||||
}
|
||||
else if(source == "dml")
|
||||
{
|
||||
|
||||
if(source == "dml")
|
||||
m_current_view = COVERFLOW_GAMECUBE;
|
||||
m_cfg.setBool(GC_DOMAIN, "source", true);
|
||||
}
|
||||
else if(source == "emunand")
|
||||
{
|
||||
m_current_view = COVERFLOW_CHANNEL;
|
||||
m_cfg.setBool(CHANNEL_DOMAIN, "source", true);
|
||||
m_cfg.setBool(CHANNEL_DOMAIN, "emu_nand", true);
|
||||
m_cfg.setBool(CHANNEL_DOMAIN, "real_nand", false);
|
||||
m_cfg.setUInt(CHANNEL_DOMAIN, "channels_type", CHANNELS_EMU);
|
||||
}
|
||||
else if(source == "realnand")
|
||||
{
|
||||
m_current_view = COVERFLOW_CHANNEL;
|
||||
m_cfg.setBool(CHANNEL_DOMAIN, "source", true);
|
||||
m_cfg.setBool(CHANNEL_DOMAIN, "real_nand", true);
|
||||
m_cfg.setBool(CHANNEL_DOMAIN, "emu_nand", false);
|
||||
m_cfg.setUInt(CHANNEL_DOMAIN, "channels_type", CHANNELS_REAL);
|
||||
}
|
||||
else if(source == "homebrew")
|
||||
{
|
||||
if(m_locked && m_cfg.getBool(HOMEBREW_DOMAIN, "parental", false))
|
||||
{
|
||||
error(_t("errsource1", L"Homebrew locked!"));
|
||||
m_current_view = COVERFLOW_WII;
|
||||
m_cfg.setBool(WII_DOMAIN, "source", true);
|
||||
m_current_view = COVERFLOW_WII;// or return
|
||||
}
|
||||
else
|
||||
{
|
||||
m_current_view = COVERFLOW_HOMEBREW;
|
||||
m_cfg.setBool(HOMEBREW_DOMAIN, "source", true);
|
||||
if(m_cfg.getBool(HOMEBREW_DOMAIN, "smallbox", true))
|
||||
cf_domain = "_SMALLFLOW";
|
||||
}
|
||||
@ -94,7 +70,6 @@ void CMenu::_sourceFlow()
|
||||
else if(source == "allplugins")
|
||||
{
|
||||
m_current_view = COVERFLOW_PLUGIN;
|
||||
m_cfg.setBool(PLUGIN_DOMAIN, "source", true);
|
||||
for(k = 0; k < m_numPlugins; ++k)
|
||||
m_plugin.SetEnablePlugin(m_cfg, k, 2); /* force enable */
|
||||
}
|
||||
@ -105,7 +80,6 @@ void CMenu::_sourceFlow()
|
||||
if(magicNums.size() > 0 )
|
||||
{
|
||||
m_current_view = COVERFLOW_PLUGIN;
|
||||
m_cfg.setBool(PLUGIN_DOMAIN, "source", true);
|
||||
for(k = 0; k < m_numPlugins; ++k)
|
||||
m_plugin.SetEnablePlugin(m_cfg, k, 1); /* force disable */
|
||||
for(vector<string>::iterator itr = magicNums.begin(); itr != magicNums.end(); itr++)
|
||||
@ -116,8 +90,11 @@ void CMenu::_sourceFlow()
|
||||
}
|
||||
}
|
||||
}
|
||||
m_sourceflow = false;// do something with this when in muilti
|
||||
//no autoboot if multi mode. may have to make sure autoboot plugins are hidden from flow when multi is on.
|
||||
else //(source == "wii")
|
||||
m_current_view = COVERFLOW_WII;
|
||||
m_sourceflow = false;
|
||||
m_cfg.setUInt("GENERAL", "sources", m_current_view);
|
||||
m_source_cnt = 1;
|
||||
_setSrcOptions();
|
||||
}
|
||||
|
||||
@ -184,9 +161,12 @@ void CMenu::_updateSourceBtns(void)
|
||||
const vector<bool> &EnabledPlugins = m_plugin.GetEnabledPlugins(m_cfg, &enabledPluginsCount);
|
||||
if(EnabledPlugins.size() == 0)//all plugins enabled
|
||||
{
|
||||
sourceBtn = i;
|
||||
selectedBtns++;
|
||||
btn_image = btn_imageSel;
|
||||
if(m_current_view & COVERFLOW_PLUGIN)
|
||||
{
|
||||
sourceBtn = i;
|
||||
selectedBtns++;
|
||||
btn_image = btn_imageSel;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(btnSource == "plugin")
|
||||
@ -196,7 +176,7 @@ void CMenu::_updateSourceBtns(void)
|
||||
u32 magic = strtoul(magicNums.at(0).c_str(), NULL, 16);
|
||||
if(m_plugin.GetEnableStatus(m_cfg, magic))
|
||||
{
|
||||
if(m_cfg.getBool(PLUGIN_DOMAIN, "source", false))
|
||||
if(m_current_view & COVERFLOW_PLUGIN)
|
||||
{
|
||||
sourceBtn = i;
|
||||
selectedBtns++;
|
||||
@ -204,10 +184,10 @@ void CMenu::_updateSourceBtns(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if((btnSource == "realnand" && m_cfg.getBool(CHANNEL_DOMAIN, "real_nand", false)) ||
|
||||
(btnSource == "emunand" && m_cfg.getBool(CHANNEL_DOMAIN, "emu_nand", false)))
|
||||
else if((btnSource == "realnand" && (m_cfg.getUInt(CHANNEL_DOMAIN, "channels_type") & CHANNELS_REAL)) ||
|
||||
(btnSource == "emunand" && (m_cfg.getUInt(CHANNEL_DOMAIN, "channels_type") & CHANNELS_EMU)))
|
||||
{
|
||||
if(m_cfg.getBool(CHANNEL_DOMAIN, "source", false))
|
||||
if(m_current_view & COVERFLOW_CHANNEL)
|
||||
{
|
||||
sourceBtn = i;
|
||||
selectedBtns++;
|
||||
@ -216,8 +196,8 @@ void CMenu::_updateSourceBtns(void)
|
||||
}
|
||||
else if(btnSource == "dml" || btnSource == "homebrew" || btnSource == "wii")
|
||||
{
|
||||
const char *domain = (btnSource == "dml" ? GC_DOMAIN : (btnSource == "homebrew" ? HOMEBREW_DOMAIN : WII_DOMAIN));
|
||||
if(m_cfg.getBool(domain, "source", false))
|
||||
u8 flow = (btnSource == "dml" ? COVERFLOW_GAMECUBE : (btnSource == "homebrew" ? COVERFLOW_HOMEBREW : COVERFLOW_WII));
|
||||
if(m_current_view & flow)
|
||||
{
|
||||
sourceBtn = i;
|
||||
selectedBtns++;
|
||||
@ -278,8 +258,9 @@ bool CMenu::_Source()
|
||||
cf_domain = "_COVERFLOW";
|
||||
if(selectedBtns == 0)
|
||||
{
|
||||
m_cfg.setBool(WII_DOMAIN, "source", true);
|
||||
m_current_view = COVERFLOW_WII;
|
||||
m_source_cnt = 1;
|
||||
m_cfg.setUInt("GENERAL", "sources", m_current_view);
|
||||
break;
|
||||
}
|
||||
if(selectedBtns == 1)
|
||||
@ -287,39 +268,13 @@ bool CMenu::_Source()
|
||||
memset(btn_selected, 0, 16);
|
||||
strncpy(btn_selected, fmt("BUTTON_%i", sourceBtn), 15);
|
||||
_setSrcOptions();
|
||||
//break;
|
||||
}
|
||||
|
||||
u8 sourceCount = 0;
|
||||
if(m_cfg.getBool(WII_DOMAIN, "source", false))
|
||||
{
|
||||
sourceCount++;
|
||||
m_current_view = COVERFLOW_WII;
|
||||
}
|
||||
if(m_cfg.getBool(GC_DOMAIN, "source", false))
|
||||
{
|
||||
sourceCount++;
|
||||
m_current_view = COVERFLOW_GAMECUBE;
|
||||
}
|
||||
if(m_cfg.getBool(CHANNEL_DOMAIN, "source", false))
|
||||
{
|
||||
sourceCount++;
|
||||
m_current_view = COVERFLOW_CHANNEL;
|
||||
}
|
||||
if(m_cfg.getBool(HOMEBREW_DOMAIN, "source", false))
|
||||
{
|
||||
sourceCount++;
|
||||
m_current_view = COVERFLOW_HOMEBREW;
|
||||
}
|
||||
if(m_cfg.getBool(PLUGIN_DOMAIN, "source", false))
|
||||
{
|
||||
sourceCount++;
|
||||
m_current_view = COVERFLOW_PLUGIN;
|
||||
}
|
||||
if(sourceCount > 1)
|
||||
{
|
||||
m_current_view = COVERFLOW_MAX;
|
||||
}
|
||||
m_cfg.setUInt("GENERAL", "sources", m_current_view);
|
||||
m_source_cnt = 0;
|
||||
for(i = 1; i < 16; i <<= 1)//not including coverflow_homebrew
|
||||
if(m_current_view & i)
|
||||
m_source_cnt++;
|
||||
break;
|
||||
}
|
||||
else if(BTN_UP_PRESSED)
|
||||
@ -348,11 +303,9 @@ bool CMenu::_Source()
|
||||
}
|
||||
else if(BTN_A_PRESSED && m_btnMgr.selected(m_sourceBtnClear))
|
||||
{
|
||||
_clearSources();
|
||||
for(u8 j = 0; m_plugin.PluginExist(j); j++)
|
||||
m_current_view = COVERFLOW_NONE;
|
||||
for(j = 0; m_plugin.PluginExist(j); j++)
|
||||
m_plugin.SetEnablePlugin(m_cfg, j, 1);
|
||||
m_cfg.setBool(CHANNEL_DOMAIN, "emu_nand", false);
|
||||
m_cfg.setBool(CHANNEL_DOMAIN, "real_nand", false);
|
||||
updateSource = true;
|
||||
}
|
||||
else if(BTN_A_PRESSED)
|
||||
@ -370,48 +323,40 @@ bool CMenu::_Source()
|
||||
}
|
||||
if(!m_multisource && i <12)
|
||||
{
|
||||
_clearSources();
|
||||
m_current_view = COVERFLOW_NONE;
|
||||
exitSource = true;
|
||||
m_catStartPage = 1;
|
||||
if(source == "dml")
|
||||
{
|
||||
m_cfg.setBool(GC_DOMAIN, "source", true);
|
||||
m_current_view = COVERFLOW_GAMECUBE;
|
||||
_setSrcOptions();
|
||||
}
|
||||
else if(source == "emunand" || source == "realnand")
|
||||
{
|
||||
if(source == "emunand")
|
||||
{
|
||||
m_current_view = COVERFLOW_CHANNEL;
|
||||
m_cfg.setBool(CHANNEL_DOMAIN, "source", true);
|
||||
m_cfg.setBool(CHANNEL_DOMAIN, "emu_nand", true);
|
||||
m_cfg.setBool(CHANNEL_DOMAIN, "real_nand", false);
|
||||
}
|
||||
m_cfg.setUInt(CHANNEL_DOMAIN, "channels_type", CHANNELS_EMU);
|
||||
else
|
||||
{
|
||||
m_current_view = COVERFLOW_CHANNEL;
|
||||
m_cfg.setBool(CHANNEL_DOMAIN, "source", true);
|
||||
m_cfg.setBool(CHANNEL_DOMAIN, "emu_nand", false);
|
||||
m_cfg.setBool(CHANNEL_DOMAIN, "real_nand", true);
|
||||
}
|
||||
m_cfg.setUInt(CHANNEL_DOMAIN, "channels_type", CHANNELS_REAL);
|
||||
m_current_view = COVERFLOW_CHANNEL;
|
||||
_setSrcOptions();
|
||||
}
|
||||
else if(source == "homebrew")
|
||||
{
|
||||
if(m_locked && m_cfg.getBool(HOMEBREW_DOMAIN, "parental", false))
|
||||
{
|
||||
error(_t("errsource1", L"Homebrew locked!"));
|
||||
exitSource = false;
|
||||
_showSource();
|
||||
_updateSourceBtns();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_cfg.setBool(HOMEBREW_DOMAIN, "source", true);
|
||||
m_current_view = COVERFLOW_HOMEBREW;
|
||||
_setSrcOptions();
|
||||
}
|
||||
}
|
||||
else if(source == "allplugins")
|
||||
{
|
||||
m_cfg.setBool(PLUGIN_DOMAIN, "source", true);
|
||||
m_current_view = COVERFLOW_PLUGIN;
|
||||
for(k = 0; k < m_numPlugins; ++k)
|
||||
m_plugin.SetEnablePlugin(m_cfg, k, 2); /* force enable */
|
||||
@ -419,7 +364,6 @@ bool CMenu::_Source()
|
||||
}
|
||||
else if(source == "plugin")
|
||||
{
|
||||
m_cfg.setBool(PLUGIN_DOMAIN, "source", true);
|
||||
m_current_view = COVERFLOW_PLUGIN;
|
||||
_setSrcOptions();
|
||||
for(k = 0; k < m_numPlugins; ++k)
|
||||
@ -441,7 +385,6 @@ bool CMenu::_Source()
|
||||
}
|
||||
else //if(source == "wii") or source is invalid or empty default to wii
|
||||
{
|
||||
m_cfg.setBool(WII_DOMAIN, "source", true);
|
||||
m_current_view = COVERFLOW_WII;
|
||||
_setSrcOptions();
|
||||
}
|
||||
@ -450,54 +393,48 @@ bool CMenu::_Source()
|
||||
{
|
||||
updateSource = true;
|
||||
if(source == "wii")
|
||||
{
|
||||
m_cfg.setBool(WII_DOMAIN, "source", !m_cfg.getBool(WII_DOMAIN, "source"));
|
||||
}
|
||||
m_current_view ^= COVERFLOW_WII;// toggle on/off
|
||||
else if(source == "dml")
|
||||
{
|
||||
m_cfg.setBool(GC_DOMAIN, "source", !m_cfg.getBool(GC_DOMAIN, "source"));
|
||||
}
|
||||
m_current_view ^= COVERFLOW_GAMECUBE;
|
||||
else if(source == "emunand" || source == "realnand")
|
||||
{
|
||||
u8 chantype = m_cfg.getUInt(CHANNEL_DOMAIN, "channels_type");
|
||||
if(source == "realnand")
|
||||
{
|
||||
if(m_cfg.getBool(CHANNEL_DOMAIN, "source"))
|
||||
m_cfg.setBool(CHANNEL_DOMAIN, "real_nand", !m_cfg.getBool(CHANNEL_DOMAIN, "real_nand"));
|
||||
if(m_current_view & COVERFLOW_CHANNEL)
|
||||
m_cfg.setUInt(CHANNEL_DOMAIN, "channels_type", (chantype ^= CHANNELS_REAL));
|
||||
else
|
||||
{
|
||||
m_cfg.setBool(CHANNEL_DOMAIN, "real_nand", true);
|
||||
m_cfg.setBool(CHANNEL_DOMAIN, "emu_nand", false);
|
||||
}
|
||||
m_cfg.setUInt(CHANNEL_DOMAIN, "channels_type", CHANNELS_REAL);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(m_cfg.getBool(CHANNEL_DOMAIN, "source"))
|
||||
m_cfg.setBool(CHANNEL_DOMAIN, "emu_nand", !m_cfg.getBool(CHANNEL_DOMAIN, "emu_nand"));
|
||||
if(m_current_view & COVERFLOW_CHANNEL)
|
||||
m_cfg.setUInt(CHANNEL_DOMAIN, "channels_type", (chantype ^= CHANNELS_EMU));
|
||||
else
|
||||
{
|
||||
m_cfg.setBool(CHANNEL_DOMAIN, "emu_nand", true);
|
||||
m_cfg.setBool(CHANNEL_DOMAIN, "real_nand", false);
|
||||
}
|
||||
m_cfg.setUInt(CHANNEL_DOMAIN, "channels_type", CHANNELS_EMU);
|
||||
}
|
||||
if(m_cfg.getBool(CHANNEL_DOMAIN, "emu_nand") || m_cfg.getBool(CHANNEL_DOMAIN, "real_nand"))
|
||||
m_cfg.setBool(CHANNEL_DOMAIN, "source", true);
|
||||
if(m_cfg.getUInt(CHANNEL_DOMAIN, "channels_type") & CHANNELS_BOTH)
|
||||
m_current_view |= COVERFLOW_CHANNEL; //set on
|
||||
else
|
||||
m_cfg.setBool(CHANNEL_DOMAIN, "source", false);
|
||||
m_current_view &= ~COVERFLOW_CHANNEL;// clear off
|
||||
}
|
||||
else if(source == "homebrew")
|
||||
{
|
||||
error(_t("errsource2", L"Homebrew and multisource not allowed!"));
|
||||
error(_t("errsource2", L"Homebrew in multisource not allowed!"));
|
||||
updateSource = false;
|
||||
_showSource();
|
||||
_updateSourceBtns();
|
||||
}
|
||||
else if(source == "allplugins")
|
||||
{
|
||||
m_plugin.GetEnabledPlugins(m_cfg, &enabledPluginsCount);
|
||||
for(j = 0; m_plugin.PluginExist(j); ++j) /* opposite */
|
||||
m_plugin.SetEnablePlugin(m_cfg, j, (enabledPluginsCount == 0) ? 2 : 1);
|
||||
m_cfg.setBool(PLUGIN_DOMAIN, "source", (enabledPluginsCount == 0) ? true : false);
|
||||
m_current_view = enabledPluginsCount == 0 ? (m_current_view | COVERFLOW_PLUGIN) : (m_current_view & ~COVERFLOW_PLUGIN);
|
||||
}
|
||||
else if(source == "plugin")
|
||||
{
|
||||
if(!m_cfg.getBool(PLUGIN_DOMAIN, "source"))
|
||||
if(!(m_current_view & COVERFLOW_PLUGIN))
|
||||
{
|
||||
for(j = 0; m_plugin.PluginExist(j); ++j) /* clear all */
|
||||
m_plugin.SetEnablePlugin(m_cfg, j, 1);
|
||||
@ -513,17 +450,18 @@ bool CMenu::_Source()
|
||||
{
|
||||
bool enabled = m_plugin.GetEnableStatus(m_cfg, strtoul(itr->c_str(), NULL, 16));
|
||||
m_plugin.SetEnablePlugin(m_cfg, exist, enabled ? 1 : 2);
|
||||
//break;
|
||||
}
|
||||
}
|
||||
}
|
||||
m_plugin.GetEnabledPlugins(m_cfg, &enabledPluginsCount);
|
||||
m_cfg.setBool(PLUGIN_DOMAIN, "source", enabledPluginsCount > 0 ? true : false);
|
||||
m_current_view = enabledPluginsCount > 0 ? (m_current_view | COVERFLOW_PLUGIN) : (m_current_view & ~COVERFLOW_PLUGIN);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(exitSource)
|
||||
{
|
||||
m_cfg.setUInt("GENERAL", "sources", m_current_view);
|
||||
m_source_cnt = 1;
|
||||
newSource = true;
|
||||
break;
|
||||
}
|
||||
@ -636,15 +574,6 @@ void CMenu::_setSrcOptions(void)
|
||||
}
|
||||
}
|
||||
|
||||
void CMenu::_clearSources(void)
|
||||
{
|
||||
m_cfg.setBool(WII_DOMAIN, "source", false);
|
||||
m_cfg.setBool(GC_DOMAIN, "source", false);
|
||||
m_cfg.setBool(CHANNEL_DOMAIN, "source", false);
|
||||
m_cfg.setBool(HOMEBREW_DOMAIN, "source", false);
|
||||
m_cfg.setBool(PLUGIN_DOMAIN, "source", false);
|
||||
}
|
||||
|
||||
void CMenu::_initSourceMenu()
|
||||
{
|
||||
m_use_source = false;
|
||||
|
@ -257,24 +257,33 @@ int installWad(const char *path)
|
||||
return hash_errors;
|
||||
}
|
||||
|
||||
s16 m_wadBtnInstall;
|
||||
s16 m_wadLblTitle;
|
||||
s16 m_wadLblDialog;
|
||||
s16 m_wadLblNandSelect;
|
||||
s16 m_wadLblNandSelectVal;
|
||||
s16 m_wadBtnNandSelectM;
|
||||
s16 m_wadBtnNandSelectP;
|
||||
s16 m_wadBtnInstall;
|
||||
s16 m_wadLblUser[4];
|
||||
|
||||
static inline int loopNum(int i, int s)
|
||||
{
|
||||
return (i + s) % s;
|
||||
}
|
||||
|
||||
void CMenu::_showWad()
|
||||
{
|
||||
_setBg(m_wadBg, m_wadBg);
|
||||
m_btnMgr.show(m_wadBtnInstall);
|
||||
m_btnMgr.show(m_wadLblTitle);
|
||||
m_btnMgr.show(m_wadLblDialog);
|
||||
/* partition selection */
|
||||
/* emuNAND selection */
|
||||
if(mios == false)
|
||||
{
|
||||
m_btnMgr.show(m_configLblPartitionName);
|
||||
m_btnMgr.show(m_configLblPartition);
|
||||
m_btnMgr.show(m_configBtnPartitionP);
|
||||
m_btnMgr.show(m_configBtnPartitionM);
|
||||
m_btnMgr.show(m_wadLblNandSelect);
|
||||
m_btnMgr.show(m_wadLblNandSelectVal);
|
||||
m_btnMgr.show(m_wadBtnNandSelectP);
|
||||
m_btnMgr.show(m_wadBtnNandSelectM);
|
||||
}
|
||||
|
||||
for(u8 i = 0; i < ARRAY_SIZE(m_wadLblUser); ++i)
|
||||
@ -287,13 +296,13 @@ void CMenu::_hideWad(bool instant)
|
||||
m_btnMgr.hide(m_wadBtnInstall, instant);
|
||||
m_btnMgr.hide(m_wadLblTitle, instant);
|
||||
m_btnMgr.hide(m_wadLblDialog, instant);
|
||||
/* partition selection */
|
||||
/* emuNAND selection */
|
||||
if(mios == false)
|
||||
{
|
||||
m_btnMgr.hide(m_configLblPartitionName);
|
||||
m_btnMgr.hide(m_configLblPartition);
|
||||
m_btnMgr.hide(m_configBtnPartitionP);
|
||||
m_btnMgr.hide(m_configBtnPartitionM);
|
||||
m_btnMgr.hide(m_wadLblNandSelect, instant);
|
||||
m_btnMgr.hide(m_wadLblNandSelectVal, instant);
|
||||
m_btnMgr.hide(m_wadBtnNandSelectP, instant);
|
||||
m_btnMgr.hide(m_wadBtnNandSelectM, instant);
|
||||
}
|
||||
|
||||
for(u8 i = 0; i < ARRAY_SIZE(m_wadLblUser); ++i)
|
||||
@ -426,9 +435,22 @@ void CMenu::_Wad(const char *wad_path)
|
||||
}
|
||||
}
|
||||
|
||||
u8 part = currentPartition;
|
||||
m_btnMgr.setText(m_wadLblDialog, wfmt(_fmt("wad3", L"Selected %s, after the installation you return to the explorer."), (strrchr(wad_path, '/')+1)));
|
||||
m_btnMgr.setText(m_configLblPartition, upperCase(DeviceName[currentPartition]));
|
||||
vector<string> emuNands;
|
||||
string emuNand = m_cfg.getString(CHANNEL_DOMAIN, "current_emunand");
|
||||
int emuPart = m_cfg.getInt(CHANNEL_DOMAIN, "partition");
|
||||
_listEmuNands(fmt("%s:/%s", DeviceName[emuPart], EMU_NANDS_DIR), emuNands);
|
||||
int curEmuNand = 0;
|
||||
for(u8 i = 0; i < emuNands.size(); ++i)
|
||||
{
|
||||
if(emuNands[i] == emuNand)
|
||||
{
|
||||
curEmuNand = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
m_btnMgr.setText(m_wadLblDialog, wfmt(_fmt("wad7", L"Ready to install %s\nChoose emuNAND and then click Go."), (strrchr(wad_path, '/')+1)));
|
||||
m_btnMgr.setText(m_wadLblNandSelectVal, m_cfg.getString(CHANNEL_DOMAIN, "current_emunand"));
|
||||
_showWad();
|
||||
|
||||
while(!m_exit)
|
||||
@ -463,16 +485,21 @@ void CMenu::_Wad(const char *wad_path)
|
||||
else
|
||||
m_btnMgr.setText(m_wbfsLblDialog, wfmt(_fmt("wad6", L"Installation finished with %i hash fails."), result));
|
||||
}
|
||||
else if((m_btnMgr.selected(m_configBtnPartitionP) || m_btnMgr.selected(m_configBtnPartitionM)))
|
||||
else if(BTN_A_PRESSED && (m_btnMgr.selected(m_wadBtnNandSelectP) || m_btnMgr.selected(m_wadBtnNandSelectM)))
|
||||
{
|
||||
s8 direction = m_btnMgr.selected(m_configBtnPartitionP) ? 1 : -1;
|
||||
_setPartition(direction);
|
||||
m_btnMgr.setText(m_configLblPartition, upperCase(DeviceName[currentPartition]));
|
||||
s8 direction = m_btnMgr.selected(m_wadBtnNandSelectP) ? 1 : -1;
|
||||
curEmuNand = loopNum(curEmuNand + direction, emuNands.size());
|
||||
m_cfg.setString(CHANNEL_DOMAIN, "current_emunand", emuNands[curEmuNand]);
|
||||
m_btnMgr.setText(m_wadLblNandSelectVal, m_cfg.getString(CHANNEL_DOMAIN, "current_emunand"));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
currentPartition = part;
|
||||
if(m_cfg.getString(CHANNEL_DOMAIN, "current_emunand") == emuNand)
|
||||
{
|
||||
m_refreshGameList = true;
|
||||
m_cfg.setBool(CHANNEL_DOMAIN, "update_cache", true);
|
||||
}
|
||||
m_cfg.setString(CHANNEL_DOMAIN, "current_emunand", emuNand);//restore it
|
||||
_hideWad();
|
||||
/* onscreen message might be onscreen still */
|
||||
m_btnMgr.hide(m_wbfsLblMessage);
|
||||
@ -487,10 +514,18 @@ void CMenu::_initWad()
|
||||
m_wadBg = _texture("WAD/BG", "texture", theme.bg, false);
|
||||
m_wadLblTitle = _addTitle("WAD/TITLE", theme.titleFont, L"", 0, 10, 640, 60, theme.titleFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE);
|
||||
m_wadLblDialog = _addLabel("WAD/DIALOG", theme.lblFont, L"", 20, 75, 600, 200, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_wadLblNandSelect = _addLabel("WAD/NAND_SELECT", theme.lblFont, L"", 20, 245, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_wadLblNandSelectVal = _addLabel("WAD/NAND_SELECT_BTN", theme.btnFont, L"", 468, 250, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
|
||||
m_wadBtnNandSelectM = _addPicButton("WAD/NAND_SELECT_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 420, 250, 48, 48);
|
||||
m_wadBtnNandSelectP = _addPicButton("WAD/NAND_SELECT_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 572, 250, 48, 48);
|
||||
m_wadBtnInstall = _addButton("WAD/INSTALL_BTN", theme.btnFont, L"", 420, 400, 200, 48, theme.btnFontColor);
|
||||
|
||||
_setHideAnim(m_wadLblTitle, "WAD/TITLE", 0, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_wadLblDialog, "WAD/DIALOG", 0, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_wadLblNandSelect, "WAD/NAND_SELECT", 50, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_wadLblNandSelectVal, "WAD/NAND_SELECT_BTN", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_wadBtnNandSelectM, "WAD/NAND_SELECT_MINUS", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_wadBtnNandSelectP, "WAD/NAND_SELECT_PLUS", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_wadBtnInstall, "WAD/INSTALL_BTN", 0, 0, 1.f, -1.f);
|
||||
|
||||
_hideWad(true);
|
||||
@ -500,5 +535,6 @@ void CMenu::_initWad()
|
||||
void CMenu::_textWad()
|
||||
{
|
||||
m_btnMgr.setText(m_wadLblTitle, _t("wad1", L"Install WAD"));
|
||||
m_btnMgr.setText(m_wadLblNandSelect, _t("cfgne37", L"Select NAND"));
|
||||
m_btnMgr.setText(m_wadBtnInstall, _t("wad2", L"Go"));
|
||||
}
|
||||
|
@ -11,10 +11,6 @@
|
||||
|
||||
void CMenu::_hideWBFS(bool instant)
|
||||
{
|
||||
m_btnMgr.hide(m_configLblPartitionName, instant);
|
||||
m_btnMgr.hide(m_configLblPartition, instant);
|
||||
m_btnMgr.hide(m_configBtnPartitionP, instant);
|
||||
m_btnMgr.hide(m_configBtnPartitionM, instant);
|
||||
m_btnMgr.hide(m_wbfsLblTitle, instant);
|
||||
m_btnMgr.hide(m_wbfsPBar, instant);
|
||||
m_btnMgr.hide(m_wbfsBtnGo, instant);
|
||||
@ -32,11 +28,6 @@ void CMenu::_showWBFS(CMenu::WBFS_OP op)
|
||||
{
|
||||
case WO_ADD_GAME:
|
||||
m_btnMgr.setText(m_wbfsLblTitle, _t("wbfsop1", L"Install Game"));
|
||||
m_btnMgr.setText(m_configLblPartition, upperCase(DeviceName[currentPartition]));
|
||||
m_btnMgr.show(m_configLblPartitionName);
|
||||
m_btnMgr.show(m_configLblPartition);
|
||||
m_btnMgr.show(m_configBtnPartitionP);
|
||||
m_btnMgr.show(m_configBtnPartitionM);
|
||||
break;
|
||||
case WO_REMOVE_GAME:
|
||||
m_btnMgr.setText(m_wbfsLblTitle, _t("wbfsop2", L"Delete Game"));
|
||||
@ -135,6 +126,7 @@ int CMenu::_gameInstaller(void *obj)
|
||||
LWP_MutexLock(m.m_mutex);
|
||||
m._setThrdMsg(wfmt(m._fmt("wbfsop10", L"Not enough space: %lld blocks needed, %i available"), comp_size, free), 0.f);
|
||||
LWP_MutexUnlock(m.m_mutex);
|
||||
//m.m_thrdWorking = false;
|
||||
ret = -1;
|
||||
}
|
||||
else
|
||||
@ -163,7 +155,7 @@ int CMenu::_GCgameInstaller()
|
||||
|
||||
bool skip = m_cfg.getBool(GC_DOMAIN, "skip_on_error", false);
|
||||
bool comp = m_cfg.getBool(GC_DOMAIN, "compressed_dump", false);
|
||||
bool wexf = m_cfg.getBool(GC_DOMAIN, "write_ex_files", true);
|
||||
bool wexf = m_cfg.getBool(GC_DOMAIN, "write_ex_files", false);
|
||||
bool alig = m_cfg.getBool(GC_DOMAIN, "force_32k_align_files", false);
|
||||
u32 nretry = m_cfg.getUInt(GC_DOMAIN, "num_retries", 5);
|
||||
u32 rsize = 1048576; //1MB
|
||||
@ -271,6 +263,7 @@ bool CMenu::_wbfsOp(CMenu::WBFS_OP op)
|
||||
bool upd_plgin = false;
|
||||
bool upd_chan = false;
|
||||
bool out = false;
|
||||
u8 game_type = TYPE_WII_GAME;
|
||||
const dir_discHdr *CF_Hdr = CoverFlow.getHdr();
|
||||
char cfPos[7];
|
||||
cfPos[6] = '\0';
|
||||
@ -310,15 +303,10 @@ bool CMenu::_wbfsOp(CMenu::WBFS_OP op)
|
||||
switch(op)
|
||||
{
|
||||
case WO_ADD_GAME:
|
||||
MusicPlayer.Stop();
|
||||
TempLoadIOS();
|
||||
m_btnMgr.hide(m_configLblPartitionName, true);
|
||||
m_btnMgr.hide(m_configLblPartition, true);
|
||||
m_btnMgr.hide(m_configBtnPartitionP, true);
|
||||
m_btnMgr.hide(m_configBtnPartitionM, true);
|
||||
TempLoadIOS();// switch to cios if using ios 58
|
||||
m_btnMgr.hide(m_wbfsBtnGo, true);
|
||||
m_btnMgr.show(m_wbfsPBar, true);
|
||||
m_btnMgr.setProgress(m_wbfsPBar, 0.f, true);
|
||||
m_btnMgr.hide(m_wbfsBtnGo, true);
|
||||
m_btnMgr.show(m_wbfsLblMessage, true);
|
||||
m_btnMgr.setText(m_wbfsLblMessage, L"");
|
||||
if (Disc_Wait() < 0)
|
||||
@ -335,6 +323,10 @@ bool CMenu::_wbfsOp(CMenu::WBFS_OP op)
|
||||
}
|
||||
if (Disc_IsWii() == 0)
|
||||
{
|
||||
error(_t("wbfsoperr6", L"Install Wii game is broken, please use cleanrip."));
|
||||
out = true;
|
||||
break;
|
||||
|
||||
Disc_ReadHeader(&wii_hdr);
|
||||
memcpy(GameID, wii_hdr.id, 6);
|
||||
if(_searchGamesByID(GameID))
|
||||
@ -343,9 +335,11 @@ bool CMenu::_wbfsOp(CMenu::WBFS_OP op)
|
||||
out = true;
|
||||
break;
|
||||
}
|
||||
game_type = TYPE_WII_GAME;
|
||||
CoverFlow.clear();
|
||||
strncpy(cfPos, GameID, 6);
|
||||
m_btnMgr.setText(m_wbfsLblDialog, wfmt(_fmt("wbfsop6", L"Installing [%s] %s..."), GameID, wii_hdr.title));
|
||||
currentPartition = m_cfg.getInt(WII_DOMAIN, "partition", 0);
|
||||
done = true;
|
||||
upd_wii = true;
|
||||
m_thrdWorking = true;
|
||||
@ -363,7 +357,10 @@ bool CMenu::_wbfsOp(CMenu::WBFS_OP op)
|
||||
out = true;
|
||||
break;
|
||||
}
|
||||
game_type = TYPE_GC_GAME;
|
||||
CoverFlow.clear();
|
||||
strncpy(cfPos, GameID, 6);
|
||||
currentPartition = m_cfg.getInt(GC_DOMAIN, "partition", 0);
|
||||
done = true;
|
||||
upd_gc = true;
|
||||
m_thrdWorking = true;
|
||||
@ -374,6 +371,11 @@ bool CMenu::_wbfsOp(CMenu::WBFS_OP op)
|
||||
m_thrdMessageAdded = true;
|
||||
_GCgameInstaller();
|
||||
_stop_pThread();
|
||||
/* restart inputs to resolve an issue */
|
||||
Close_Inputs();
|
||||
Open_Inputs();
|
||||
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
||||
WPAD_SetVRes(chan, m_vid.width() + m_cursor[chan].width(), m_vid.height() + m_cursor[chan].height());
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -382,6 +384,7 @@ bool CMenu::_wbfsOp(CMenu::WBFS_OP op)
|
||||
}
|
||||
break;
|
||||
case WO_REMOVE_GAME:
|
||||
done = true;
|
||||
if(CF_Hdr->type == TYPE_GC_GAME)
|
||||
{
|
||||
char GC_Path[1024];
|
||||
@ -455,30 +458,28 @@ bool CMenu::_wbfsOp(CMenu::WBFS_OP op)
|
||||
}
|
||||
if(out)
|
||||
{
|
||||
TempLoadIOS(IOS_TYPE_NORMAL_IOS);
|
||||
TempLoadIOS(IOS_TYPE_NORMAL_IOS);//restore to IOS 58 if not using cios
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if((m_btnMgr.selected(m_configBtnPartitionP) || m_btnMgr.selected(m_configBtnPartitionM)))
|
||||
{
|
||||
s8 direction = m_btnMgr.selected(m_configBtnPartitionP) ? 1 : -1;
|
||||
_setPartition(direction);
|
||||
m_btnMgr.setText(m_configLblPartition, upperCase(DeviceName[currentPartition]));
|
||||
}
|
||||
}
|
||||
if(m_thrdMessageAdded)
|
||||
{
|
||||
LockMutex lock(m_mutex);
|
||||
m_thrdMessageAdded = false;
|
||||
if (!m_thrdMessage.empty())
|
||||
if(!m_thrdMessage.empty())
|
||||
m_btnMgr.setText(m_wbfsLblDialog, m_thrdMessage);
|
||||
m_btnMgr.setProgress(m_wbfsPBar, m_thrdProgress);
|
||||
m_btnMgr.setText(m_wbfsLblMessage, wfmt(L"%i%%", (int)(m_thrdProgress * 100.f)));
|
||||
if(!m_thrdWorking && op == WO_ADD_GAME)
|
||||
{
|
||||
WDVD_StopMotor();
|
||||
MusicPlayer.Stop();
|
||||
TempLoadIOS(IOS_TYPE_NORMAL_IOS);
|
||||
TempLoadIOS(IOS_TYPE_NORMAL_IOS);//restore to IOS 58 if not using cios
|
||||
/* restart inputs to resolve an issue */
|
||||
Close_Inputs();
|
||||
Open_Inputs();
|
||||
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
||||
WPAD_SetVRes(chan, m_vid.width() + m_cursor[chan].width(), m_vid.height() + m_cursor[chan].height());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -487,29 +488,20 @@ bool CMenu::_wbfsOp(CMenu::WBFS_OP op)
|
||||
{
|
||||
if(op == WO_ADD_GAME)
|
||||
{
|
||||
if(CF_Hdr->type == TYPE_WII_GAME)
|
||||
if(game_type == TYPE_WII_GAME)
|
||||
m_cfg.setString(WII_DOMAIN, "current_item", cfPos);
|
||||
else
|
||||
m_cfg.setString(GC_DOMAIN, "current_item", cfPos);
|
||||
}
|
||||
if(upd_gc)
|
||||
//UpdateCache(COVERFLOW_GAMECUBE);
|
||||
m_cfg.setBool(GC_DOMAIN, "update_cache", true);
|
||||
if(upd_wii)
|
||||
//UpdateCache(COVERFLOW_WII);
|
||||
m_cfg.setBool(WII_DOMAIN, "update_cache", true);
|
||||
if(upd_plgin)
|
||||
//UpdateCache(COVERFLOW_PLUGIN);
|
||||
m_cfg.setBool(PLUGIN_DOMAIN, "update_cache", true);
|
||||
if(upd_chan)
|
||||
//UpdateCache(COVERFLOW_CHANNEL);
|
||||
m_cfg.setBool(CHANNEL_DOMAIN, "update_cache", true);
|
||||
m_refreshGameList = true;
|
||||
/* restart inputs to resolve an issue */
|
||||
Close_Inputs();
|
||||
Open_Inputs();
|
||||
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
||||
WPAD_SetVRes(chan, m_vid.width() + m_cursor[chan].width(), m_vid.height() + m_cursor[chan].height());
|
||||
}
|
||||
return done;
|
||||
}
|
||||
@ -519,8 +511,8 @@ void CMenu::_initWBFSMenu()
|
||||
_addUserLabels(m_wbfsLblUser, ARRAY_SIZE(m_wbfsLblUser), "WBFS");
|
||||
m_wbfsBg = _texture("WBFS/BG", "texture", theme.bg, false);
|
||||
m_wbfsLblTitle = _addTitle("WBFS/TITLE", theme.titleFont, L"", 0, 10, 640, 60, theme.titleFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE);
|
||||
m_wbfsLblDialog = _addLabel("WBFS/DIALOG", theme.lblFont, L"", 20, 75, 600, 200, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_wbfsLblMessage = _addLabel("WBFS/MESSAGE", theme.lblFont, L"", 20, 300, 600, 100, theme.lblFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_TOP);
|
||||
m_wbfsLblDialog = _addLabel("WBFS/DIALOG", theme.lblFont, L"", 40, 75, 600, 200, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_wbfsLblMessage = _addLabel("WBFS/MESSAGE", theme.lblFont, L"", 40, 300, 600, 100, theme.lblFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_TOP);
|
||||
m_wbfsPBar = _addProgressBar("WBFS/PROGRESS_BAR", 40, 200, 560, 20);
|
||||
m_wbfsBtnGo = _addButton("WBFS/GO_BTN", theme.btnFont, L"", 420, 400, 200, 48, theme.btnFontColor);
|
||||
|
||||
|
@ -12,12 +12,19 @@ enum {
|
||||
};
|
||||
|
||||
enum {
|
||||
COVERFLOW_WII = 0,
|
||||
COVERFLOW_GAMECUBE,
|
||||
COVERFLOW_CHANNEL,
|
||||
COVERFLOW_PLUGIN,
|
||||
COVERFLOW_HOMEBREW,
|
||||
COVERFLOW_MAX
|
||||
CHANNELS_REAL = 1,
|
||||
CHANNELS_EMU,
|
||||
CHANNELS_BOTH
|
||||
};
|
||||
|
||||
enum {
|
||||
COVERFLOW_NONE = 0x00,
|
||||
COVERFLOW_WII = 0x01,
|
||||
COVERFLOW_GAMECUBE = 0x02,
|
||||
COVERFLOW_CHANNEL = 0x04,
|
||||
COVERFLOW_PLUGIN = 0x08,
|
||||
COVERFLOW_HOMEBREW = 0x10,
|
||||
COVERFLOW_MAX = 0xFF
|
||||
};
|
||||
|
||||
enum
|
||||
|
@ -47,8 +47,9 @@ cfgb1=Ocarina
|
||||
cfgb2=Default GC game loader
|
||||
cfgb3=Default video mode
|
||||
cfgb4=Default game language
|
||||
cfgb5=Default DML video mode
|
||||
cfgb6=Default DML game language
|
||||
cfgb5=Default GC video mode
|
||||
cfgb6=Default GC game language
|
||||
cfgb7=Channels Type
|
||||
cfgbnr1=Download Cover
|
||||
cfgbnr2=Delete Cover
|
||||
cfgbnr3=Download Custom Banner
|
||||
@ -188,6 +189,9 @@ cfgsm5=Clear Sourceflow Cache
|
||||
cfghb1=Homebrew Settings
|
||||
cfghb2=Coverflow Smallbox
|
||||
cfghb3=Homebrew Partition
|
||||
ChanReal=Real NAND
|
||||
ChanEmu=Emu NAND
|
||||
ChanBoth=Both
|
||||
cheat1=Back
|
||||
cheat2=Apply
|
||||
cheat3=Cheat file for game not found.
|
||||
@ -203,7 +207,7 @@ dl13=Download order
|
||||
dl14=Select regions to check for covers:
|
||||
dl15=Cover download settings
|
||||
dl16=Set
|
||||
dl17=Cover download settings
|
||||
dl17=Cover Download Settings
|
||||
dl18=Back
|
||||
dl19=Original only
|
||||
dl2=Back
|
||||
@ -272,6 +276,9 @@ errgame11=GameCube Loader not found! Can't launch game.
|
||||
errgame12=Nintendont not found! Can't launch GC Disc.
|
||||
errgame13=EmuNAND for gamesave not found! Using real NAND.
|
||||
errgame14=app_booter.bin not found!
|
||||
errgame15=WiiFlow locked! Unlock WiiFlow to use this feature.
|
||||
errgame16=Not available for plugin games!
|
||||
errgame17=Can not delete real NAND Channels!
|
||||
errneek1=Cannot launch neek2o. Verify your neek2o setup
|
||||
errsource1=Homebrew locked!
|
||||
errsource2=Homebrew and multisource not allowed!
|
||||
@ -387,10 +394,11 @@ vmpnone=None
|
||||
vmpnormal=Normal
|
||||
wad1=Install WAD
|
||||
wad2=Go
|
||||
wad3=Selected %s, after the installation you return to the explorer.
|
||||
wad3=
|
||||
wad4=Installing WAD, please wait...
|
||||
wad5=Installation error %i!
|
||||
wad6=Installation finished with %i hash fails.
|
||||
wad7=Ready to install %s\nChoose emuNAND and then click Go.
|
||||
wbfsadddlg=Please insert the disc you want to copy, then click on Go.
|
||||
wbfscpydlg=If you are sure you want to copy this game to SD, click on Go.
|
||||
wbfsop1=Install Game
|
||||
@ -423,6 +431,7 @@ wbfsoperr2=Disc_Open failed
|
||||
wbfsoperr3=This is not a Wii disc!
|
||||
wbfsoperr4=Game already installed
|
||||
wbfsoperr5=Deleting this Channel is not allowed!
|
||||
wbfsoperr6=Install Wii game is broken, please use cleanrip.
|
||||
wbfsprogress=%i%%
|
||||
wbfsremdlg=To permanently remove the game : %s, click on Go.
|
||||
wifiplayers= Wifi Players
|
||||
|
Loading…
Reference in New Issue
Block a user