mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-01 00:55:06 +01:00
-added DML global options to set language and
video mode for all games, per game is still possible to set -updated english.ini with new strings
This commit is contained in:
parent
5aef0bed27
commit
83b8c5dcf7
@ -211,6 +211,16 @@ private:
|
||||
u32 m_config3LblVideo;
|
||||
u32 m_config3BtnVideoP;
|
||||
u32 m_config3BtnVideoM;
|
||||
|
||||
u32 m_config3LblDMLGameLanguage;
|
||||
u32 m_config3LblDMLLanguage;
|
||||
u32 m_config3BtnDMLLanguageP;
|
||||
u32 m_config3BtnDMLLanguageM;
|
||||
u32 m_config3LblDMLGameVideo;
|
||||
u32 m_config3LblDMLVideo;
|
||||
u32 m_config3BtnDMLVideoP;
|
||||
u32 m_config3BtnDMLVideoM;
|
||||
|
||||
u32 m_config3LblOcarina;
|
||||
u32 m_config3BtnOcarina;
|
||||
u32 m_config3LblAsyncNet;
|
||||
@ -949,8 +959,12 @@ private:
|
||||
static const string _translations[23];
|
||||
static const SOption _languages[11];
|
||||
static const SOption _videoModes[7];
|
||||
static const SOption _DMLvideoModes[3];
|
||||
static const SOption _GClanguages[7];
|
||||
|
||||
static const SOption _GlobalDMLvideoModes[3];
|
||||
static const SOption _GlobalGClanguages[7];
|
||||
static const SOption _DMLvideoModes[4];
|
||||
static const SOption _GClanguages[8];
|
||||
|
||||
static const SOption _NandEmu[3];
|
||||
static const SOption _SaveEmu[4];
|
||||
static const SOption _GlobalSaveEmu[3];
|
||||
|
@ -20,7 +20,9 @@ void CMenu::_hideConfig3(bool instant)
|
||||
m_btnMgr.hide(m_configLblPage, instant);
|
||||
m_btnMgr.hide(m_configBtnPageM, instant);
|
||||
m_btnMgr.hide(m_configBtnPageP, instant);
|
||||
//
|
||||
|
||||
if(m_current_view != COVERFLOW_DML)
|
||||
{
|
||||
m_btnMgr.hide(m_config3LblGameLanguage, instant);
|
||||
m_btnMgr.hide(m_config3LblLanguage, instant);
|
||||
m_btnMgr.hide(m_config3BtnLanguageP, instant);
|
||||
@ -29,6 +31,18 @@ void CMenu::_hideConfig3(bool instant)
|
||||
m_btnMgr.hide(m_config3LblVideo, instant);
|
||||
m_btnMgr.hide(m_config3BtnVideoP, instant);
|
||||
m_btnMgr.hide(m_config3BtnVideoM, instant);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_btnMgr.hide(m_config3LblDMLGameLanguage, instant);
|
||||
m_btnMgr.hide(m_config3LblDMLLanguage, instant);
|
||||
m_btnMgr.hide(m_config3BtnDMLLanguageP, instant);
|
||||
m_btnMgr.hide(m_config3BtnDMLLanguageM, instant);
|
||||
m_btnMgr.hide(m_config3LblDMLGameVideo, instant);
|
||||
m_btnMgr.hide(m_config3LblDMLVideo, instant);
|
||||
m_btnMgr.hide(m_config3BtnDMLVideoP, instant);
|
||||
m_btnMgr.hide(m_config3BtnDMLVideoM, instant);
|
||||
}
|
||||
m_btnMgr.hide(m_config3LblAsyncNet, instant);
|
||||
m_btnMgr.hide(m_config3BtnAsyncNet, instant);
|
||||
m_btnMgr.hide(m_config3LblOcarina, instant);
|
||||
@ -46,7 +60,9 @@ void CMenu::_showConfig3(void)
|
||||
m_btnMgr.show(m_configLblPage);
|
||||
m_btnMgr.show(m_configBtnPageM);
|
||||
m_btnMgr.show(m_configBtnPageP);
|
||||
//
|
||||
|
||||
if(m_current_view != COVERFLOW_DML)
|
||||
{
|
||||
m_btnMgr.show(m_config3LblGameLanguage);
|
||||
m_btnMgr.show(m_config3LblLanguage);
|
||||
m_btnMgr.show(m_config3BtnLanguageP);
|
||||
@ -55,6 +71,18 @@ void CMenu::_showConfig3(void)
|
||||
m_btnMgr.show(m_config3LblVideo);
|
||||
m_btnMgr.show(m_config3BtnVideoP);
|
||||
m_btnMgr.show(m_config3BtnVideoM);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_btnMgr.show(m_config3LblDMLGameLanguage);
|
||||
m_btnMgr.show(m_config3LblDMLLanguage);
|
||||
m_btnMgr.show(m_config3BtnDMLLanguageP);
|
||||
m_btnMgr.show(m_config3BtnDMLLanguageM);
|
||||
m_btnMgr.show(m_config3LblDMLGameVideo);
|
||||
m_btnMgr.show(m_config3LblDMLVideo);
|
||||
m_btnMgr.show(m_config3BtnDMLVideoP);
|
||||
m_btnMgr.show(m_config3BtnDMLVideoM);
|
||||
}
|
||||
m_btnMgr.show(m_config3LblAsyncNet);
|
||||
m_btnMgr.show(m_config3BtnAsyncNet);
|
||||
m_btnMgr.show(m_config3LblOcarina);
|
||||
@ -63,14 +91,26 @@ void CMenu::_showConfig3(void)
|
||||
for (u32 i = 0; i < ARRAY_SIZE(m_config3LblUser); ++i)
|
||||
if (m_config3LblUser[i] != -1u)
|
||||
m_btnMgr.show(m_config3LblUser[i]);
|
||||
//
|
||||
|
||||
m_btnMgr.setText(m_configLblPage, wfmt(L"%i / %i", g_curPage, m_locked ? g_curPage : CMenu::_nbCfgPages));
|
||||
int i = min(max(0, m_cfg.getInt("GENERAL", "video_mode", 0)), (int)ARRAY_SIZE(CMenu::_videoModes) - 1);
|
||||
int i;
|
||||
|
||||
if(m_current_view != COVERFLOW_DML)
|
||||
{
|
||||
i = min(max(0, m_cfg.getInt("GENERAL", "video_mode", 0)), (int)ARRAY_SIZE(CMenu::_videoModes) - 1);
|
||||
m_btnMgr.setText(m_config3LblVideo, _t(CMenu::_videoModes[i].id, CMenu::_videoModes[i].text));
|
||||
i = min(max(0, m_cfg.getInt("GENERAL", "game_language", 0)), (int)ARRAY_SIZE(CMenu::_languages) - 1);
|
||||
|
||||
i = min(max(0, m_cfg.getInt("GENERAL", "game_language", 0)), (int)ARRAY_SIZE(CMenu::_languages) - 1);
|
||||
m_btnMgr.setText(m_config3LblLanguage, _t(CMenu::_languages[i].id, CMenu::_languages[i].text));
|
||||
}
|
||||
else
|
||||
{
|
||||
i = min(max(0, m_cfg.getInt("DML", "video_mode", 0)), (int)ARRAY_SIZE(CMenu::_GlobalDMLvideoModes) - 1);
|
||||
m_btnMgr.setText(m_config3LblDMLVideo, _t(CMenu::_GlobalDMLvideoModes[i].id, CMenu::_GlobalDMLvideoModes[i].text));
|
||||
|
||||
i = min(max(0, m_cfg.getInt("DML", "game_language", 0)), (int)ARRAY_SIZE(CMenu::_GlobalGClanguages) - 1);
|
||||
m_btnMgr.setText(m_config3LblDMLLanguage, _t(CMenu::_GlobalGClanguages[i].id, CMenu::_GlobalGClanguages[i].text));
|
||||
}
|
||||
|
||||
m_btnMgr.setText(m_config3BtnAsyncNet, m_cfg.getBool("GENERAL", "async_network", false) ? _t("on", L"On") : _t("off", L"Off"));
|
||||
|
||||
@ -119,6 +159,18 @@ int CMenu::_config3(void)
|
||||
m_cfg.setInt("GENERAL", "video_mode", (int)loopNum((u32)m_cfg.getInt("GENERAL", "video_mode", 0) + direction, ARRAY_SIZE(CMenu::_videoModes)));
|
||||
_showConfig3();
|
||||
}
|
||||
else if (m_btnMgr.selected(m_config3BtnDMLLanguageP) || m_btnMgr.selected(m_config3BtnDMLLanguageM))
|
||||
{
|
||||
s8 direction = m_btnMgr.selected(m_config3BtnDMLLanguageP) ? 1 : -1;
|
||||
m_cfg.setInt("DML", "game_language", (int)loopNum((u32)m_cfg.getInt("DML", "game_language", 0) + direction, ARRAY_SIZE(CMenu::_GlobalGClanguages)));
|
||||
_showConfig3();
|
||||
}
|
||||
else if (m_btnMgr.selected(m_config3BtnDMLVideoP) || m_btnMgr.selected(m_config3BtnDMLVideoM))
|
||||
{
|
||||
s8 direction = m_btnMgr.selected(m_config3BtnDMLVideoP) ? 1 : -1;
|
||||
m_cfg.setInt("DML", "video_mode", (int)loopNum((u32)m_cfg.getInt("DML", "video_mode", 0) + direction, ARRAY_SIZE(CMenu::_GlobalDMLvideoModes)));
|
||||
_showConfig3();
|
||||
}
|
||||
else if (m_btnMgr.selected(m_config3BtnAsyncNet))
|
||||
{
|
||||
m_cfg.setBool("GENERAL", "async_network", !m_cfg.getBool("GENERAL", "async_network", false));
|
||||
@ -147,11 +199,21 @@ void CMenu::_initConfig3Menu(CMenu::SThemeData &theme)
|
||||
m_config3LblLanguage = _addLabel(theme, "CONFIG3/GAME_LANG_BTN", theme.btnFont, L"", 386, 190, 158, 56, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
|
||||
m_config3BtnLanguageM = _addPicButton(theme, "CONFIG3/GAME_LANG_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 330, 190, 56, 56);
|
||||
m_config3BtnLanguageP = _addPicButton(theme, "CONFIG3/GAME_LANG_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 544, 190, 56, 56);
|
||||
|
||||
m_config3LblDMLGameVideo = _addLabel(theme, "CONFIG3/DML_VIDEO", theme.lblFont, L"", 40, 130, 290, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_config3LblDMLVideo = _addLabel(theme, "CONFIG3/DML_VIDEO_BTN", theme.btnFont, L"", 386, 130, 158, 56, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
|
||||
m_config3BtnDMLVideoM = _addPicButton(theme, "CONFIG3/DML_VIDEO_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 330, 130, 56, 56);
|
||||
m_config3BtnDMLVideoP = _addPicButton(theme, "CONFIG3/DML_VIDEO_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 544, 130, 56, 56);
|
||||
m_config3LblDMLGameLanguage = _addLabel(theme, "CONFIG3/DML_LANG", theme.lblFont, L"", 40, 190, 290, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_config3LblDMLLanguage = _addLabel(theme, "CONFIG3/DML_LANG_BTN", theme.btnFont, L"", 386, 190, 158, 56, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
|
||||
m_config3BtnDMLLanguageM = _addPicButton(theme, "CONFIG3/DML_LANG_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 330, 190, 56, 56);
|
||||
m_config3BtnDMLLanguageP = _addPicButton(theme, "CONFIG3/DML_LANG_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 544, 190, 56, 56);
|
||||
|
||||
m_config3LblAsyncNet = _addLabel(theme, "CONFIG3/ASYNCNET", theme.lblFont, L"", 40, 250, 340, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_config3BtnAsyncNet = _addButton(theme, "CONFIG3/ASYNCNET_BTN", theme.btnFont, L"", 330, 250, 270, 56, theme.btnFontColor);
|
||||
m_config3LblOcarina = _addLabel(theme, "CONFIG3/OCARINA", theme.lblFont, L"", 40, 310, 290, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_config3BtnOcarina = _addButton(theme, "CONFIG3/OCARINA_BTN", theme.btnFont, L"", 330, 310, 270, 56, theme.btnFontColor);
|
||||
//
|
||||
|
||||
_setHideAnim(m_config3LblGameVideo, "CONFIG3/VIDEO", 100, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_config3LblVideo, "CONFIG3/VIDEO_BTN", 0, 0, 1.f, -1.f);
|
||||
_setHideAnim(m_config3BtnVideoM, "CONFIG3/VIDEO_MINUS", 0, 0, 1.f, -1.f);
|
||||
@ -160,6 +222,16 @@ void CMenu::_initConfig3Menu(CMenu::SThemeData &theme)
|
||||
_setHideAnim(m_config3LblLanguage, "CONFIG3/GAME_LANG_BTN", 0, 0, 1.f, -1.f);
|
||||
_setHideAnim(m_config3BtnLanguageM, "CONFIG3/GAME_LANG_MINUS", 0, 0, 1.f, -1.f);
|
||||
_setHideAnim(m_config3BtnLanguageP, "CONFIG3/GAME_LANG_PLUS", 0, 0, 1.f, -1.f);
|
||||
|
||||
_setHideAnim(m_config3LblDMLGameVideo, "CONFIG3/DML_VIDEO", 100, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_config3LblDMLVideo, "CONFIG3/DML_VIDEO_BTN", 0, 0, 1.f, -1.f);
|
||||
_setHideAnim(m_config3BtnDMLVideoM, "CONFIG3/DML_VIDEO_MINUS", 0, 0, 1.f, -1.f);
|
||||
_setHideAnim(m_config3BtnDMLVideoP, "CONFIG3/DML_VIDEO_PLUS", 0, 0, 1.f, -1.f);
|
||||
_setHideAnim(m_config3LblDMLGameLanguage, "CONFIG3/DML_LANG", 100, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_config3LblDMLLanguage, "CONFIG3/DML_LANG_BTN", 0, 0, 1.f, -1.f);
|
||||
_setHideAnim(m_config3BtnDMLLanguageM, "CONFIG3/DML_LANG_MINUS", 0, 0, 1.f, -1.f);
|
||||
_setHideAnim(m_config3BtnDMLLanguageP, "CONFIG3/DML_LANG_PLUS", 0, 0, 1.f, -1.f);
|
||||
|
||||
_setHideAnim(m_config3LblAsyncNet, "CONFIG3/ASYNCNET", 100, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_config3BtnAsyncNet, "CONFIG3/ASYNCNET_BTN", 0, 0, 1.f, -1.f);
|
||||
_setHideAnim(m_config3LblOcarina, "CONFIG3/OCARINA", 100, 0, -2.f, 0.f);
|
||||
@ -172,6 +244,10 @@ void CMenu::_textConfig3(void)
|
||||
{
|
||||
m_btnMgr.setText(m_config3LblGameVideo, _t("cfgb3", L"Default video mode"));
|
||||
m_btnMgr.setText(m_config3LblGameLanguage, _t("cfgb4", L"Default game language"));
|
||||
m_btnMgr.setText(m_config3LblDMLGameVideo, _t("cfgb5", L"Default DML video mode"));
|
||||
m_btnMgr.setText(m_config3LblDMLGameLanguage, _t("cfgb6", L"Default DML game language"));
|
||||
|
||||
m_btnMgr.setText(m_config3LblAsyncNet, _t("cfgp3", L"Init network on boot"));
|
||||
m_btnMgr.setText(m_config3LblOcarina, _t("cfgb1", L"Ocarina"));
|
||||
}
|
||||
|
||||
|
@ -106,14 +106,32 @@ const CMenu::SOption CMenu::_videoModes[7] = {
|
||||
{ "vidprog", L"Progressive" }
|
||||
};
|
||||
|
||||
const CMenu::SOption CMenu::_DMLvideoModes[3] = {
|
||||
{ "DMLdef", L"Default" },
|
||||
const CMenu::SOption CMenu::_GlobalDMLvideoModes[3] = {
|
||||
{ "DMLdefG", L"Game" },
|
||||
{ "DMLpal", L"PAL 576i" },
|
||||
{ "DMLntsc", L"NTSC 480i" },
|
||||
{ "DMLntsc", L"NTSC 480i" }
|
||||
};
|
||||
|
||||
const CMenu::SOption CMenu::_GClanguages[7] = {
|
||||
const CMenu::SOption CMenu::_DMLvideoModes[4] = {
|
||||
{ "DMLdef", L"Default" },
|
||||
{ "DMLdefG", L"Game" },
|
||||
{ "DMLpal", L"PAL 576i" },
|
||||
{ "DMLntsc", L"NTSC 480i" }
|
||||
};
|
||||
|
||||
const CMenu::SOption CMenu::_GlobalGClanguages[7] = {
|
||||
{ "lngsys", L"System" },
|
||||
{ "lngeng", L"English" },
|
||||
{ "lngger", L"German" },
|
||||
{ "lngfre", L"French" },
|
||||
{ "lngspa", L"Spanish" },
|
||||
{ "lngita", L"Italian" },
|
||||
{ "lngdut", L"Dutch" }
|
||||
};
|
||||
|
||||
const CMenu::SOption CMenu::_GClanguages[8] = {
|
||||
{ "lngdef", L"Default" },
|
||||
{ "lngsys", L"System" },
|
||||
{ "lngeng", L"English" },
|
||||
{ "lngger", L"German" },
|
||||
{ "lngfre", L"French" },
|
||||
@ -606,6 +624,7 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool DML)
|
||||
{
|
||||
Nand::Instance()->Disable_Emu();
|
||||
u8 DMLvideoMode = 0;
|
||||
u8 GClanguage = 0;
|
||||
|
||||
if(has_enabled_providers() && _initNetwork() == 0)
|
||||
add_game_to_card((char *)hdr->hdr.id);
|
||||
@ -627,6 +646,17 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool DML)
|
||||
#endif
|
||||
|
||||
DMLvideoMode = min((u32)m_gcfg2.getInt((char *)hdr->hdr.id, "dml_video_mode", 0), ARRAY_SIZE(CMenu::_DMLvideoModes) - 1u);
|
||||
if(DMLvideoMode == 0)
|
||||
DMLvideoMode = min((u32)m_cfg.getInt("DML", "video_mode", 0), ARRAY_SIZE(CMenu::_GlobalDMLvideoModes) - 1u);
|
||||
else
|
||||
DMLvideoMode--;
|
||||
GClanguage = min((u32)m_gcfg2.getInt((char *)hdr->hdr.id, "gc_language", 0), ARRAY_SIZE(CMenu::_GClanguages) - 1u);
|
||||
if(GClanguage == 0)
|
||||
GClanguage = min((u32)m_cfg.getInt("DML", "game_language", 0), ARRAY_SIZE(CMenu::_GlobalGClanguages) - 1u);
|
||||
else
|
||||
GClanguage--;
|
||||
gprintf("gc lang: %i; %i\n",GClanguage, m_cfg.getInt("DML", "game_language", 0));
|
||||
|
||||
m_cfg.setString("DML", "current_item", (char *)hdr->hdr.id);
|
||||
m_gcfg1.setInt("PLAYCOUNT", (char *)hdr->hdr.id, m_gcfg1.getInt("PLAYCOUNT", (char *)hdr->hdr.id, 0) + 1);
|
||||
m_gcfg1.setUInt("LASTPLAYED", (char *)hdr->hdr.id, time(NULL));
|
||||
@ -648,8 +678,6 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool DML)
|
||||
ICInvalidateRange((void *)(0x80001800), 4);
|
||||
}
|
||||
|
||||
u8 GClanguage = min((u32)m_gcfg2.getInt((char *)hdr->hdr.id, "gc_language", 0), ARRAY_SIZE(CMenu::_GClanguages) - 1u);
|
||||
|
||||
memcpy((char *)0x80000000, (char *)hdr->hdr.id, 6);
|
||||
if((((char)hdr->hdr.id[3] == 'P') && (DMLvideoMode == 0)) || (DMLvideoMode == 1))
|
||||
{
|
||||
|
@ -38,6 +38,8 @@ cfga7=Theme
|
||||
cfgb1=Ocarina
|
||||
cfgb3=Default video mode
|
||||
cfgb4=Default game language
|
||||
cfgb5=Default DML video mode
|
||||
cfgb6=Default DML game language
|
||||
cfgc1=Exit To
|
||||
cfgc2=Adjust TV width
|
||||
cfgc3=Adjust TV height
|
||||
@ -131,6 +133,7 @@ dlmsg7=Listing covers to download...
|
||||
dlmsg8=Full cover not found. Downloading from %s
|
||||
dlmsg9=%i/%i files downloaded. %i are front covers only.
|
||||
DMLdef=Default
|
||||
DMLdefG=Game
|
||||
DMLntsc=NTSC 480i
|
||||
DMLpal=PAL 576i
|
||||
gameinfo1=Developer: %s
|
||||
@ -153,6 +156,7 @@ hooktype6=OSSleepThread
|
||||
hooktype7=AXNextFrame
|
||||
ios=IOS%i base %s
|
||||
lngdef=Default
|
||||
lngsys=System
|
||||
lngdut=Dutch
|
||||
lngeng=English
|
||||
lngfre=French
|
||||
|
Loading…
Reference in New Issue
Block a user