Merge branch 'Fledge68:master' into master

This commit is contained in:
MayanKoyote 2023-03-08 23:46:55 +05:00 committed by GitHub
commit 3ad6a6cd8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 181 additions and 46 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 MiB

After

Width:  |  Height:  |  Size: 4.4 MiB

View File

@ -1829,7 +1829,7 @@ void CMenu::_mainLoopCommon(bool withCF, bool adjusting)
// set song title and display it if music info is allowed
if(MusicPlayer.SongChanged() && m_music_info)
{
m_btnMgr.setText(m_mainLblCurMusic, MusicPlayer.GetFileName(), false);// false for word wrap
m_btnMgr.setText(m_mainLblCurMusic, MusicPlayer.GetFileName());
m_btnMgr.show(m_mainLblCurMusic);
MusicPlayer.DisplayTime = time(NULL);
}
@ -1859,8 +1859,8 @@ void CMenu::_mainLoopCommon(bool withCF, bool adjusting)
if(show_mem)
{
m_btnMgr.setText(m_mem1FreeSize, wfmt(L"Mem1 lo Free:%u, Mem1 Free:%u", MEM1_lo_freesize(), MEM1_freesize()), true);
m_btnMgr.setText(m_mem2FreeSize, wfmt(L"Mem2 Free:%u", MEM2_freesize()), true);
m_btnMgr.setText(m_mem1FreeSize, wfmt(L"Mem1 lo Free:%u, Mem1 Free:%u", MEM1_lo_freesize(), MEM1_freesize()), true);// true = dont wrap text
m_btnMgr.setText(m_mem2FreeSize, wfmt(L"Mem2 Free:%u", MEM2_freesize()), true);// true = dont wrap text
}
#ifdef SHOWMEMGECKO
@ -2026,8 +2026,9 @@ void CMenu::_initCF(void)
// filter list based on categories, favorites, and adult only
for(vector<dir_discHdr>::iterator hdr = m_gameList.begin(); hdr != m_gameList.end(); ++hdr)
{
if(m_sourceflow && !m_source.getBool(sfmt("button_%i", hdr->settings[0]), "hidden", false))
if(m_sourceflow)
{
if(!m_source.getBool(sfmt("button_%i", hdr->settings[0]), "hidden", false))
CoverFlow.addItem(&(*hdr), 0, 0);// no filtering for sourceflow
continue;
}

View File

@ -970,6 +970,7 @@ private:
void _getSFlowBgTex();
// misc functions
void _resetGCSettings(const string &id);
void RemoveCover(const char *id);
void _setPartition(s8 direction = 0, u8 partition = 0, u8 coverflow = 0);
int _sfCacheCoversNeeded();

View File

@ -39,7 +39,7 @@ void CMenu::_showBoot()
if(cur_ios > 0)
m_btnMgr.setText(m_configLbl2Val, wfmt(L"%i", cur_ios));
else
m_btnMgr.setText(m_configLbl2Val, L"AUTO");// cIOS 249 unless the user changed it via the meta.xml
m_btnMgr.setText(m_configLbl2Val, _t("GC_Auto", L"AUTO"));// cIOS 249 unless the user changed it via the meta.xml
m_btnMgr.setText(m_configBtn3, wfmt(L"%i", set_port));
m_btnMgr.setText(m_configBtn4, m_cfg.getBool("GENERAL", "sd_only") ? _t("yes", L"Yes") : _t("no", L"No"));

View File

@ -229,7 +229,7 @@ void CMenu::_showConfigGame()
}
_hideConfigButtons();
m_configGameMaxPgs = IsOnWiiU() ? 6 : 5;
m_configGameMaxPgs = 6;
m_btnMgr.setText(m_gameSettingsLblPage, wfmt(L"%i / %i", m_configGamePage, m_configGameMaxPgs));
m_btnMgr.show(m_gameSettingsLblPage);
@ -429,13 +429,21 @@ void CMenu::_showConfigGame()
}
else if(m_configGamePage == 6)
{
m_btnMgr.setText(m_configLbl1, _t("cfgg46", L"WiiU Widescreen"));
i = min(m_gcfg2.getUInt(id, "widescreen_wiiu", 0), ARRAY_SIZE(CMenu::_WidescreenWiiu) - 1u);
m_btnMgr.setText(m_configLbl1Val, _t(CMenu::_WidescreenWiiu[i].id, CMenu::_WidescreenWiiu[i].text));
m_btnMgr.setText(m_configLbl1, _t("cfgg64", L"Reset Settings to Defaults"));
m_btnMgr.setText(m_configBtn1, _t("yes", L"Yes"));
m_btnMgr.show(m_configLbl1);
m_btnMgr.show(m_configLbl1Val);
m_btnMgr.show(m_configBtn1P);
m_btnMgr.show(m_configBtn1M);
m_btnMgr.show(m_configBtn1);
if(IsOnWiiU())
{
m_btnMgr.setText(m_configLbl2, _t("cfgg46", L"WiiU Widescreen"));
i = min(m_gcfg2.getUInt(id, "widescreen_wiiu", 0), ARRAY_SIZE(CMenu::_WidescreenWiiu) - 1u);
m_btnMgr.setText(m_configLbl2Val, _t(CMenu::_WidescreenWiiu[i].id, CMenu::_WidescreenWiiu[i].text));
m_btnMgr.show(m_configLbl2);
m_btnMgr.show(m_configLbl2Val);
m_btnMgr.show(m_configBtn2P);
m_btnMgr.show(m_configBtn2M);
}
}
}
@ -763,12 +771,39 @@ void CMenu::_configGame(const dir_discHdr *hdr, bool disc)
}
else if(m_configGamePage == 6)
{
if(m_btnMgr.selected(m_configBtn1P) || m_btnMgr.selected(m_configBtn1M))
if(m_btnMgr.selected(m_configBtn1))
{
s8 direction = m_btnMgr.selected(m_configBtn1P) ? 1 : -1;
m_gcfg2.setUInt(id, "ios", 0);
m_gcfg2.setUInt(id, "language", 0);
m_gcfg2.setUInt(id, "video_mode", 0);
m_gcfg2.setUInt(id, "debugger", 0);
m_gcfg2.setOptBool(id, "cheat", 0);
m_gcfg2.setUInt(id, "patch_video_modes", 0);
m_gcfg2.setOptBool(id, "vipatch", 0);
m_gcfg2.setOptBool(id, "country_patch", 0);
m_gcfg2.setUInt(id, "aspect_ratio", 0);
m_gcfg2.setOptBool(id, "led", 0);
m_gcfg2.setUInt(id, "private_server", 0);
m_gcfg2.setOptBool(id, "fix480p", 2);// default
m_gcfg2.setUInt(id, "deflicker_wii", 0);
m_gcfg2.setUInt(id, "widescreen_wiiu", 0);
if(GameHdr->type == TYPE_WII_GAME)
m_gcfg2.setUInt(id, "emulate_save", 0);
else // channel
{
m_gcfg2.setOptBool(id, "custom", 0);
m_gcfg2.setOptBool(id, "apploader", 0);
m_gcfg2.setOptBool(id, "useneek", 0);
}
_error(_t("dlmsg14", L"Done."));
_showConfigGame();
}
else if(m_btnMgr.selected(m_configBtn2P) || m_btnMgr.selected(m_configBtn2M))
{
s8 direction = m_btnMgr.selected(m_configBtn2P) ? 1 : -1;
i = loopNum(m_gcfg2.getUInt(id, "widescreen_wiiu", 0) + direction, ARRAY_SIZE(CMenu::_WidescreenWiiu));
m_gcfg2.setInt(id, "widescreen_wiiu", i);
m_btnMgr.setText(m_configLbl1Val, _t(CMenu::_WidescreenWiiu[i].id, CMenu::_WidescreenWiiu[i].text));
m_btnMgr.setText(m_configLbl2Val, _t(CMenu::_WidescreenWiiu[i].id, CMenu::_WidescreenWiiu[i].text));
}
}
}

