mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-01 00:55:06 +01:00
- added plugin game setting to reload its cached cover in case you change the png for it.
- fixed the Select Plugin ALL button to work with the new theme changes. - other minor changes.
This commit is contained in:
parent
25a67d6539
commit
cc9aa985ed
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 |
@ -168,7 +168,6 @@ private:
|
|||||||
char emu_nands_dir[32];
|
char emu_nands_dir[32];
|
||||||
string m_saveExtGameId;
|
string m_saveExtGameId;
|
||||||
bool m_forceext;
|
bool m_forceext;
|
||||||
bool m_emuSaveNand;
|
|
||||||
|
|
||||||
// GC sound stuff
|
// GC sound stuff
|
||||||
bool m_gc_play_banner_sound;
|
bool m_gc_play_banner_sound;
|
||||||
@ -972,9 +971,10 @@ private:
|
|||||||
|
|
||||||
// misc functions
|
// misc functions
|
||||||
void RemoveCover(const char *id);
|
void RemoveCover(const char *id);
|
||||||
void _setPartition(s8 direction = 0);
|
void _setPartition(s8 direction = 0, u8 partition = 0, u8 coverflow = 0);
|
||||||
int _sfCacheCoversNeeded();
|
int _sfCacheCoversNeeded();
|
||||||
int _cacheCovers(void);
|
int _cacheCovers(void);
|
||||||
|
int _cacheCover(const dir_discHdr *hdr, bool smallBox);
|
||||||
void _mainLoopCommon(bool withCF = false, bool adjusting = false);
|
void _mainLoopCommon(bool withCF = false, bool adjusting = false);
|
||||||
void _loadDefaultFont(void);
|
void _loadDefaultFont(void);
|
||||||
void _cleanupDefaultFont();
|
void _cleanupDefaultFont();
|
||||||
|
@ -209,6 +209,11 @@ void CMenu::_showConfigGame()
|
|||||||
m_btnMgr.setText(m_configBtn1, m_gcfg1.getBool("ADULTONLY", id, false) ? _t("yes", L"Yes") : _t("no", L"No"));
|
m_btnMgr.setText(m_configBtn1, m_gcfg1.getBool("ADULTONLY", id, false) ? _t("yes", L"Yes") : _t("no", L"No"));
|
||||||
m_btnMgr.show(m_configLbl1);
|
m_btnMgr.show(m_configLbl1);
|
||||||
m_btnMgr.show(m_configBtn1);
|
m_btnMgr.show(m_configBtn1);
|
||||||
|
|
||||||
|
m_btnMgr.setText(m_configLbl2, _t("cfgg62", L"Reload cached cover"));
|
||||||
|
m_btnMgr.setText(m_configBtn2, _t("Yes", L"Yes"));
|
||||||
|
m_btnMgr.show(m_configLbl2);
|
||||||
|
m_btnMgr.show(m_configBtn2);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -504,6 +509,50 @@ void CMenu::_configGame(const dir_discHdr *hdr, bool disc)
|
|||||||
m_btnMgr.setText(m_configBtn1, m_gcfg1.getBool("ADULTONLY", id, false) ? _t("yes", L"Yes") : _t("no", L"No"));
|
m_btnMgr.setText(m_configBtn1, m_gcfg1.getBool("ADULTONLY", id, false) ? _t("yes", L"Yes") : _t("no", L"No"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if(m_btnMgr.selected(m_configBtn2))
|
||||||
|
{
|
||||||
|
_hideConfigGame(true);
|
||||||
|
m_btnMgr.setText(m_downloadLblDialog, L"");
|
||||||
|
m_btnMgr.show(m_downloadLblDialog);
|
||||||
|
_start_pThread();
|
||||||
|
CoverFlow.stopCoverLoader(true);
|
||||||
|
|
||||||
|
bool smallBox = false;
|
||||||
|
if(m_current_view == COVERFLOW_HOMEBREW && !m_sourceflow)
|
||||||
|
smallBox = m_cfg.getBool(HOMEBREW_DOMAIN, "smallbox", false);
|
||||||
|
//else if(m_sourceflow)
|
||||||
|
// smallBox = m_cfg.getBool(SOURCEFLOW_DOMAIN, "smallbox", false);
|
||||||
|
else if(m_current_view == COVERFLOW_PLUGIN && !m_sourceflow)
|
||||||
|
{
|
||||||
|
if(enabledPluginsCount == 1 && m_plugin.GetEnabledStatus(m_plugin.GetPluginPosition(strtoul("48425257", NULL, 16))))
|
||||||
|
smallBox = m_cfg.getBool(HOMEBREW_DOMAIN, "smallbox", false);
|
||||||
|
}
|
||||||
|
|
||||||
|
//delete cached wfc
|
||||||
|
const char *gameNameOrID = CoverFlow.getFilenameId(GameHdr);
|
||||||
|
if(GameHdr->type == TYPE_PLUGIN)
|
||||||
|
fsop_deleteFile(fmt("%s/%s/%s.wfc", m_cacheDir.c_str(), m_plugin.GetCoverFolderName(GameHdr->settings[0]), gameNameOrID));
|
||||||
|
else
|
||||||
|
fsop_deleteFile(fmt("%s/homebrew/%s.wfc", m_cacheDir.c_str(), gameNameOrID));
|
||||||
|
|
||||||
|
//cache new cover
|
||||||
|
m_thrdMessage = wfmt(_t("cfgg63", L"Converting cover please wait..."));
|
||||||
|
m_thrdMessageAdded = true;
|
||||||
|
_cacheCover(GameHdr, smallBox);
|
||||||
|
|
||||||
|
_stop_pThread();
|
||||||
|
m_btnMgr.setText(m_downloadLblDialog, _t("dlmsg14", L"Done."));
|
||||||
|
u8 pause = 150;
|
||||||
|
do
|
||||||
|
{
|
||||||
|
_mainLoopCommon();
|
||||||
|
pause--;
|
||||||
|
if(pause == 0)
|
||||||
|
m_btnMgr.hide(m_downloadLblDialog);
|
||||||
|
}while(!m_exit && pause > 0);
|
||||||
|
CoverFlow.startCoverLoader();
|
||||||
|
_showConfigGame();
|
||||||
|
}
|
||||||
else if(m_btnMgr.selected(m_configBtn2M) || m_btnMgr.selected(m_configBtn2P))
|
else if(m_btnMgr.selected(m_configBtn2M) || m_btnMgr.selected(m_configBtn2P))
|
||||||
{
|
{
|
||||||
if(_installed_cios.size() > 0)
|
if(_installed_cios.size() > 0)
|
||||||
|
@ -93,12 +93,16 @@ void CMenu::_ConfigHB(void)
|
|||||||
}
|
}
|
||||||
else if (m_btnMgr.selected(m_configBtn4P) || m_btnMgr.selected(m_configBtn4M))
|
else if (m_btnMgr.selected(m_configBtn4P) || m_btnMgr.selected(m_configBtn4M))
|
||||||
{
|
{
|
||||||
m_refreshGameList = true;
|
|
||||||
m_cfg.setBool(HOMEBREW_DOMAIN, "update_cache", true);
|
|
||||||
s8 direction = m_btnMgr.selected(m_configBtn4P) ? 1 : -1;
|
s8 direction = m_btnMgr.selected(m_configBtn4P) ? 1 : -1;
|
||||||
_setPartition(direction);
|
_setPartition(direction, m_cfg.getInt(HOMEBREW_DOMAIN, "partition"), COVERFLOW_HOMEBREW);
|
||||||
const char *partitionname = DeviceName[currentPartition];
|
const char *partitionname = DeviceName[currentPartition];
|
||||||
m_btnMgr.setText(m_configLbl4Val, upperCase(partitionname));
|
m_btnMgr.setText(m_configLbl4Val, upperCase(partitionname));
|
||||||
|
if(m_current_view & COVERFLOW_HOMEBREW ||
|
||||||
|
(m_current_view & COVERFLOW_PLUGIN && m_plugin.GetEnabledStatus(m_plugin.GetPluginPosition(strtoul("48425257", NULL, 16)))))
|
||||||
|
{
|
||||||
|
m_refreshGameList = true;
|
||||||
|
//m_cfg.setBool(HOMEBREW_DOMAIN, "update_cache", true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -530,10 +530,6 @@ int CMenu::_cacheCovers()
|
|||||||
{
|
{
|
||||||
CoverFlow.stopCoverLoader(true);
|
CoverFlow.stopCoverLoader(true);
|
||||||
|
|
||||||
char coverPath[MAX_FAT_PATH];//1024
|
|
||||||
char wfcPath[MAX_FAT_PATH+20];
|
|
||||||
char cachePath[MAX_FAT_PATH];
|
|
||||||
|
|
||||||
u32 total = m_gameList.size();
|
u32 total = m_gameList.size();
|
||||||
m_thrdTotal = total;
|
m_thrdTotal = total;
|
||||||
u32 index = 0;
|
u32 index = 0;
|
||||||
@ -556,73 +552,7 @@ int CMenu::_cacheCovers()
|
|||||||
m_thrdMessage = wfmt(_fmt("dlmsg31", L"Converting cover %i of %i"), index, total);
|
m_thrdMessage = wfmt(_fmt("dlmsg31", L"Converting cover %i of %i"), index, total);
|
||||||
m_thrdMessageAdded = true;
|
m_thrdMessageAdded = true;
|
||||||
|
|
||||||
/* get cover png path */
|
_cacheCover(&(*hdr), smallBox);
|
||||||
bool blankCover = false;
|
|
||||||
bool fullCover = true;
|
|
||||||
if(smallBox)// homebrew or sourceflow
|
|
||||||
{
|
|
||||||
fullCover = false;
|
|
||||||
strlcpy(coverPath, getFrontPath(&(*hdr)), sizeof(coverPath));
|
|
||||||
if(!fsop_FileExist(coverPath))
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
strlcpy(coverPath, getBoxPath(&(*hdr)), sizeof(coverPath));
|
|
||||||
//gprintf("boxpath=%s\n", coverPath);
|
|
||||||
if(!fsop_FileExist(coverPath))
|
|
||||||
{
|
|
||||||
fullCover = false;
|
|
||||||
strlcpy(coverPath, getFrontPath(&(*hdr)), sizeof(coverPath));
|
|
||||||
//gprintf("frontpath=%s\n", coverPath);
|
|
||||||
if(!fsop_FileExist(coverPath))
|
|
||||||
{
|
|
||||||
fullCover = true;
|
|
||||||
strlcpy(coverPath, getBlankCoverPath(&(*hdr)), sizeof(coverPath));
|
|
||||||
//gprintf("blankpath=%s\n", coverPath);
|
|
||||||
blankCover = true;
|
|
||||||
if(!fsop_FileExist(coverPath))
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* get cache folder path */
|
|
||||||
if(hdr->type == TYPE_PLUGIN)
|
|
||||||
snprintf(cachePath, sizeof(cachePath), "%s/%s", m_cacheDir.c_str(), m_plugin.GetCoverFolderName(hdr->settings[0]));
|
|
||||||
else if(m_sourceflow)
|
|
||||||
snprintf(cachePath, sizeof(cachePath), "%s/sourceflow", m_cacheDir.c_str());
|
|
||||||
else if(hdr->type == TYPE_HOMEBREW)
|
|
||||||
snprintf(cachePath, sizeof(cachePath), "%s/homebrew", m_cacheDir.c_str());
|
|
||||||
else
|
|
||||||
snprintf(cachePath, sizeof(cachePath), "%s", m_cacheDir.c_str());
|
|
||||||
//gprintf("cachepath=%s\n", cachePath);
|
|
||||||
|
|
||||||
/* get game name or ID */
|
|
||||||
const char *gameNameOrID = NULL;
|
|
||||||
if(!blankCover)
|
|
||||||
gameNameOrID = CoverFlow.getFilenameId(&(*hdr));// &(*hdr) converts iterator to pointer to mem address
|
|
||||||
else
|
|
||||||
gameNameOrID = strrchr(coverPath, '/') + 1;
|
|
||||||
//gprintf("nameorid=%s\n", gameNameOrID);
|
|
||||||
|
|
||||||
/* get cover wfc path */
|
|
||||||
if(smallBox)
|
|
||||||
snprintf(wfcPath, sizeof(wfcPath), "%s/%s_small.wfc", cachePath, gameNameOrID);
|
|
||||||
else
|
|
||||||
snprintf(wfcPath, sizeof(wfcPath), "%s/%s.wfc", cachePath, gameNameOrID);
|
|
||||||
//gprintf("wfcpath=%s\n", wfcPath);
|
|
||||||
|
|
||||||
/* if wfc doesn't exist or is flat and have full cover */
|
|
||||||
if(!fsop_FileExist(wfcPath) || (!CoverFlow.fullCoverCached(wfcPath) && fullCover))
|
|
||||||
{
|
|
||||||
// create cache subfolders if needed
|
|
||||||
if(!fsop_FolderExist(cachePath))
|
|
||||||
fsop_MakeFolder(cachePath);
|
|
||||||
|
|
||||||
// create cover texture
|
|
||||||
CoverFlow.cacheCoverFile(wfcPath, coverPath, fullCover);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* cache wii and channel banners */
|
/* cache wii and channel banners */
|
||||||
if(hdr->type == TYPE_WII_GAME || hdr->type == TYPE_CHANNEL || hdr->type == TYPE_EMUCHANNEL)
|
if(hdr->type == TYPE_WII_GAME || hdr->type == TYPE_CHANNEL || hdr->type == TYPE_EMUCHANNEL)
|
||||||
@ -648,4 +578,80 @@ int CMenu::_cacheCovers()
|
|||||||
CurrentBanner.ClearBanner();
|
CurrentBanner.ClearBanner();
|
||||||
CoverFlow.startCoverLoader();
|
CoverFlow.startCoverLoader();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int CMenu::_cacheCover(const dir_discHdr *hdr, bool smallBox)// fix hdr
|
||||||
|
{
|
||||||
|
char coverPath[MAX_FAT_PATH];//1024
|
||||||
|
char wfcPath[MAX_FAT_PATH+20];
|
||||||
|
char cachePath[MAX_FAT_PATH];
|
||||||
|
|
||||||
|
/* get cover png path */
|
||||||
|
bool blankCover = false;
|
||||||
|
bool fullCover = true;
|
||||||
|
if(smallBox)// homebrew or sourceflow
|
||||||
|
{
|
||||||
|
fullCover = false;
|
||||||
|
strlcpy(coverPath, getFrontPath(hdr), sizeof(coverPath));
|
||||||
|
if(!fsop_FileExist(coverPath))
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
strlcpy(coverPath, getBoxPath(hdr), sizeof(coverPath));
|
||||||
|
//gprintf("boxpath=%s\n", coverPath);
|
||||||
|
if(!fsop_FileExist(coverPath))
|
||||||
|
{
|
||||||
|
fullCover = false;
|
||||||
|
strlcpy(coverPath, getFrontPath(hdr), sizeof(coverPath));
|
||||||
|
//gprintf("frontpath=%s\n", coverPath);
|
||||||
|
if(!fsop_FileExist(coverPath))
|
||||||
|
{
|
||||||
|
fullCover = true;
|
||||||
|
strlcpy(coverPath, getBlankCoverPath(hdr), sizeof(coverPath));
|
||||||
|
//gprintf("blankpath=%s\n", coverPath);
|
||||||
|
blankCover = true;
|
||||||
|
if(!fsop_FileExist(coverPath))
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* get cache folder path */
|
||||||
|
if(hdr->type == TYPE_PLUGIN)
|
||||||
|
snprintf(cachePath, sizeof(cachePath), "%s/%s", m_cacheDir.c_str(), m_plugin.GetCoverFolderName(hdr->settings[0]));
|
||||||
|
else if(m_sourceflow)
|
||||||
|
snprintf(cachePath, sizeof(cachePath), "%s/sourceflow", m_cacheDir.c_str());
|
||||||
|
else if(hdr->type == TYPE_HOMEBREW)
|
||||||
|
snprintf(cachePath, sizeof(cachePath), "%s/homebrew", m_cacheDir.c_str());
|
||||||
|
else
|
||||||
|
snprintf(cachePath, sizeof(cachePath), "%s", m_cacheDir.c_str());
|
||||||
|
gprintf("cachepath=%s\n", cachePath);
|
||||||
|
|
||||||
|
/* get game name or ID */
|
||||||
|
const char *gameNameOrID = NULL;
|
||||||
|
if(!blankCover)
|
||||||
|
gameNameOrID = CoverFlow.getFilenameId(hdr);
|
||||||
|
else
|
||||||
|
gameNameOrID = strrchr(coverPath, '/') + 1;
|
||||||
|
gprintf("nameorid=%s\n", gameNameOrID);
|
||||||
|
|
||||||
|
/* get cover wfc path */
|
||||||
|
if(smallBox)
|
||||||
|
snprintf(wfcPath, sizeof(wfcPath), "%s/%s_small.wfc", cachePath, gameNameOrID);
|
||||||
|
else
|
||||||
|
snprintf(wfcPath, sizeof(wfcPath), "%s/%s.wfc", cachePath, gameNameOrID);
|
||||||
|
gprintf("wfcpath=%s\n", wfcPath);
|
||||||
|
|
||||||
|
/* if wfc doesn't exist or is flat and have full cover */
|
||||||
|
if(!fsop_FileExist(wfcPath) || (!CoverFlow.fullCoverCached(wfcPath) && fullCover))
|
||||||
|
{
|
||||||
|
// create cache subfolders if needed
|
||||||
|
if(!fsop_FolderExist(cachePath))
|
||||||
|
fsop_MakeFolder(cachePath);
|
||||||
|
|
||||||
|
// create cover texture
|
||||||
|
CoverFlow.cacheCoverFile(wfcPath, coverPath, fullCover);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
@ -366,7 +366,6 @@ int CMenu::main(void)
|
|||||||
bool m_source_on_start = m_cfg.getBool("GENERAL", "source_on_start", false);
|
bool m_source_on_start = m_cfg.getBool("GENERAL", "source_on_start", false);
|
||||||
bool bheld = false;// bheld to indicate btn b was pressed or held
|
bool bheld = false;// bheld to indicate btn b was pressed or held
|
||||||
bool bUsed = false;// bused to indicate that it was actually used for something
|
bool bUsed = false;// bused to indicate that it was actually used for something
|
||||||
m_emuSaveNand = false;
|
|
||||||
m_reload = false;
|
m_reload = false;
|
||||||
CFLocked = m_cfg.getBool("GENERAL", "cf_locked", false);
|
CFLocked = m_cfg.getBool("GENERAL", "cf_locked", false);
|
||||||
Auto_hide_icons = m_cfg.getBool("GENERAL", "auto_hide_icons", true);
|
Auto_hide_icons = m_cfg.getBool("GENERAL", "auto_hide_icons", true);
|
||||||
@ -1216,16 +1215,20 @@ wstringEx CMenu::_getNoticeTranslation(int sorting, wstringEx curLetter)
|
|||||||
return curLetter;
|
return curLetter;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMenu::_setPartition(s8 direction)
|
void CMenu::_setPartition(s8 direction, u8 partition, u8 coverflow)// COVERFLOW_NONE is for emu saves nand
|
||||||
{
|
{
|
||||||
if(m_source_cnt > 1 && !m_emuSaveNand)
|
if(m_source_cnt > 1 && coverflow > 0)// changing partition not allowed when more than one source is selected
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
currentPartition = partition;
|
||||||
|
u8 prev_view = m_current_view;
|
||||||
|
m_current_view = coverflow;
|
||||||
int FS_Type = 0;
|
int FS_Type = 0;
|
||||||
/* change partition if direction is not zero */
|
bool NeedFAT = m_current_view == COVERFLOW_CHANNEL || m_current_view == COVERFLOW_GAMECUBE || m_current_view == COVERFLOW_NONE;
|
||||||
if(direction != 0)
|
u8 limiter = 0;
|
||||||
|
|
||||||
|
if(direction != 0)// change partition if direction is not zero
|
||||||
{
|
{
|
||||||
bool NeedFAT = m_current_view == COVERFLOW_CHANNEL || m_current_view == COVERFLOW_GAMECUBE || m_emuSaveNand == true;
|
|
||||||
u8 limiter = 0;
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
currentPartition = loopNum(currentPartition + direction, 9);
|
currentPartition = loopNum(currentPartition + direction, 9);
|
||||||
@ -1236,12 +1239,16 @@ void CMenu::_setPartition(s8 direction)
|
|||||||
(m_current_view != COVERFLOW_WII && FS_Type == PART_FS_WBFS) ||
|
(m_current_view != COVERFLOW_WII && FS_Type == PART_FS_WBFS) ||
|
||||||
(NeedFAT && FS_Type != PART_FS_FAT)));
|
(NeedFAT && FS_Type != PART_FS_FAT)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set partition to currentPartition */
|
/* set partition to currentPartition */
|
||||||
if(m_emuSaveNand)
|
if(limiter < 9)
|
||||||
m_cfg.setInt(WII_DOMAIN, "savepartition", currentPartition);
|
{
|
||||||
else if(direction == 0 || (direction != 0 && (m_current_view != COVERFLOW_CHANNEL ||
|
if(coverflow == COVERFLOW_NONE)// saves emu nand
|
||||||
(FS_Type != -1 && DeviceHandle.IsInserted(currentPartition)))))
|
m_cfg.setInt(WII_DOMAIN, "savepartition", currentPartition);
|
||||||
m_cfg.setInt(_domainFromView(), "partition", currentPartition);
|
else if(m_current_view != COVERFLOW_CHANNEL || (FS_Type != -1 && DeviceHandle.IsInserted(currentPartition)))
|
||||||
|
m_cfg.setInt(_domainFromView(), "partition", currentPartition);
|
||||||
|
}
|
||||||
|
m_current_view = prev_view;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMenu::exitHandler(int ExitTo)
|
void CMenu::exitHandler(int ExitTo)
|
||||||
|
@ -297,10 +297,7 @@ int CMenu::_NandEmuCfg(void)
|
|||||||
if(m_btnMgr.selected(m_configBtn1P) || m_btnMgr.selected(m_configBtn1M))
|
if(m_btnMgr.selected(m_configBtn1P) || m_btnMgr.selected(m_configBtn1M))
|
||||||
{
|
{
|
||||||
direction = m_btnMgr.selected(m_configBtn1P) ? 1 : -1;
|
direction = m_btnMgr.selected(m_configBtn1P) ? 1 : -1;
|
||||||
currentPartition = m_cfg.getInt(WII_DOMAIN, "savepartition");
|
_setPartition(direction, m_cfg.getInt(WII_DOMAIN, "savepartition"), COVERFLOW_NONE);
|
||||||
m_emuSaveNand = true;
|
|
||||||
_setPartition(direction);
|
|
||||||
m_emuSaveNand = false;
|
|
||||||
_getEmuNands();// refresh emunands in case the partition was changed
|
_getEmuNands();// refresh emunands in case the partition was changed
|
||||||
const char *partitionname = DeviceName[m_cfg.getInt(WII_DOMAIN, "savepartition")];
|
const char *partitionname = DeviceName[m_cfg.getInt(WII_DOMAIN, "savepartition")];
|
||||||
m_btnMgr.setText(m_configLbl1Val, upperCase(partitionname));
|
m_btnMgr.setText(m_configLbl1Val, upperCase(partitionname));
|
||||||
|
@ -64,8 +64,7 @@ void CMenu::_showPartitionsCfg(void)
|
|||||||
|
|
||||||
void CMenu::_partitionsCfg(void)
|
void CMenu::_partitionsCfg(void)
|
||||||
{
|
{
|
||||||
m_prev_view = m_current_view;
|
//int prevPartition = currentPartition;
|
||||||
int prevPartition = currentPartition;
|
|
||||||
SetupInput();
|
SetupInput();
|
||||||
_showPartitionsCfg();
|
_showPartitionsCfg();
|
||||||
while(!m_exit)
|
while(!m_exit)
|
||||||
@ -84,48 +83,56 @@ void CMenu::_partitionsCfg(void)
|
|||||||
else if(m_btnMgr.selected(m_configBtn1P) || m_btnMgr.selected(m_configBtn1M))
|
else if(m_btnMgr.selected(m_configBtn1P) || m_btnMgr.selected(m_configBtn1M))
|
||||||
{
|
{
|
||||||
s8 direction = m_btnMgr.selected(m_configBtn1P) ? 1 : -1;
|
s8 direction = m_btnMgr.selected(m_configBtn1P) ? 1 : -1;
|
||||||
currentPartition = m_cfg.getInt(WII_DOMAIN, "partition");
|
_setPartition(direction, m_cfg.getInt(WII_DOMAIN, "partition"), COVERFLOW_WII);
|
||||||
m_current_view = COVERFLOW_WII;
|
|
||||||
_setPartition(direction);
|
|
||||||
_showPartitionsCfg();
|
_showPartitionsCfg();
|
||||||
if(m_prev_view & COVERFLOW_WII)
|
if(m_current_view & COVERFLOW_WII ||
|
||||||
|
(m_current_view & COVERFLOW_PLUGIN && m_plugin.GetEnabledStatus(m_plugin.GetPluginPosition(strtoul("4E574949", NULL, 16)))))
|
||||||
|
{
|
||||||
m_refreshGameList = true;
|
m_refreshGameList = true;
|
||||||
|
//prevPartition = currentPartition;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if(m_btnMgr.selected(m_configBtn2P) || m_btnMgr.selected(m_configBtn2M))
|
else if(m_btnMgr.selected(m_configBtn2P) || m_btnMgr.selected(m_configBtn2M))
|
||||||
{
|
{
|
||||||
s8 direction = m_btnMgr.selected(m_configBtn2P) ? 1 : -1;
|
s8 direction = m_btnMgr.selected(m_configBtn2P) ? 1 : -1;
|
||||||
currentPartition = m_cfg.getInt(GC_DOMAIN, "partition");
|
_setPartition(direction, m_cfg.getInt(GC_DOMAIN, "partition"), COVERFLOW_GAMECUBE);
|
||||||
m_current_view = COVERFLOW_GAMECUBE;
|
|
||||||
_setPartition(direction);
|
|
||||||
_showPartitionsCfg();
|
_showPartitionsCfg();
|
||||||
if(m_prev_view & COVERFLOW_GAMECUBE)
|
if(m_current_view & COVERFLOW_GAMECUBE ||
|
||||||
|
(m_current_view & COVERFLOW_PLUGIN && m_plugin.GetEnabledStatus(m_plugin.GetPluginPosition(strtoul("4E47434D", NULL, 16)))))
|
||||||
|
{
|
||||||
m_refreshGameList = true;
|
m_refreshGameList = true;
|
||||||
|
//prevPartition = currentPartition;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if(m_btnMgr.selected(m_configBtn3P) || m_btnMgr.selected(m_configBtn3M))
|
else if(m_btnMgr.selected(m_configBtn3P) || m_btnMgr.selected(m_configBtn3M))
|
||||||
{
|
{
|
||||||
s8 direction = m_btnMgr.selected(m_configBtn3P) ? 1 : -1;
|
s8 direction = m_btnMgr.selected(m_configBtn3P) ? 1 : -1;
|
||||||
currentPartition = m_cfg.getInt(CHANNEL_DOMAIN, "partition");
|
_setPartition(direction, m_cfg.getInt(CHANNEL_DOMAIN, "partition"), COVERFLOW_CHANNEL);
|
||||||
m_current_view = COVERFLOW_CHANNEL;
|
|
||||||
_setPartition(direction);
|
|
||||||
_showPartitionsCfg();
|
_showPartitionsCfg();
|
||||||
if(m_prev_view & COVERFLOW_CHANNEL)
|
// partition only for emu nands
|
||||||
|
if(m_current_view & COVERFLOW_CHANNEL ||
|
||||||
|
(m_current_view & COVERFLOW_PLUGIN && m_plugin.GetEnabledStatus(m_plugin.GetPluginPosition(strtoul("454E414E", NULL, 16)))))
|
||||||
|
{
|
||||||
m_refreshGameList = true;
|
m_refreshGameList = true;
|
||||||
|
//prevPartition = currentPartition;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if(m_btnMgr.selected(m_configBtn4P) || m_btnMgr.selected(m_configBtn4M))
|
else if(m_btnMgr.selected(m_configBtn4P) || m_btnMgr.selected(m_configBtn4M))
|
||||||
{
|
{
|
||||||
s8 direction = m_btnMgr.selected(m_configBtn4P) ? 1 : -1;
|
s8 direction = m_btnMgr.selected(m_configBtn4P) ? 1 : -1;
|
||||||
currentPartition = m_cfg.getInt(PLUGIN_DOMAIN, "partition");
|
_setPartition(direction, m_cfg.getInt(PLUGIN_DOMAIN, "partition"), COVERFLOW_PLUGIN);
|
||||||
m_current_view = COVERFLOW_PLUGIN;
|
|
||||||
_setPartition(direction);
|
|
||||||
_showPartitionsCfg();
|
_showPartitionsCfg();
|
||||||
if(m_prev_view & COVERFLOW_PLUGIN)
|
if(m_current_view & COVERFLOW_PLUGIN)
|
||||||
|
{
|
||||||
m_refreshGameList = true;
|
m_refreshGameList = true;
|
||||||
|
//prevPartition = currentPartition;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_current_view = m_prev_view;
|
//m_current_view = m_prev_view;
|
||||||
m_prev_view = 0;
|
//m_prev_view = 0;
|
||||||
currentPartition = prevPartition;
|
//currentPartition = prevPartition;
|
||||||
_hidePartitionsCfg();
|
_hidePartitionsCfg();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@ s16 m_pluginBtnPageM;
|
|||||||
s16 m_pluginBtnPageP;
|
s16 m_pluginBtnPageP;
|
||||||
s16 m_pluginBtnBack;
|
s16 m_pluginBtnBack;
|
||||||
s16 m_pluginLblTitle;
|
s16 m_pluginLblTitle;
|
||||||
|
s16 m_pluginBtnAll;
|
||||||
s16 m_pluginLblUser[4];
|
s16 m_pluginLblUser[4];
|
||||||
TexData m_pluginBg;
|
TexData m_pluginBg;
|
||||||
|
|
||||||
@ -24,11 +25,12 @@ void CMenu::_hidePluginSettings(bool instant)
|
|||||||
m_btnMgr.hide(m_pluginLblPage, instant);
|
m_btnMgr.hide(m_pluginLblPage, instant);
|
||||||
m_btnMgr.hide(m_pluginBtnPageM, instant);
|
m_btnMgr.hide(m_pluginBtnPageM, instant);
|
||||||
m_btnMgr.hide(m_pluginBtnPageP, instant);
|
m_btnMgr.hide(m_pluginBtnPageP, instant);
|
||||||
|
m_btnMgr.hide(m_pluginBtnAll, instant);
|
||||||
for(u8 i = 0; i < ARRAY_SIZE(m_pluginLblUser); ++i)
|
for(u8 i = 0; i < ARRAY_SIZE(m_pluginLblUser); ++i)
|
||||||
if(m_pluginLblUser[i] != -1)
|
if(m_pluginLblUser[i] != -1)
|
||||||
m_btnMgr.hide(m_pluginLblUser[i], instant);
|
m_btnMgr.hide(m_pluginLblUser[i], instant);
|
||||||
|
|
||||||
for(u8 i = 0; i < 11; ++i)
|
for(u8 i = 1; i < 11; ++i)
|
||||||
{
|
{
|
||||||
m_btnMgr.hide(m_checkboxLblTxt[i]);
|
m_btnMgr.hide(m_checkboxLblTxt[i]);
|
||||||
m_btnMgr.hide(m_checkboxBtn[i]);
|
m_btnMgr.hide(m_checkboxBtn[i]);
|
||||||
@ -44,6 +46,7 @@ void CMenu::_showPluginSettings(void)
|
|||||||
|
|
||||||
m_btnMgr.show(m_pluginLblTitle);
|
m_btnMgr.show(m_pluginLblTitle);
|
||||||
m_btnMgr.show(m_pluginBtnBack);
|
m_btnMgr.show(m_pluginBtnBack);
|
||||||
|
m_btnMgr.show(m_pluginBtnAll);
|
||||||
_updatePluginCheckboxes();
|
_updatePluginCheckboxes();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -63,19 +66,17 @@ void CMenu::_updatePluginCheckboxes(void)
|
|||||||
m_btnMgr.show(m_pluginBtnPageM);
|
m_btnMgr.show(m_pluginBtnPageM);
|
||||||
m_btnMgr.show(m_pluginBtnPageP);
|
m_btnMgr.show(m_pluginBtnPageP);
|
||||||
}
|
}
|
||||||
for(int i = 0; i < 11; ++i)
|
for(int i = 1; i < 11; ++i)
|
||||||
{
|
{
|
||||||
m_btnMgr.hide(m_checkboxBtn[i]);// instant?
|
m_btnMgr.hide(m_checkboxBtn[i]);// instant?
|
||||||
m_btnMgr.hide(m_checkboxLblTxt[i]);
|
m_btnMgr.hide(m_checkboxLblTxt[i]);
|
||||||
}
|
}
|
||||||
const vector<bool> &EnabledPlugins = m_plugin.GetEnabledPlugins(&enabledPluginsCount);
|
const vector<bool> &EnabledPlugins = m_plugin.GetEnabledPlugins(&enabledPluginsCount);
|
||||||
/* ALL Button */
|
/* ALL Button */
|
||||||
if(EnabledPlugins.size() == 0)
|
if(enabledPluginsCount == 0)
|
||||||
m_btnMgr.setBtnTexture(m_checkboxBtn[0], theme.checkboxon, theme.checkboxons, false);
|
m_btnMgr.setText(m_pluginBtnAll, _t("cfgpl2", L"Set All"));
|
||||||
else
|
else
|
||||||
m_btnMgr.setBtnTexture(m_checkboxBtn[0], theme.checkboxoff, theme.checkboxoffs, false);
|
m_btnMgr.setText(m_pluginBtnAll, _t("cfgpl3", L"Clear All"));
|
||||||
m_btnMgr.show(m_checkboxBtn[0]);
|
|
||||||
m_btnMgr.show(m_checkboxLblTxt[0]);
|
|
||||||
/* Single Plugins */
|
/* Single Plugins */
|
||||||
u32 IteratorHelp = (Plugin_curPage - 1) * 10;
|
u32 IteratorHelp = (Plugin_curPage - 1) * 10;
|
||||||
for(u8 i = 1; i < min(IteratorHelp+10, (u32)m_max_plugins)-IteratorHelp+1; ++i)
|
for(u8 i = 1; i < min(IteratorHelp+10, (u32)m_max_plugins)-IteratorHelp+1; ++i)
|
||||||
@ -132,30 +133,26 @@ void CMenu::_PluginSettings()
|
|||||||
}
|
}
|
||||||
if(BTN_A_PRESSED)
|
if(BTN_A_PRESSED)
|
||||||
{
|
{
|
||||||
u32 IteratorHelp = (Plugin_curPage - 1) * 10;
|
if(m_btnMgr.selected(m_pluginBtnAll))
|
||||||
for(u8 i = 0; i < min(IteratorHelp+10, (u32)m_max_plugins)-IteratorHelp+1; ++i)
|
|
||||||
{
|
{
|
||||||
if(m_btnMgr.selected(m_checkboxBtn[i]))
|
// if all clear then set(2) them else clear(1) them all
|
||||||
|
for(u8 j = 0; m_plugin.PluginExist(j); j++)
|
||||||
|
m_plugin.SetEnablePlugin(j, (enabledPluginsCount == 0) ? 2 : 1);
|
||||||
|
_updatePluginCheckboxes();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
u32 IteratorHelp = (Plugin_curPage - 1) * 10;
|
||||||
|
for(u8 i = 1; i < min(IteratorHelp+10, (u32)m_max_plugins)-IteratorHelp+1; ++i)
|
||||||
{
|
{
|
||||||
m_refreshGameList = true;
|
if(m_btnMgr.selected(m_checkboxBtn[i]))
|
||||||
if(m_current_view != COVERFLOW_PLUGIN)
|
|
||||||
{
|
{
|
||||||
/* clear all plugins */
|
m_refreshGameList = true;
|
||||||
for(u8 j = 0; m_plugin.PluginExist(j); j++)
|
|
||||||
m_plugin.SetEnablePlugin(j, 1);
|
|
||||||
m_current_view = COVERFLOW_PLUGIN;
|
|
||||||
}
|
|
||||||
if(i == 0)// all button to clear all or set all
|
|
||||||
{
|
|
||||||
// if all clear then set(2) them else clear(1) them all
|
|
||||||
for(u8 j = 0; m_plugin.PluginExist(j); j++)
|
|
||||||
m_plugin.SetEnablePlugin(j, (enabledPluginsCount == 0) ? 2 : 1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
m_plugin.SetEnablePlugin(i+IteratorHelp-1);// switch plugin from off to on or vice versa
|
m_plugin.SetEnablePlugin(i+IteratorHelp-1);// switch plugin from off to on or vice versa
|
||||||
_updatePluginCheckboxes();
|
_updatePluginCheckboxes();
|
||||||
m_btnMgr.setSelected(m_checkboxBtn[i]);
|
m_btnMgr.setSelected(m_checkboxBtn[i]);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -204,12 +201,14 @@ void CMenu::_initPluginSettingsMenu()
|
|||||||
m_pluginLblPage = _addLabel("PLUGIN/PAGE_BTN", theme.btnFont, L"", 68, 400, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
|
m_pluginLblPage = _addLabel("PLUGIN/PAGE_BTN", theme.btnFont, L"", 68, 400, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
|
||||||
m_pluginBtnPageM = _addPicButton("PLUGIN/PAGE_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 20, 400, 48, 48);
|
m_pluginBtnPageM = _addPicButton("PLUGIN/PAGE_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 20, 400, 48, 48);
|
||||||
m_pluginBtnPageP = _addPicButton("PLUGIN/PAGE_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 172, 400, 48, 48);
|
m_pluginBtnPageP = _addPicButton("PLUGIN/PAGE_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 172, 400, 48, 48);
|
||||||
|
m_pluginBtnAll = _addButton("PLUGIN/ALL_BTN", theme.btnFont, L"", 230, 400, 180, 48, theme.btnFontColor);
|
||||||
|
|
||||||
_setHideAnim(m_pluginLblTitle, "PLUGIN/TITLE", 0, 0, -2.f, 0.f);
|
_setHideAnim(m_pluginLblTitle, "PLUGIN/TITLE", 0, 0, -2.f, 0.f);
|
||||||
_setHideAnim(m_pluginLblPage, "PLUGIN/PAGE_BTN", 0, 0, 1.f, -1.f);
|
_setHideAnim(m_pluginLblPage, "PLUGIN/PAGE_BTN", 0, 0, 1.f, -1.f);
|
||||||
_setHideAnim(m_pluginBtnPageM, "PLUGIN/PAGE_MINUS", 0, 0, 1.f, -1.f);
|
_setHideAnim(m_pluginBtnPageM, "PLUGIN/PAGE_MINUS", 0, 0, 1.f, -1.f);
|
||||||
_setHideAnim(m_pluginBtnPageP, "PLUGIN/PAGE_PLUS", 0, 0, 1.f, -1.f);
|
_setHideAnim(m_pluginBtnPageP, "PLUGIN/PAGE_PLUS", 0, 0, 1.f, -1.f);
|
||||||
_setHideAnim(m_pluginBtnBack, "PLUGIN/BACK_BTN", 0, 0, 1.f, -1.f);
|
_setHideAnim(m_pluginBtnBack, "PLUGIN/BACK_BTN", 0, 0, 1.f, -1.f);
|
||||||
|
_setHideAnim(m_pluginBtnAll, "PLUGIN/ALL_BTN", 0, 0, 1.f, -1.f);
|
||||||
|
|
||||||
_hidePluginSettings(true);
|
_hidePluginSettings(true);
|
||||||
_textPluginSettings();
|
_textPluginSettings();
|
||||||
@ -219,5 +218,4 @@ void CMenu::_textPluginSettings(void)
|
|||||||
{
|
{
|
||||||
m_btnMgr.setText(m_pluginLblTitle, _t("cfgpl1", L"Select Plugins"));
|
m_btnMgr.setText(m_pluginLblTitle, _t("cfgpl1", L"Select Plugins"));
|
||||||
m_btnMgr.setText(m_pluginBtnBack, _t("cd1", L"Back"));
|
m_btnMgr.setText(m_pluginBtnBack, _t("cd1", L"Back"));
|
||||||
m_btnMgr.setText(m_checkboxLblTxt[0], _t("dl25", L"All"));
|
|
||||||
}
|
}
|
||||||
|
@ -165,6 +165,8 @@ cfgg58=Adult only
|
|||||||
cfgg59=BBA Emulation
|
cfgg59=BBA Emulation
|
||||||
cfgg60=BBA Net Profile
|
cfgg60=BBA Net Profile
|
||||||
cfgg61=Deflicker Filter
|
cfgg61=Deflicker Filter
|
||||||
|
cfgg62=Reload cached cover
|
||||||
|
cfgg63=Converting cover please wait...
|
||||||
cfgg4=Patch country strings
|
cfgg4=Patch country strings
|
||||||
cfgg5=Ocarina
|
cfgg5=Ocarina
|
||||||
cfgg6=
|
cfgg6=
|
||||||
@ -223,6 +225,8 @@ cfgp7=Music
|
|||||||
cfgp8=Box Covers
|
cfgp8=Box Covers
|
||||||
cfgp9=Custom Banners
|
cfgp9=Custom Banners
|
||||||
cfgpl1=Select Plugins
|
cfgpl1=Select Plugins
|
||||||
|
cfgpl2=Set All
|
||||||
|
cfgpl3=Clear All
|
||||||
cfgs1=Music volume
|
cfgs1=Music volume
|
||||||
cfgs2=GUI sound volume
|
cfgs2=GUI sound volume
|
||||||
cfgs3=Coverflow sound volume
|
cfgs3=Coverflow sound volume
|
||||||
|
Loading…
Reference in New Issue
Block a user