mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-01 00:55:06 +01:00
-fixed wii game delete usage
-fixed fanart usage -fixed still selectable banner toggle if fanart is found -added new setting to the wiiflow.ini, "dml_activity_led" (enabled by default), in [DML] section, it controls the DML drive light when the gamecube game is busy -cleaned up some stuff
This commit is contained in:
parent
f41e01ff87
commit
2356afb1c8
@ -270,7 +270,7 @@ s32 DeviceHandler::OpenWBFS(int dev)
|
||||
{
|
||||
u32 part_lba, part_idx = 1;
|
||||
u32 part_fs = GetFSType(dev);
|
||||
char *partition = (char *)DeviceName[dev];
|
||||
const char *partition = DeviceName[dev];
|
||||
|
||||
if(dev == SD && IsInserted(dev))
|
||||
part_lba = sd.GetLBAStart(dev);
|
||||
@ -282,7 +282,7 @@ s32 DeviceHandler::OpenWBFS(int dev)
|
||||
else
|
||||
return -1;
|
||||
|
||||
return WBFS_Init(GetWbfsHandle(dev), part_fs, part_idx, part_lba, partition, dev);
|
||||
return WBFS_Init(GetWbfsHandle(dev), part_fs, part_idx, part_lba, partition);
|
||||
}
|
||||
|
||||
int DeviceHandler::PartitionToUSBPort(int part)
|
||||
|
@ -38,7 +38,9 @@
|
||||
// DIOS-MIOS
|
||||
DML_CFG DMLCfg;
|
||||
|
||||
void DML_New_SetOptions(const char *GamePath, char *CheatPath, const char *NewCheatPath, const char *partition, bool cheats, bool debugger, u8 NMM, u8 nodisc, u8 DMLvideoMode, u8 videoSetting, bool widescreen, bool new_dm_cfg)
|
||||
void DML_New_SetOptions(const char *GamePath, char *CheatPath, const char *NewCheatPath,
|
||||
const char *partition, bool cheats, bool debugger, u8 NMM, u8 nodisc, u8 DMLvideoMode,
|
||||
u8 videoSetting, bool widescreen, bool new_dm_cfg, bool activity_led)
|
||||
{
|
||||
gprintf("Wiiflow GC: Launch game '%s' through memory (new method)\n", GamePath);
|
||||
memset(&DMLCfg, 0, sizeof(DML_CFG));
|
||||
@ -56,7 +58,6 @@ void DML_New_SetOptions(const char *GamePath, char *CheatPath, const char *NewCh
|
||||
else
|
||||
DMLCfg.VideoMode |= DML_VID_FORCE;
|
||||
|
||||
DMLCfg.Config |= DML_CFG_ACTIVITY_LED; //Sorry but I like it lol, option will may follow
|
||||
DMLCfg.Config |= DML_CFG_PADHOOK; //Makes life easier, l+z+b+digital down...
|
||||
|
||||
if(GamePath != NULL)
|
||||
@ -79,7 +80,8 @@ void DML_New_SetOptions(const char *GamePath, char *CheatPath, const char *NewCh
|
||||
gprintf("Cheat Path: %s\n", ptr);
|
||||
DMLCfg.Config |= DML_CFG_CHEAT_PATH;
|
||||
}
|
||||
|
||||
if(activity_led)
|
||||
DMLCfg.Config |= DML_CFG_ACTIVITY_LED;
|
||||
if(cheats)
|
||||
DMLCfg.Config |= DML_CFG_CHEATS;
|
||||
if(debugger)
|
||||
|
@ -62,7 +62,9 @@ enum dmlvideomode
|
||||
DML_VID_PROG_PATCH = (1<<4),
|
||||
};
|
||||
|
||||
void DML_New_SetOptions(const char *GamePath, char *CheatPath, const char *NewCheatPath, const char *partition, bool cheats, bool debugger, u8 NMM, u8 nodisc, u8 DMLvideoMode, u8 videoSetting, bool widescreen, bool new_dm_cfg);
|
||||
void DML_New_SetOptions(const char *GamePath, char *CheatPath, const char *NewCheatPath,
|
||||
const char *partition, bool cheats, bool debugger, u8 NMM, u8 nodisc, u8 DMLvideoMode,
|
||||
u8 videoSetting, bool widescreen, bool new_dm_cfg, bool activity_led);
|
||||
void DML_Old_SetOptions(const char *GamePath);
|
||||
void DML_New_SetBootDiscOption(bool new_dm_cfg);
|
||||
void DML_New_WriteOptions();
|
||||
@ -81,7 +83,8 @@ typedef struct global_config
|
||||
|
||||
bool DEVO_Installed(const char *path);
|
||||
void DEVO_GetLoader(const char *loader);
|
||||
void DEVO_SetOptions(const char *isopath, int CurrentPartition, const char *gameID, bool memcard_emum);
|
||||
void DEVO_SetOptions(const char *isopath, int CurrentPartition, const char *gameID,
|
||||
bool memcard_emum);
|
||||
void DEVO_Boot();
|
||||
|
||||
// General
|
||||
|
@ -1402,27 +1402,27 @@ void CCoverFlow::_drawCoverBox(int i, bool mirror, CCoverFlow::DrawMode dm)
|
||||
GX_InitTexObj(&texObj, m_dvdSkin_GreenOne.data, m_dvdSkin_GreenOne.width, m_dvdSkin_GreenOne.height, m_dvdSkin_GreenOne.format, GX_CLAMP, GX_CLAMP, GX_FALSE);
|
||||
else if (casecolor == 0x00E360)
|
||||
GX_InitTexObj(&texObj, m_dvdSkin_GreenTwo.data, m_dvdSkin_GreenTwo.width, m_dvdSkin_GreenTwo.height, m_dvdSkin_GreenTwo.format, GX_CLAMP, GX_CLAMP, GX_FALSE);
|
||||
else if(_checkCoverColor((char *)m_items[m_covers[i].index].hdr->id,red,red_len))
|
||||
else if(_checkCoverColor(m_items[m_covers[i].index].hdr->id,red,red_len))
|
||||
{
|
||||
m_items[m_covers[i].index].hdr->casecolor = 0xFF0000;
|
||||
GX_InitTexObj(&texObj, m_dvdSkin_Red.data, m_dvdSkin_Red.width, m_dvdSkin_Red.height, m_dvdSkin_Red.format, GX_CLAMP, GX_CLAMP, GX_FALSE);
|
||||
}
|
||||
else if(_checkCoverColor((char *)m_items[m_covers[i].index].hdr->id,black,black_len))
|
||||
else if(_checkCoverColor(m_items[m_covers[i].index].hdr->id,black,black_len))
|
||||
{
|
||||
m_items[m_covers[i].index].hdr->casecolor = 0x000000;
|
||||
GX_InitTexObj(&texObj, m_dvdSkin_Black.data, m_dvdSkin_Black.width, m_dvdSkin_Black.height, m_dvdSkin_Black.format, GX_CLAMP, GX_CLAMP, GX_FALSE);
|
||||
}
|
||||
else if(_checkCoverColor((char *)m_items[m_covers[i].index].hdr->id,yellow,yellow_len))
|
||||
else if(_checkCoverColor(m_items[m_covers[i].index].hdr->id,yellow,yellow_len))
|
||||
{
|
||||
m_items[m_covers[i].index].hdr->casecolor = 0xFCFF00;
|
||||
GX_InitTexObj(&texObj, m_dvdSkin_Yellow.data, m_dvdSkin_Yellow.width, m_dvdSkin_Yellow.height, m_dvdSkin_Yellow.format, GX_CLAMP, GX_CLAMP, GX_FALSE);
|
||||
}
|
||||
else if(_checkCoverColor((char *)m_items[m_covers[i].index].hdr->id,greenOne,greenOne_len))
|
||||
else if(_checkCoverColor(m_items[m_covers[i].index].hdr->id,greenOne,greenOne_len))
|
||||
{
|
||||
m_items[m_covers[i].index].hdr->casecolor = 0x01A300;
|
||||
GX_InitTexObj(&texObj, m_dvdSkin_GreenOne.data, m_dvdSkin_GreenOne.width, m_dvdSkin_GreenOne.height, m_dvdSkin_GreenOne.format, GX_CLAMP, GX_CLAMP, GX_FALSE);
|
||||
}
|
||||
else if(_checkCoverColor((char *)m_items[m_covers[i].index].hdr->id,greenTwo,greenTwo_len))
|
||||
else if(_checkCoverColor(m_items[m_covers[i].index].hdr->id,greenTwo,greenTwo_len))
|
||||
{
|
||||
m_items[m_covers[i].index].hdr->casecolor = 0x00E360;
|
||||
GX_InitTexObj(&texObj, m_dvdSkin_GreenTwo.data, m_dvdSkin_GreenTwo.width, m_dvdSkin_GreenTwo.height, m_dvdSkin_GreenTwo.format, GX_CLAMP, GX_CLAMP, GX_FALSE);
|
||||
@ -1506,7 +1506,7 @@ string CCoverFlow::getId(void) const
|
||||
string CCoverFlow::getNextId(void) const
|
||||
{
|
||||
if (m_covers.empty() || m_items.empty()) return "";
|
||||
return string((char *) &m_items[loopNum(m_covers[m_range / 2].index + m_jump + 1, m_items.size())].hdr->id);
|
||||
return string(m_items[loopNum(m_covers[m_range / 2].index + m_jump + 1, m_items.size())].hdr->id);
|
||||
}
|
||||
|
||||
dir_discHdr * CCoverFlow::getHdr(void) const
|
||||
@ -1795,16 +1795,16 @@ bool CCoverFlow::_sortByLastPlayed(CItem item1, CItem item2)
|
||||
|
||||
bool CCoverFlow::_sortByGameID(CItem item1, CItem item2)
|
||||
{
|
||||
u32 s = min(strlen((char *) &item1.hdr->id), strlen((char *) &item2.hdr->id));
|
||||
for (u32 k = 0; k < s; ++k)
|
||||
u32 s = min(strlen(item1.hdr->id), strlen(item2.hdr->id));
|
||||
for(u32 k = 0; k < s; ++k)
|
||||
{
|
||||
if (toupper(item1.hdr->id[k]) > toupper(item2.hdr->id[k]))
|
||||
if(toupper(item1.hdr->id[k]) > toupper(item2.hdr->id[k]))
|
||||
return false;
|
||||
else if (toupper(item1.hdr->id[k]) < toupper(item2.hdr->id[k]))
|
||||
else if(toupper(item1.hdr->id[k]) < toupper(item2.hdr->id[k]))
|
||||
return true;
|
||||
}
|
||||
|
||||
return strlen((char *) &item1.hdr->id) < strlen((char *) &item2.hdr->id);
|
||||
return strlen(item1.hdr->id) < strlen(item2.hdr->id);
|
||||
}
|
||||
|
||||
bool CCoverFlow::_sortByAlpha(CItem item1, CItem item2)
|
||||
@ -2081,7 +2081,7 @@ bool CCoverFlow::findId(const char *id, bool instant)
|
||||
return false;
|
||||
//
|
||||
for (i = 0; i < m_items.size(); ++i)
|
||||
if (memcmp(&m_items[i].hdr->id, id, strlen(id)) == 0)
|
||||
if(memcmp(m_items[i].hdr->id, id, strlen(id)) == 0)
|
||||
break;
|
||||
else if (strlen(id) > 6 && memcmp(&m_items[i].hdr->path[string(m_items[i].hdr->path).find_last_of("/")+1], id, strlen(id)) == 0)
|
||||
break;
|
||||
@ -2380,16 +2380,16 @@ void CCoverFlow::nextID(wchar_t *c)
|
||||
|
||||
_completeJump();
|
||||
u32 curPos = _currentPos();
|
||||
char *system = (char *)m_items[curPos].hdr->id;
|
||||
char *system = m_items[curPos].hdr->id;
|
||||
|
||||
for (i = 1; i < n; ++i)
|
||||
if ((char)m_items[loopNum(curPos + i, n)].hdr->id[0] != system[0])
|
||||
if (m_items[loopNum(curPos + i, n)].hdr->id[0] != system[0])
|
||||
break;
|
||||
|
||||
if (i < n)
|
||||
{
|
||||
_setJump(i);
|
||||
system = (char *)m_items[loopNum(curPos + i, n)].hdr->id;
|
||||
system = m_items[loopNum(curPos + i, n)].hdr->id;
|
||||
}
|
||||
|
||||
system[1] = '\0';
|
||||
@ -2405,13 +2405,13 @@ void CCoverFlow::prevID(wchar_t *c)
|
||||
|
||||
_completeJump();
|
||||
u32 curPos = _currentPos();
|
||||
char *system = (char *)m_items[curPos].hdr->id;
|
||||
char *system = m_items[curPos].hdr->id;
|
||||
|
||||
for (i = 1; i < n; ++i)
|
||||
if ((char)m_items[loopNum(curPos - i, n)].hdr->id[0] != system[0])
|
||||
for(i = 1; i < n; ++i)
|
||||
if(m_items[loopNum(curPos - i, n)].hdr->id[0] != system[0])
|
||||
{
|
||||
system = (char *)m_items[loopNum(curPos - i, n)].hdr->id;
|
||||
while(i < n && (char)m_items[loopNum(curPos - i, n)].hdr->id[0] == system[0]) ++i;
|
||||
system = m_items[loopNum(curPos - i, n)].hdr->id;
|
||||
while(i < n && m_items[loopNum(curPos - i, n)].hdr->id[0] == system[0]) ++i;
|
||||
i--;
|
||||
break;
|
||||
}
|
||||
@ -2419,7 +2419,7 @@ void CCoverFlow::prevID(wchar_t *c)
|
||||
if (i < n)
|
||||
{
|
||||
_setJump(-i);
|
||||
system = (char *)m_items[loopNum(curPos - i, n)].hdr->id;
|
||||
system = m_items[loopNum(curPos - i, n)].hdr->id;
|
||||
}
|
||||
|
||||
system[1] = '\0';
|
||||
|
@ -23,17 +23,11 @@ void CFanart::unload()
|
||||
{
|
||||
m_cfg.unload();
|
||||
m_loaded = false;
|
||||
for(vector<CFanartElement>::iterator Elm = m_elms.begin(); Elm != m_elms.end(); Elm++)
|
||||
Elm->Cleanup();
|
||||
m_elms.clear();
|
||||
if(m_bg.data != NULL)
|
||||
{
|
||||
free(m_bg.data);
|
||||
m_bg.data = NULL;
|
||||
}
|
||||
if(m_bglq.data != NULL)
|
||||
{
|
||||
free(m_bglq.data);
|
||||
m_bglq.data = NULL;
|
||||
}
|
||||
m_bg.Cleanup();
|
||||
m_bglq.Cleanup();
|
||||
}
|
||||
|
||||
bool CFanart::load(Config &m_globalConfig, const char *path, const char *id)
|
||||
@ -46,30 +40,27 @@ bool CFanart::load(Config &m_globalConfig, const char *path, const char *id)
|
||||
unload();
|
||||
|
||||
char dir[64];
|
||||
memset(dir,0, 64);
|
||||
dir[63] = '\0';
|
||||
strncpy(dir, fmt("%s/%s", path, id), 63);
|
||||
STexture fanBg, fanBgLq;
|
||||
|
||||
TexErr texErr = fanBg.fromImageFile(fmt("%s/background.png", dir));
|
||||
TexErr texErr = m_bg.fromImageFile(fmt("%s/background.png", dir));
|
||||
if(texErr == TE_ERROR)
|
||||
{
|
||||
memset(dir,0, 64);
|
||||
strncpy(dir, fmt("%s/%.3s", path, id), 63);
|
||||
texErr = fanBg.fromImageFile(fmt("%s/background.png", dir));
|
||||
texErr = m_bg.fromImageFile(fmt("%s/background.png", dir));
|
||||
}
|
||||
if(texErr == TE_OK)
|
||||
{
|
||||
char cfg_char[64];
|
||||
memset(cfg_char,0, 64);
|
||||
cfg_char[63] = '\0';
|
||||
strncpy(cfg_char, fmt("%s/%s.ini", dir, id), 63);
|
||||
m_cfg.load(cfg_char);
|
||||
if(!m_cfg.loaded())
|
||||
{
|
||||
memset(cfg_char,0, 64);
|
||||
strncpy(cfg_char, fmt("%s/%.3s.ini", dir, id), 63);
|
||||
m_cfg.load(cfg_char);
|
||||
}
|
||||
fanBgLq.fromImageFile(fmt("%s/background_lq.png", dir));
|
||||
m_bglq.fromImageFile(fmt("%s/background_lq.png", dir));
|
||||
for(int i = 1; i <= 6; i++)
|
||||
{
|
||||
CFanartElement elm(m_cfg, dir, i);
|
||||
@ -83,10 +74,6 @@ bool CFanart::load(Config &m_globalConfig, const char *path, const char *id)
|
||||
m_globalHideCover = m_globalConfig.getOptBool("FANART", "hidecover", 2); // 0 is false, 1 is true, 2 is default
|
||||
m_globalShowCoverAfterAnimation = m_globalConfig.getOptBool("FANART", "show_cover_after_animation", 2);
|
||||
}
|
||||
|
||||
m_bg = fanBg;
|
||||
m_bglq = fanBgLq;
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
@ -225,13 +212,9 @@ CFanartElement::CFanartElement(Config &cfg, const char *dir, int artwork)
|
||||
m_step_angle = m_event_duration == 0 ? 0 : (m_angle - m_event_angle) / m_event_duration;
|
||||
}
|
||||
|
||||
CFanartElement::~CFanartElement(void)
|
||||
void CFanartElement::Cleanup(void)
|
||||
{
|
||||
if(m_art.data != NULL)
|
||||
{
|
||||
free(m_art.data);
|
||||
m_art.data = NULL;
|
||||
}
|
||||
m_art.Cleanup();
|
||||
}
|
||||
|
||||
bool CFanartElement::IsValid()
|
||||
|
@ -15,7 +15,7 @@ class CFanartElement
|
||||
{
|
||||
public:
|
||||
CFanartElement(Config &cfg, const char *dir, int artwork);
|
||||
~CFanartElement(void);
|
||||
void Cleanup(void);
|
||||
|
||||
void draw();
|
||||
void tick();
|
||||
|
@ -40,11 +40,11 @@ u8 currentPartition = 1;
|
||||
|
||||
/* WBFS HDD */
|
||||
wbfs_t *hdd = NULL;
|
||||
|
||||
#if 0
|
||||
/* WBFS callbacks */
|
||||
static rw_sector_callback_t readCallback = NULL;
|
||||
static rw_sector_callback_t writeCallback = NULL;
|
||||
|
||||
#endif
|
||||
s32 __WBFS_ReadDVD(void *fp, u32 lba, u32 len, void *iobuf)
|
||||
{
|
||||
s32 ret;
|
||||
@ -208,7 +208,7 @@ bool WBFS_Mounted()
|
||||
return wbfs_mounted != 0;
|
||||
}
|
||||
|
||||
s32 WBFS_Init(wbfs_t * handle, u32 part_fs, u32 part_idx, u32 part_lba, char *partition, u8 current)
|
||||
s32 WBFS_Init(wbfs_t * handle, u32 part_fs, u32 part_idx, u32 part_lba, const char *partition)
|
||||
{
|
||||
WBFS_Close();
|
||||
|
||||
@ -221,13 +221,11 @@ s32 WBFS_Init(wbfs_t * handle, u32 part_fs, u32 part_idx, u32 part_lba, char *pa
|
||||
wbfs_part_lba = part_lba;
|
||||
wbfs_part_idx = part_idx;
|
||||
|
||||
currentPartition = current;
|
||||
|
||||
wbfs_mounted = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
s32 WBFS_Format(u32 lba, u32 size)
|
||||
{
|
||||
u32 sector_size = (currentPartition == 0) ? 512 : USBStorage2_GetSectorSize();
|
||||
@ -251,7 +249,7 @@ s32 WBFS_Format(u32 lba, u32 size)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
s32 WBFS_CheckGame(u8 *discid, char *path)
|
||||
{
|
||||
/* Try to open game disc */
|
||||
|
@ -24,8 +24,7 @@ extern u32 wbfs_part_lba;
|
||||
extern char wbfs_fs_drive[16];
|
||||
|
||||
/* Prototypes */
|
||||
s32 WBFS_Format(u32, u32);
|
||||
s32 WBFS_Init(wbfs_t *handle, u32 part_fs, u32 part_idx, u32 part_lba, char *partition, u8 current);
|
||||
s32 WBFS_Init(wbfs_t *handle, u32 part_fs, u32 part_idx, u32 part_lba, const char *partition);
|
||||
s32 WBFS_CheckGame(u8 *, char *);
|
||||
s32 WBFS_AddGame(progress_callback_t spinner, void *spinner_data);
|
||||
s32 WBFS_RemoveGame(u8 *, char *);
|
||||
|
@ -60,17 +60,14 @@ void CMenu::_showConfig(void)
|
||||
m_btnMgr.show(m_configLblDownload);
|
||||
m_btnMgr.show(m_configBtnDownload);
|
||||
|
||||
bool disable = (m_cfg.getBool(CHANNEL_DOMAIN, "disable", true) || neek2o()) && m_current_view == COVERFLOW_CHANNEL && !m_tempView;
|
||||
char *partitionname = disable ? (char *)CHANNEL_DOMAIN : (char *)DeviceName[m_tempView ? m_cfg.getInt(WII_DOMAIN, "savepartition", 0) : m_cfg.getInt(_domainFromView(), "partition", 0)];
|
||||
|
||||
for(u8 i = 0; strncmp((const char *)&partitionname[i], "\0", 1) != 0; i++)
|
||||
partitionname[i] = toupper(partitionname[i]);
|
||||
bool disable = (m_current_view == COVERFLOW_CHANNEL) && (m_cfg.getBool(CHANNEL_DOMAIN, "disable", true) || neek2o()) && !m_tempView;
|
||||
const char *partitionname = disable ? CHANNEL_DOMAIN : DeviceName[m_tempView ? m_cfg.getInt(WII_DOMAIN, "savepartition", 0) : m_cfg.getInt(_domainFromView(), "partition", 0)];
|
||||
|
||||
for(u8 i = 0; i < ARRAY_SIZE(m_configLblUser); ++i)
|
||||
if(m_configLblUser[i] != -1)
|
||||
m_btnMgr.show(m_configLblUser[i]);
|
||||
|
||||
m_btnMgr.setText(m_configLblPartition, (string)partitionname);
|
||||
m_btnMgr.setText(m_configLblPartition, upperCase(partitionname));
|
||||
|
||||
m_btnMgr.show(m_configLblCfg4);
|
||||
m_btnMgr.show(m_configBtnCfg4);
|
||||
@ -213,16 +210,10 @@ int CMenu::_config1(void)
|
||||
|
||||
if (currentPartition != bCurrentPartition)
|
||||
{
|
||||
bool disable = (m_cfg.getBool(CHANNEL_DOMAIN, "disable", true) || neek2o()) && m_current_view == COVERFLOW_CHANNEL && !m_tempView;
|
||||
|
||||
bool disable = (m_cfg.getBool(CHANNEL_DOMAIN, "disable", true) || neek2o())
|
||||
&& m_current_view == COVERFLOW_CHANNEL && !m_tempView;
|
||||
if(!disable)
|
||||
{
|
||||
char *newpartition = (char *)DeviceName[m_cfg.getInt(m_tempView ? WII_DOMAIN : _domainFromView(), m_tempView ? "savepartition" : "partition", currentPartition)];
|
||||
|
||||
for(u8 i = 0; strncmp((const char *)&newpartition[i], "\0", 1) != 0; i++)
|
||||
newpartition[i] = toupper(newpartition[i]);
|
||||
|
||||
//gprintf("Switching partition to %s\n", newpartition);
|
||||
_showWaitMessage();
|
||||
_loadList();
|
||||
_hideWaitMessage();
|
||||
|
@ -292,7 +292,7 @@ static u8 GetRequestedGameIOS(dir_discHdr *hdr)
|
||||
u8 IOS = 0;
|
||||
|
||||
DeviceHandle.OpenWBFS(currentPartition);
|
||||
wbfs_disc_t *disc = WBFS_OpenDisc((u8 *) &hdr->id, (char *) hdr->path);
|
||||
wbfs_disc_t *disc = WBFS_OpenDisc((u8*)&hdr->id, hdr->path);
|
||||
if(disc != NULL)
|
||||
{
|
||||
u8 *titleTMD = NULL;
|
||||
@ -503,7 +503,7 @@ void CMenu::_game(bool launch)
|
||||
{
|
||||
_hideGame();
|
||||
m_banner.SetShowBanner(false);
|
||||
if(_wbfsOp(CMenu::WO_REMOVE_GAME))
|
||||
if(_wbfsOp(WO_REMOVE_GAME))
|
||||
{
|
||||
m_gameSound.FreeMemory();
|
||||
CheckGameSoundThread();
|
||||
@ -683,7 +683,10 @@ void CMenu::_game(bool launch)
|
||||
m_btnMgr.hide(b ? m_gameBtnFavoriteOff : m_gameBtnFavoriteOn);
|
||||
m_btnMgr.show(m_gameBtnPlay);
|
||||
m_btnMgr.show(m_gameBtnBack);
|
||||
m_btnMgr.show(m_gameBtnToogle);
|
||||
if(!m_fa.isLoaded())
|
||||
m_btnMgr.show(m_gameBtnToogle);
|
||||
else
|
||||
m_btnMgr.hide(m_gameBtnToogle);
|
||||
m_btnMgr.hide(m_gameBtnPlayFull);
|
||||
m_btnMgr.hide(m_gameBtnBackFull);
|
||||
m_btnMgr.hide(m_gameBtnToogleFull);
|
||||
@ -706,7 +709,7 @@ void CMenu::_game(bool launch)
|
||||
}
|
||||
else
|
||||
{
|
||||
if(m_zoom_banner)
|
||||
if(m_zoom_banner && !m_fa.isLoaded())
|
||||
{
|
||||
m_btnMgr.show(m_gameBtnPlayFull);
|
||||
m_btnMgr.show(m_gameBtnBackFull);
|
||||
@ -723,7 +726,7 @@ void CMenu::_game(bool launch)
|
||||
m_btnMgr.hide(m_gameBtnToogle);
|
||||
if(m_gameLblUser[4] != -1)
|
||||
{
|
||||
if(!NoGameID(CoverFlow.getHdr()->type) && !m_zoom_banner)
|
||||
if(!NoGameID(CoverFlow.getHdr()->type) && !m_zoom_banner && !m_fa.isLoaded())
|
||||
m_btnMgr.show(m_gameLblUser[4]);
|
||||
else
|
||||
m_btnMgr.hide(m_gameLblUser[4], true);
|
||||
@ -858,6 +861,7 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool disc)
|
||||
string NewCheatPath;
|
||||
bool DML_debug = m_gcfg2.getBool(id, "debugger", false);
|
||||
bool DM_Widescreen = m_gcfg2.getBool(id, "dm_widescreen", false);
|
||||
bool activity_led = m_cfg.getBool(GC_DOMAIN, "dml_activity_led", true);
|
||||
if(strcasestr(path.c_str(), "boot.bin") != NULL)
|
||||
{
|
||||
path.erase(path.end() - 12, path.end());
|
||||
@ -873,7 +877,7 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool disc)
|
||||
string newPath = &path[path.find_first_of(":/")+1];
|
||||
if(m_new_dml)
|
||||
DML_New_SetOptions(newPath.c_str(), CheatPath, NewCheatPath.c_str(), DeviceName[currentPartition],
|
||||
cheats, DML_debug, NMM, nodisc, videoMode, videoSetting, DM_Widescreen, m_new_dm_cfg);
|
||||
cheats, DML_debug, NMM, nodisc, videoMode, videoSetting, DM_Widescreen, m_new_dm_cfg, activity_led);
|
||||
else
|
||||
DML_Old_SetOptions(newPath.c_str());
|
||||
if(!nodisc || !m_new_dml)
|
||||
|
@ -195,15 +195,12 @@ void CMenu::LoadView(void)
|
||||
_loadCFLayout(m_cfg.getInt(_domainFromView(), "last_cf_mode", 1));
|
||||
CoverFlow.applySettings();
|
||||
|
||||
char *mode = (m_current_view == COVERFLOW_CHANNEL && m_cfg.getBool(CHANNEL_DOMAIN, "disable", true))
|
||||
? (char *)CHANNEL_DOMAIN : (char *)DeviceName[currentPartition];
|
||||
|
||||
for(u8 i = 0; strncmp((const char *)&mode[i], "\0", 1) != 0; i++)
|
||||
mode[i] = toupper(mode[i]);
|
||||
const char *mode = (m_current_view == COVERFLOW_CHANNEL && m_cfg.getBool(CHANNEL_DOMAIN, "disable", true))
|
||||
? CHANNEL_DOMAIN : DeviceName[currentPartition];
|
||||
|
||||
m_showtimer=60;
|
||||
char gui_name[20];
|
||||
snprintf(gui_name, sizeof(gui_name), "%s [%s]", _domainFromView(),mode);
|
||||
snprintf(gui_name, sizeof(gui_name), "%s [%s]", _domainFromView(), upperCase(mode).c_str());
|
||||
m_btnMgr.setText(m_mainLblNotice, (string)gui_name);
|
||||
m_btnMgr.show(m_mainLblNotice);
|
||||
}
|
||||
@ -632,7 +629,7 @@ int CMenu::main(void)
|
||||
{
|
||||
bUsed = true;
|
||||
bool block = m_current_view == COVERFLOW_CHANNEL && (m_cfg.getBool(CHANNEL_DOMAIN, "disable", true) || neek2o());
|
||||
char *partition;
|
||||
const char *partition = NULL;
|
||||
if(!block)
|
||||
{
|
||||
_showWaitMessage();
|
||||
@ -654,19 +651,16 @@ int CMenu::main(void)
|
||||
if(limiter > 10) break;
|
||||
limiter++;
|
||||
}
|
||||
partition = (char *)DeviceName[currentPartition];
|
||||
partition = DeviceName[currentPartition];
|
||||
gprintf("Setting Emu NAND to Partition: %i\n",currentPartition);
|
||||
m_cfg.setInt(_domainFromView(), "partition", currentPartition);
|
||||
}
|
||||
else
|
||||
partition = (char *)"NAND";
|
||||
|
||||
for(u8 i = 0; strncmp((const char *)&partition[i], "\0", 1) != 0; i++)
|
||||
partition[i] = toupper(partition[i]);
|
||||
partition = "NAND";
|
||||
//gprintf("Next item: %s\n", partition);
|
||||
m_showtimer=60;
|
||||
char gui_name[20];
|
||||
snprintf(gui_name, sizeof(gui_name), "%s [%s]", _domainFromView(),partition);
|
||||
snprintf(gui_name, sizeof(gui_name), "%s [%s]", _domainFromView(), upperCase(partition).c_str());
|
||||
m_btnMgr.setText(m_mainLblNotice, (string)gui_name);
|
||||
m_btnMgr.show(m_mainLblNotice);
|
||||
if(!block)
|
||||
|
@ -274,6 +274,7 @@ bool CMenu::_wbfsOp(CMenu::WBFS_OP op)
|
||||
bool upd_dml = false;
|
||||
bool upd_emu = false;
|
||||
bool out = false;
|
||||
dir_discHdr *CF_Hdr = CoverFlow.getHdr();
|
||||
string cfPos = CoverFlow.getNextId();
|
||||
|
||||
SetupInput();
|
||||
@ -284,7 +285,7 @@ bool CMenu::_wbfsOp(CMenu::WBFS_OP op)
|
||||
m_btnMgr.setText(m_wbfsLblDialog, _t("wbfsadddlg", L"Please insert the disc you want to copy, then click on Go."));
|
||||
break;
|
||||
case CMenu::WO_REMOVE_GAME:
|
||||
m_btnMgr.setText(m_wbfsLblDialog, wfmt(_fmt("wbfsremdlg", L"To permanently remove the game: %s, click on Go."), (u8*)CoverFlow.getTitle().toUTF8().c_str()));
|
||||
m_btnMgr.setText(m_wbfsLblDialog, wfmt(_fmt("wbfsremdlg", L"To permanently remove the game: %s, click on Go."), CoverFlow.getTitle().toUTF8().c_str()));
|
||||
break;
|
||||
case CMenu::WO_FORMAT:
|
||||
break;
|
||||
@ -377,30 +378,32 @@ bool CMenu::_wbfsOp(CMenu::WBFS_OP op)
|
||||
}
|
||||
break;
|
||||
case CMenu::WO_REMOVE_GAME:
|
||||
if(CoverFlow.getHdr()->type == TYPE_GC_GAME)
|
||||
if(CF_Hdr->type == TYPE_GC_GAME)
|
||||
{
|
||||
if(strcasestr(CoverFlow.getHdr()->path, "boot.bin") != NULL)
|
||||
if(strcasestr(CF_Hdr->path, "boot.bin") != NULL)
|
||||
{
|
||||
string GC_Path(CoverFlow.getHdr()->path);
|
||||
string GC_Path(CF_Hdr->path);
|
||||
GC_Path.erase(GC_Path.end() - 13, GC_Path.end());
|
||||
fsop_deleteFolder(GC_Path.c_str());
|
||||
}
|
||||
else
|
||||
fsop_deleteFile(CoverFlow.getHdr()->path);
|
||||
fsop_deleteFile(CF_Hdr->path);
|
||||
upd_dml = true;
|
||||
}
|
||||
else if(CoverFlow.getHdr()->type == TYPE_PLUGIN)
|
||||
else if(CF_Hdr->type == TYPE_PLUGIN)
|
||||
{
|
||||
fsop_deleteFile(CoverFlow.getHdr()->path);
|
||||
fsop_deleteFile(CF_Hdr->path);
|
||||
upd_emu = true;
|
||||
}
|
||||
else if(CoverFlow.getHdr()->type == TYPE_WII_GAME)
|
||||
else if(CF_Hdr->type == TYPE_WII_GAME)
|
||||
{
|
||||
WBFS_RemoveGame((u8 *)CoverFlow.getId().c_str(), CoverFlow.getHdr()->path);
|
||||
DeviceHandle.OpenWBFS(currentPartition);
|
||||
WBFS_RemoveGame((u8*)&CF_Hdr->id, CF_Hdr->path);
|
||||
WBFS_Close();
|
||||
upd_usb = true;
|
||||
}
|
||||
if(m_cfg.getBool("GENERAL", "delete_cover_and_game", false))
|
||||
RemoveCover(CoverFlow.getId().c_str());
|
||||
RemoveCover(CF_Hdr->id);
|
||||
m_btnMgr.show(m_wbfsPBar);
|
||||
m_btnMgr.setProgress(m_wbfsPBar, 0.f, true);
|
||||
m_btnMgr.setProgress(m_wbfsPBar, 1.f);
|
||||
@ -413,7 +416,7 @@ bool CMenu::_wbfsOp(CMenu::WBFS_OP op)
|
||||
case CMenu::WO_FORMAT:
|
||||
break;
|
||||
case CMenu::WO_COPY_GAME:
|
||||
string GC_Path(CoverFlow.getHdr()->path);
|
||||
string GC_Path(CF_Hdr->path);
|
||||
if(strcasestr(GC_Path.c_str(), "boot.bin") != NULL)
|
||||
GC_Path.erase(GC_Path.end() - 13, GC_Path.end());
|
||||
else
|
||||
@ -430,8 +433,8 @@ bool CMenu::_wbfsOp(CMenu::WBFS_OP op)
|
||||
m_btnMgr.hide(m_wbfsBtnBack);
|
||||
m_btnMgr.show(m_wbfsLblMessage);
|
||||
m_btnMgr.setText(m_wbfsLblMessage, L"");
|
||||
cfPos = string(CoverFlow.getHdr()->id);
|
||||
m_btnMgr.setText(m_wbfsLblDialog, wfmt(_fmt("wbfsop10", L"Copying [%s] %s..."), CoverFlow.getHdr()->id, CoverFlow.getTitle().toUTF8().c_str()));
|
||||
cfPos = string(CF_Hdr->id);
|
||||
m_btnMgr.setText(m_wbfsLblDialog, wfmt(_fmt("wbfsop10", L"Copying [%s] %s..."), CF_Hdr->id, CoverFlow.getTitle().toUTF8().c_str()));
|
||||
done = true;
|
||||
upd_dml = true;
|
||||
m_thrdWorking = true;
|
||||
|
Loading…
Reference in New Issue
Block a user