View File

@ -72,6 +72,29 @@ template <class T> static inline T loopNum(T i, T s)
return (i + s) % s;
}
void CMenu::_resetGCSettings(const string &id)
{
m_gcfg2.setUInt(id, "language", 0);
m_gcfg2.setUInt(id, "video_mode", 0);
m_gcfg2.setOptBool(id, "led", 0);
m_gcfg2.setOptBool(id, "devo_memcard_emu", 2);// default
m_gcfg2.setOptBool(id, "widescreen", 0);
m_gcfg2.setUInt(id, "debugger", 0);
m_gcfg2.setOptBool(id, "deflicker", 0);
m_gcfg2.setOptBool(id, "cheat", 0);
m_gcfg2.setOptBool(id, "wiiu_widescreen", 0);
m_gcfg2.setUInt(id, "emu_memcard", 0);
m_gcfg2.setOptBool(id, "cc_rumble", 2);// default
m_gcfg2.setOptBool(id, "native_ctl", 2);// default
m_gcfg2.setOptBool(id, "triforce_arcade", 0);
m_gcfg2.setOptBool(id, "skip_ipl", 0);
m_gcfg2.setOptBool(id, "patch_pal50", 0);
m_gcfg2.setOptBool(id, "bba_emu", 0);
m_gcfg2.setUInt(id, "net_profile", 0);
m_gcfg2.setInt(id, "nin_width", 127);
m_gcfg2.setInt(id, "nin_pos", 127);
}
void CMenu::_hideConfigGCGame(bool instant)
{
m_btnMgr.hide(m_gameSettingsLblTitle, instant);
@ -106,7 +129,7 @@ void CMenu::_showConfigGCGame()
GCLoader = min(m_gcfg2.getUInt(id, "gc_loader", 0), ARRAY_SIZE(CMenu::_GCLoader) - 1u);
GCLoader = (GCLoader == 0) ? min(m_cfg.getUInt(GC_DOMAIN, "default_loader", 1), ARRAY_SIZE(CMenu::_GlobalGCLoaders) - 1u) : GCLoader-1;
if(GCLoader == DEVOLUTION)
m_configGCGameMaxPgs = 2;
m_configGCGameMaxPgs = 3;
else
m_configGCGameMaxPgs = 6;
@ -119,8 +142,8 @@ void CMenu::_showConfigGCGame()
{
m_btnMgr.setText(m_configLbl1, _t("cfgg58", L"Adult only"));
m_btnMgr.setText(m_configLbl2, _t("cfgg35", L"GameCube Loader"));
m_btnMgr.setText(m_configLbl3, _t("cfgg2", L"Video mode"));
m_btnMgr.setText(m_configLbl4, _t("cfgg3", L"Language"));
m_btnMgr.setText(m_configLbl3, _t("cfgg3", L"Language"));
m_btnMgr.setText(m_configLbl4, _t("cfgg2", L"Video mode"));
m_btnMgr.setText(m_configBtn1, m_gcfg1.getBool("ADULTONLY", id, false) ? _t("yes", L"Yes") : _t("no", L"No"));
@ -212,6 +235,15 @@ void CMenu::_showConfigGCGame()
}
}
else if(m_configGCGamePage == 3)
{
if(GCLoader == DEVOLUTION)
{
m_btnMgr.setText(m_configLbl1, _t("cfgg64", L"Reset Settings to Defaults"));
m_btnMgr.setText(m_configBtn1, _t("yes", L"Yes"));
m_btnMgr.show(m_configLbl1);
m_btnMgr.show(m_configBtn1);
}
else
{
m_btnMgr.setText(m_configLbl1, _t("cfgg46", L"WiiU Widescreen"));
m_btnMgr.setText(m_configLbl2, _t("cfgg47", L"Emulated MemCard"));
@ -241,6 +273,7 @@ void CMenu::_showConfigGCGame()
m_btnMgr.show(m_configLbl4);
m_btnMgr.show(m_configBtn4);
}
}
else if(m_configGCGamePage == 4)
{
m_btnMgr.setText(m_configLbl1, _t("cfgg52", L"Wiimote CC Rumble"));
@ -311,6 +344,7 @@ void CMenu::_showConfigGCGame()
{
m_btnMgr.setText(m_configLbl1, _t("cfgg59", L"BBA Emulation"));
m_btnMgr.setText(m_configLbl2, _t("cfgg60", L"BBA Net Profile"));
m_btnMgr.setText(m_configLbl3, _t("cfgg64", L"Reset Settings to Defaults"));
m_btnMgr.setText(m_configBtn1, _optBoolToString(m_gcfg2.getOptBool(id, "bba_emu", 0)));
@ -327,6 +361,10 @@ void CMenu::_showConfigGCGame()
m_btnMgr.show(m_configLbl2Val);
m_btnMgr.show(m_configBtn2P);
m_btnMgr.show(m_configBtn2M);
m_btnMgr.setText(m_configBtn3, _t("yes", L"Yes"));
m_btnMgr.show(m_configLbl3);
m_btnMgr.show(m_configBtn3);
}
}
@ -489,10 +527,38 @@ void CMenu::_configGCGame(const dir_discHdr *hdr, bool disc)
//Widescreen Patch
//Manage Cover and Banner
if(m_btnMgr.selected(m_configBtn1))
{
if(GCLoader == DEVOLUTION)
{
/*m_gcfg2.setUInt(id, "language", 0);
m_gcfg2.setUInt(id, "video_mode", 0);
m_gcfg2.setOptBool(id, "led", 0);
m_gcfg2.setOptBool(id, "devo_memcard_emu", 2);// default
m_gcfg2.setOptBool(id, "widescreen", 0);
m_gcfg2.setUInt(id, "debugger", 0);
m_gcfg2.setOptBool(id, "deflicker", 0);
m_gcfg2.setOptBool(id, "cheat", 0);
m_gcfg2.setOptBool(id, "wiiu_widescreen", 0);
m_gcfg2.setUInt(id, "emu_memcard", 0);
m_gcfg2.setOptBool(id, "cc_rumble", 2);// default
m_gcfg2.setOptBool(id, "native_ctl", 2);// default
m_gcfg2.setOptBool(id, "triforce_arcade", 0);
m_gcfg2.setOptBool(id, "skip_ipl", 0);
m_gcfg2.setOptBool(id, "patch_pal50", 0);
m_gcfg2.setOptBool(id, "bba_emu", 0);
m_gcfg2.setUInt(id, "net_profile", 0);
m_gcfg2.setInt(id, "nin_width", 127);
m_gcfg2.setInt(id, "nin_pos", 127);*/
_resetGCSettings(id);
_error(_t("dlmsg14", L"Done."));
_showConfigGCGame();
}
else
{
m_gcfg2.setBool(id, "wiiu_widescreen", !m_gcfg2.getBool(id, "wiiu_widescreen", 0));
m_btnMgr.setText(m_configBtn1, _optBoolToString(m_gcfg2.getOptBool(id, "wiiu_widescreen", 0)));
}
}
else if(m_btnMgr.selected(m_configBtn2P) || m_btnMgr.selected(m_configBtn2M))
{
s8 direction = m_btnMgr.selected(m_configBtn2P) ? 1 : -1;
@ -632,6 +698,31 @@ void CMenu::_configGCGame(const dir_discHdr *hdr, bool disc)
else
m_btnMgr.setText(m_configLbl2Val, wfmt(L"%i", netprofile));
}
else if(m_btnMgr.selected(m_configBtn3))
{
/*m_gcfg2.setUInt(id, "language", 0);
m_gcfg2.setUInt(id, "video_mode", 0);
m_gcfg2.setOptBool(id, "led", 0);
m_gcfg2.setOptBool(id, "devo_memcard_emu", 2);// default
m_gcfg2.setOptBool(id, "widescreen", 0);
m_gcfg2.setUInt(id, "debugger", 0);
m_gcfg2.setOptBool(id, "deflicker", 0);
m_gcfg2.setOptBool(id, "cheat", 0);
m_gcfg2.setOptBool(id, "wiiu_widescreen", 0);
m_gcfg2.setUInt(id, "emu_memcard", 0);
m_gcfg2.setOptBool(id, "cc_rumble", 2);// default
m_gcfg2.setOptBool(id, "native_ctl", 2);// default
m_gcfg2.setOptBool(id, "triforce_arcade", 0);
m_gcfg2.setOptBool(id, "skip_ipl", 0);
m_gcfg2.setOptBool(id, "patch_pal50", 0);
m_gcfg2.setOptBool(id, "bba_emu", 0);
m_gcfg2.setUInt(id, "net_profile", 0);
m_gcfg2.setInt(id, "nin_width", 127);
m_gcfg2.setInt(id, "nin_pos", 127);*/
_resetGCSettings(id);
_error(_t("dlmsg14", L"Done."));
_showConfigGCGame();
}
}
}
}

View File

@ -41,7 +41,7 @@ void CMenu::_error(const wstringEx &msg)
_hideGameInfo();
_hideConfigGame();
_hideWaitMessage();
m_btnMgr.setText(m_errorLblMessage, msg, true);
m_btnMgr.setText(m_errorLblMessage, msg);
_showError();
gprintf("error msg: %s\n", msg.toUTF8().c_str());

View File

@ -430,6 +430,12 @@ void CMenu::_game(bool launch)
_configGame(hdr);
m_banner.ToggleGameSettings();//reset brightness
m_banner.ToggleZoom();//de zoom to small
/*if(m_newGame)
{
m_newGame = false;
startGameSound = 1;
_playGameSound();
}*/
}
_showGame();
}

View File

@ -168,6 +168,7 @@ cfgg60=BBA Net Profile
cfgg61=Deflicker Filter
cfgg62=Reload cached cover
cfgg63=Converting cover please wait...
cfgg64=Reset Settings to Defaults
cfgg4=Patch country strings
cfgg5=Ocarina
cfgg6=