mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-23 19:59:16 +01:00
- Made path to wiitdb.xml configurable. issue #327. Use Path Manager menu page 2.
This commit is contained in:
parent
d3eebff59b
commit
8e601ae97e
BIN
out/boot.dol
BIN
out/boot.dol
Binary file not shown.
Before Width: | Height: | Size: 4.4 MiB After Width: | Height: | Size: 4.4 MiB |
@ -272,6 +272,7 @@ bool CMenu::init(bool usb_mounted)
|
|||||||
m_helpDir = m_cfg.getString("GENERAL", "dir_help", fmt("%s/help", m_dataDir.c_str()));
|
m_helpDir = m_cfg.getString("GENERAL", "dir_help", fmt("%s/help", m_dataDir.c_str()));
|
||||||
m_screenshotDir = m_cfg.getString("GENERAL", "dir_screenshot", fmt("%s/screenshots", m_dataDir.c_str()));
|
m_screenshotDir = m_cfg.getString("GENERAL", "dir_screenshot", fmt("%s/screenshots", m_dataDir.c_str()));
|
||||||
|
|
||||||
|
m_wiiTDBDir = m_cfg.getString("GENERAL", "dir_wiitdb", fmt("%s",m_settingsDir.c_str()));
|
||||||
m_boxPicDir = m_cfg.getString("GENERAL", "dir_box_covers", fmt("%s/boxcovers", m_dataDir.c_str()));
|
m_boxPicDir = m_cfg.getString("GENERAL", "dir_box_covers", fmt("%s/boxcovers", m_dataDir.c_str()));
|
||||||
m_picDir = m_cfg.getString("GENERAL", "dir_flat_covers", fmt("%s/covers", m_dataDir.c_str()));
|
m_picDir = m_cfg.getString("GENERAL", "dir_flat_covers", fmt("%s/covers", m_dataDir.c_str()));
|
||||||
m_themeDir = m_cfg.getString("GENERAL", "dir_themes_lite", fmt("%s/themes_lite", m_dataDir.c_str()));
|
m_themeDir = m_cfg.getString("GENERAL", "dir_themes_lite", fmt("%s/themes_lite", m_dataDir.c_str()));
|
||||||
|
@ -147,6 +147,7 @@ private:
|
|||||||
string m_helpDir;
|
string m_helpDir;
|
||||||
string m_screenshotDir;
|
string m_screenshotDir;
|
||||||
|
|
||||||
|
string m_wiiTDBDir;
|
||||||
string m_boxPicDir;
|
string m_boxPicDir;
|
||||||
string m_picDir;
|
string m_picDir;
|
||||||
string m_themeDir;
|
string m_themeDir;
|
||||||
|
@ -1602,7 +1602,7 @@ int CMenu::_gametdbDownloaderAsync()
|
|||||||
{
|
{
|
||||||
update_pThread(1); // It's downloaded
|
update_pThread(1); // It's downloaded
|
||||||
bool res = false;
|
bool res = false;
|
||||||
char *zippath = fmt_malloc("%s/wiitdb.zip", m_settingsDir.c_str());
|
char *zippath = fmt_malloc("%s/wiitdb.zip", m_wiiTDBDir.c_str());
|
||||||
if(zippath != NULL)
|
if(zippath != NULL)
|
||||||
{
|
{
|
||||||
gprintf("Writing file to '%s'\n", zippath);
|
gprintf("Writing file to '%s'\n", zippath);
|
||||||
@ -1629,7 +1629,7 @@ int CMenu::_gametdbDownloaderAsync()
|
|||||||
m_thrdMessage = wfmt(_fmt("dlmsg24", L"Extracting %s"), "wiitdb.zip");
|
m_thrdMessage = wfmt(_fmt("dlmsg24", L"Extracting %s"), "wiitdb.zip");
|
||||||
m_thrdMessageAdded = true;
|
m_thrdMessageAdded = true;
|
||||||
ZipFile zFile(zippath);
|
ZipFile zFile(zippath);
|
||||||
bool zres = zFile.ExtractAll(m_settingsDir.c_str());
|
bool zres = zFile.ExtractAll(m_wiiTDBDir.c_str());
|
||||||
gprintf(zres ? "success\n" : "failed\n");
|
gprintf(zres ? "success\n" : "failed\n");
|
||||||
// May add if zres failed return -4 extraction failed
|
// May add if zres failed return -4 extraction failed
|
||||||
|
|
||||||
@ -1638,7 +1638,7 @@ int CMenu::_gametdbDownloaderAsync()
|
|||||||
MEM2_free(zippath);
|
MEM2_free(zippath);
|
||||||
|
|
||||||
// We should always remove the offsets file to make sure it's reloaded
|
// We should always remove the offsets file to make sure it's reloaded
|
||||||
fsop_deleteFile(fmt("%s/gametdb_offsets.bin", m_settingsDir.c_str()));
|
fsop_deleteFile(fmt("%s/gametdb_offsets.bin", m_wiiTDBDir.c_str()));
|
||||||
|
|
||||||
update_pThread(1); // It's extracted
|
update_pThread(1); // It's extracted
|
||||||
|
|
||||||
|
@ -54,10 +54,11 @@ void CMenu::_showPaths(void)
|
|||||||
m_btnMgr.show(m_configBtn2);
|
m_btnMgr.show(m_configBtn2);
|
||||||
m_btnMgr.show(m_configLbl3);
|
m_btnMgr.show(m_configLbl3);
|
||||||
m_btnMgr.show(m_configBtn3);
|
m_btnMgr.show(m_configBtn3);
|
||||||
|
m_btnMgr.show(m_configLbl4);
|
||||||
|
m_btnMgr.show(m_configBtn4);
|
||||||
|
|
||||||
if(paths_curPage == 1)
|
if(paths_curPage == 1)
|
||||||
{
|
{
|
||||||
m_btnMgr.show(m_configLbl4);
|
|
||||||
m_btnMgr.show(m_configBtn4);
|
|
||||||
m_btnMgr.setText(m_configLbl1, _t("cfgp8", L"Box Covers"));
|
m_btnMgr.setText(m_configLbl1, _t("cfgp8", L"Box Covers"));
|
||||||
m_btnMgr.setText(m_configLbl2, _t("cfgp2", L"Flat Covers"));
|
m_btnMgr.setText(m_configLbl2, _t("cfgp2", L"Flat Covers"));
|
||||||
m_btnMgr.setText(m_configLbl3, _t("cfgp9", L"Custom Banners"));
|
m_btnMgr.setText(m_configLbl3, _t("cfgp9", L"Custom Banners"));
|
||||||
@ -68,6 +69,7 @@ void CMenu::_showPaths(void)
|
|||||||
m_btnMgr.setText(m_configLbl1, _t("cfgp5", L"Wii Games"));
|
m_btnMgr.setText(m_configLbl1, _t("cfgp5", L"Wii Games"));
|
||||||
m_btnMgr.setText(m_configLbl2, _t("cfgp6", L"GameCube Games"));
|
m_btnMgr.setText(m_configLbl2, _t("cfgp6", L"GameCube Games"));
|
||||||
m_btnMgr.setText(m_configLbl3, _t("cfgp7", L"Music"));
|
m_btnMgr.setText(m_configLbl3, _t("cfgp7", L"Music"));
|
||||||
|
m_btnMgr.setText(m_configLbl4, _t("cfgp10", L"WiiTDB Zip"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -203,7 +205,7 @@ void CMenu::_Paths(void)
|
|||||||
}
|
}
|
||||||
_showPaths();
|
_showPaths();
|
||||||
}
|
}
|
||||||
if (m_btnMgr.selected(m_configBtn3))
|
else if (m_btnMgr.selected(m_configBtn3))
|
||||||
{
|
{
|
||||||
_hidePaths();
|
_hidePaths();
|
||||||
path = _FolderExplorer(m_cfg.getString("GENERAL", "dir_music").c_str());
|
path = _FolderExplorer(m_cfg.getString("GENERAL", "dir_music").c_str());
|
||||||
@ -216,6 +218,17 @@ void CMenu::_Paths(void)
|
|||||||
}
|
}
|
||||||
_showPaths();
|
_showPaths();
|
||||||
}
|
}
|
||||||
|
else if (m_btnMgr.selected(m_configBtn4))
|
||||||
|
{
|
||||||
|
_hidePaths();
|
||||||
|
path = _FolderExplorer(m_cfg.getString("GENERAL", "dir_wiitdb").c_str());
|
||||||
|
if(strlen(path) > 0)
|
||||||
|
{
|
||||||
|
m_cfg.setString("GENERAL", "dir_wiitdb", path);
|
||||||
|
m_wiiTDBDir = path;
|
||||||
|
}
|
||||||
|
_showPaths();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_hidePaths();
|
_hidePaths();
|
||||||
|
@ -224,6 +224,7 @@ cfgp6=GC Games
|
|||||||
cfgp7=Music
|
cfgp7=Music
|
||||||
cfgp8=Box Covers
|
cfgp8=Box Covers
|
||||||
cfgp9=Custom Banners
|
cfgp9=Custom Banners
|
||||||
|
cfgp10=WiiTDB Zip
|
||||||
cfgpl1=Select Plugins
|
cfgpl1=Select Plugins
|
||||||
cfgpl2=Set All
|
cfgpl2=Set All
|
||||||
cfgpl3=Clear All
|
cfgpl3=Clear All
|
||||||
|
Loading…
Reference in New Issue
Block a user