mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2025-01-23 17:21:11 +01:00
- path manager and nand paths now start at the current path
This commit is contained in:
parent
373a1d87f8
commit
c4f82bfdc3
@ -1027,7 +1027,7 @@ private:
|
|||||||
void _gameSettings(void);
|
void _gameSettings(void);
|
||||||
void _CoverBanner(void);
|
void _CoverBanner(void);
|
||||||
void _Explorer(void);
|
void _Explorer(void);
|
||||||
const char *_FolderExplorer(void);
|
const char *_FolderExplorer(const char *startPath);
|
||||||
void _Wad(const char *wad_path = NULL);
|
void _Wad(const char *wad_path = NULL);
|
||||||
void _CheatSettings();
|
void _CheatSettings();
|
||||||
bool _Source();
|
bool _Source();
|
||||||
|
@ -428,10 +428,13 @@ void CMenu::_refreshExplorer(s8 direction)
|
|||||||
m_btnMgr.show(m_explorerBtnPageP);
|
m_btnMgr.show(m_explorerBtnPageP);
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *CMenu::_FolderExplorer(void)
|
const char *CMenu::_FolderExplorer(const char *startPath)
|
||||||
{
|
{
|
||||||
folderExplorer = true;
|
folderExplorer = true;
|
||||||
//path = "";
|
memset(dir, 0, MAX_FAT_PATH);
|
||||||
|
strcpy(dir, startPath);
|
||||||
|
if(dir[strlen(dir) - 1] != '/')
|
||||||
|
strcat(dir, "/");
|
||||||
_Explorer();
|
_Explorer();
|
||||||
folderExplorer = false;
|
folderExplorer = false;
|
||||||
return folderPath;
|
return folderPath;
|
||||||
|
@ -380,7 +380,12 @@ int CMenu::_NandEmuCfg(void)
|
|||||||
else if(BTN_A_PRESSED && (m_btnMgr.selected(m_nandemuBtnNandFolder)))
|
else if(BTN_A_PRESSED && (m_btnMgr.selected(m_nandemuBtnNandFolder)))
|
||||||
{
|
{
|
||||||
_hideNandEmu(true);
|
_hideNandEmu(true);
|
||||||
const char *path = _FolderExplorer();
|
u8 tmpView = m_current_view;
|
||||||
|
m_current_view = COVERFLOW_CHANNEL;
|
||||||
|
string emuPath;
|
||||||
|
_FindEmuPart(emuPath, true);
|
||||||
|
const char *path = _FolderExplorer(NandHandle.GetPath());
|
||||||
|
m_current_view = tmpView;
|
||||||
if(strlen(path) > 0)
|
if(strlen(path) > 0)
|
||||||
{
|
{
|
||||||
if(strncmp(path, "sd:/", 4) == 0)
|
if(strncmp(path, "sd:/", 4) == 0)
|
||||||
@ -403,7 +408,12 @@ int CMenu::_NandEmuCfg(void)
|
|||||||
else if(BTN_A_PRESSED && (m_btnMgr.selected(m_nandemuBtnNandSavesFolder)))
|
else if(BTN_A_PRESSED && (m_btnMgr.selected(m_nandemuBtnNandSavesFolder)))
|
||||||
{
|
{
|
||||||
_hideNandEmu(true);
|
_hideNandEmu(true);
|
||||||
const char *path = _FolderExplorer();
|
u8 tmpView = m_current_view;
|
||||||
|
m_current_view = COVERFLOW_USB;
|
||||||
|
string emuPath;
|
||||||
|
_FindEmuPart(emuPath, true);
|
||||||
|
const char *path = _FolderExplorer(NandHandle.GetPath());
|
||||||
|
m_current_view = tmpView;
|
||||||
if(strlen(path) > 0)
|
if(strlen(path) > 0)
|
||||||
{
|
{
|
||||||
if(strncmp(path, "sd:/", 4) == 0)
|
if(strncmp(path, "sd:/", 4) == 0)
|
||||||
|
@ -125,7 +125,7 @@ void CMenu::_Paths(void)
|
|||||||
if (m_btnMgr.selected(m_pathsBtn1))
|
if (m_btnMgr.selected(m_pathsBtn1))
|
||||||
{
|
{
|
||||||
_hidePaths();
|
_hidePaths();
|
||||||
path = _FolderExplorer();
|
path = _FolderExplorer(m_cfg.getString("GENERAL", "dir_box_covers").c_str());
|
||||||
if(strlen(path) > 0)
|
if(strlen(path) > 0)
|
||||||
{
|
{
|
||||||
m_cfg.setString("GENERAL", "dir_box_covers", path);
|
m_cfg.setString("GENERAL", "dir_box_covers", path);
|
||||||
@ -137,7 +137,7 @@ void CMenu::_Paths(void)
|
|||||||
else if (m_btnMgr.selected(m_pathsBtn2))
|
else if (m_btnMgr.selected(m_pathsBtn2))
|
||||||
{
|
{
|
||||||
_hidePaths();
|
_hidePaths();
|
||||||
path = _FolderExplorer();
|
path = _FolderExplorer(m_cfg.getString("GENERAL", "dir_flat_covers").c_str());
|
||||||
if(strlen(path) > 0)
|
if(strlen(path) > 0)
|
||||||
{
|
{
|
||||||
m_cfg.setString("GENERAL", "dir_flat_covers", path);
|
m_cfg.setString("GENERAL", "dir_flat_covers", path);
|
||||||
@ -149,7 +149,7 @@ void CMenu::_Paths(void)
|
|||||||
else if (m_btnMgr.selected(m_pathsBtn3))
|
else if (m_btnMgr.selected(m_pathsBtn3))
|
||||||
{
|
{
|
||||||
_hidePaths();
|
_hidePaths();
|
||||||
path = _FolderExplorer();
|
path = _FolderExplorer(m_cfg.getString("GENERAL", "dir_custom_banners").c_str());
|
||||||
if(strlen(path) > 0)
|
if(strlen(path) > 0)
|
||||||
{
|
{
|
||||||
m_cfg.setString("GENERAL", "dir_custom_banners", path);
|
m_cfg.setString("GENERAL", "dir_custom_banners", path);
|
||||||
@ -160,7 +160,7 @@ void CMenu::_Paths(void)
|
|||||||
else if (m_btnMgr.selected(m_pathsBtn4))
|
else if (m_btnMgr.selected(m_pathsBtn4))
|
||||||
{
|
{
|
||||||
_hidePaths();
|
_hidePaths();
|
||||||
path = _FolderExplorer();
|
path = _FolderExplorer(m_cfg.getString("GENERAL", "dir_banner_cache").c_str());
|
||||||
if(strlen(path) > 0)
|
if(strlen(path) > 0)
|
||||||
{
|
{
|
||||||
m_cfg.setString("GENERAL", "dir_banner_cache", path);
|
m_cfg.setString("GENERAL", "dir_banner_cache", path);
|
||||||
@ -174,7 +174,9 @@ void CMenu::_Paths(void)
|
|||||||
if (m_btnMgr.selected(m_pathsBtn1))
|
if (m_btnMgr.selected(m_pathsBtn1))
|
||||||
{
|
{
|
||||||
_hidePaths();
|
_hidePaths();
|
||||||
path = _FolderExplorer();
|
currentPartition = m_cfg.getInt(WII_DOMAIN, "partition", USB1);
|
||||||
|
string gameDir(fmt(wii_games_dir, DeviceName[currentPartition]));
|
||||||
|
path = _FolderExplorer(gameDir.c_str());
|
||||||
if(strlen(path) > 0)
|
if(strlen(path) > 0)
|
||||||
{
|
{
|
||||||
if(strncmp(path, "sd:/", 4) == 0)
|
if(strncmp(path, "sd:/", 4) == 0)
|
||||||
@ -199,7 +201,9 @@ void CMenu::_Paths(void)
|
|||||||
else if (m_btnMgr.selected(m_pathsBtn2))
|
else if (m_btnMgr.selected(m_pathsBtn2))
|
||||||
{
|
{
|
||||||
_hidePaths();
|
_hidePaths();
|
||||||
path = _FolderExplorer();
|
currentPartition = m_cfg.getInt(GC_DOMAIN, "partition", USB1);
|
||||||
|
string gameDir(fmt(currentPartition == SD ? DML_DIR : m_DMLgameDir.c_str(), DeviceName[currentPartition]));
|
||||||
|
path = _FolderExplorer(gameDir.c_str());
|
||||||
if(strlen(path) > 0)
|
if(strlen(path) > 0)
|
||||||
{
|
{
|
||||||
if(strncmp(path, "sd:/", 4) == 0)
|
if(strncmp(path, "sd:/", 4) == 0)
|
||||||
@ -222,7 +226,7 @@ void CMenu::_Paths(void)
|
|||||||
else if (m_btnMgr.selected(m_pathsBtn3))
|
else if (m_btnMgr.selected(m_pathsBtn3))
|
||||||
{
|
{
|
||||||
_hidePaths();
|
_hidePaths();
|
||||||
path = _FolderExplorer();
|
path = _FolderExplorer(m_cfg.getString("GENERAL", "dir_music").c_str());
|
||||||
if(strlen(path) > 0)
|
if(strlen(path) > 0)
|
||||||
{
|
{
|
||||||
m_cfg.setString("GENERAL", "dir_music", path);
|
m_cfg.setString("GENERAL", "dir_music", path);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user