mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-27 13:44:15 +01:00
Added an Age Lock to the parental control menu.
You can select an age from 2-19, where any game rated above is not displayed. It uses the age from the region of the game. 19 is all games. 2 is basically none, because the rating systems start at 3. This operates independently from the current per game lock, so you can still use both. Meaning both conditions have to allow the game, before it will display. You can override the rating by creating an age_lock.ini file. Just add the id under the domain heading and set it to an age. To set Call of Duty: Black Ops to an age of 5 you would enter this: [GAMES] SC7E52=5 There is also an age_lock_default in the wiiflow.ini file under [GENERAL]. This will allow you to specify a default rating for games with no rating info.
This commit is contained in:
parent
fc9aed8352
commit
2f97266e88
@ -13,6 +13,12 @@
|
||||
#define CAT_FILENAME "categories.ini"
|
||||
#define TITLES_FILENAME "titles.ini"
|
||||
#define CTITLES_FILENAME "custom_titles.ini"
|
||||
#define AGE_LOCK_FILENAME "age_lock.ini"
|
||||
#define TITLES_DUMP_FILENAME "titlesdump.ini"
|
||||
#define GAME_SETTINGS1_FILENAME "gameconfig1.ini"
|
||||
#define GAME_SETTINGS2_FILENAME "gameconfig2.ini"
|
||||
|
||||
#define AGE_LOCK_DEFAULT 13
|
||||
|
||||
#define DEVELOPERS "r-win, OverjoY, FIX94"
|
||||
#define PAST_DEVELOPERS "Hibernatus, Narolez, Hulk, Miigotu"
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "loader/playlog.h"
|
||||
#include "gc/fileOps.h"
|
||||
#include "Gekko.h"
|
||||
#include "GameTDB.hpp"
|
||||
|
||||
// Sounds
|
||||
extern const u8 click_wav[];
|
||||
@ -1469,20 +1470,34 @@ void CMenu::_addUserLabels(CMenu::SThemeData &theme, u32 *ids, u32 start, u32 si
|
||||
|
||||
void CMenu::_initCF(void)
|
||||
{
|
||||
Config m_dump;
|
||||
Config dump, gameAgeList;
|
||||
GameTDB gametdb;
|
||||
const char *domain = _domainFromView();
|
||||
const char *catviews = m_cat.getString(domain, "categories", "100000000000000000000").c_str();
|
||||
|
||||
m_cf.clear();
|
||||
m_cf.reserve(m_gameList.size());
|
||||
vector<bool> EnabledPlugins;
|
||||
if(m_current_view == COVERFLOW_EMU)
|
||||
EnabledPlugins = m_plugin.GetEnabledPlugins(m_cfg);
|
||||
|
||||
m_gamelistdump = m_cfg.getBool(domain, "dump_list", true);
|
||||
if(m_gamelistdump) m_dump.load(fmt("%s/titlesdump.ini", m_settingsDir.c_str()));
|
||||
bool dumpGameLst = m_cfg.getBool(domain, "dump_list", true);
|
||||
if(dumpGameLst) dump.load(fmt("%s/" TITLES_DUMP_FILENAME, m_settingsDir.c_str()));
|
||||
|
||||
m_gcfg1.load(fmt("%s/" GAME_SETTINGS1_FILENAME, m_settingsDir.c_str()));
|
||||
int ageLock = m_cfg.getInt("GENERAL", "age_lock");
|
||||
if (ageLock < 2 || ageLock > 19)
|
||||
ageLock = 19;
|
||||
|
||||
if (ageLock < 19)
|
||||
{
|
||||
gameAgeList.load(fmt("%s/" AGE_LOCK_FILENAME, m_settingsDir.c_str()));
|
||||
if (m_current_view == COVERFLOW_USB || m_current_view == COVERFLOW_CHANNEL)
|
||||
{
|
||||
gametdb.OpenFile(sfmt("%s/wiitdb.xml", m_settingsDir.c_str()).c_str());
|
||||
gametdb.SetLanguageCode(m_loc.getString(m_curLanguage, "gametdb_code", "EN").c_str());
|
||||
}
|
||||
}
|
||||
|
||||
m_gcfg1.load(fmt("%s/gameconfig1.ini", m_settingsDir.c_str()));
|
||||
string id;
|
||||
for (u32 i = 0; i < m_gameList.size(); ++i)
|
||||
{
|
||||
@ -1507,7 +1522,83 @@ void CMenu::_initCF(void)
|
||||
idcats.append((21-idcats.length()), '0');
|
||||
m_cat.setString("CATEGORIES", id, idcats);
|
||||
}
|
||||
if ((!m_favorites || m_gcfg1.getBool("FAVORITES", id, false)) && (!m_locked || !m_gcfg1.getBool("ADULTONLY", id, false)))
|
||||
|
||||
bool ageLocked = false;
|
||||
if (ageLock < 19)
|
||||
{
|
||||
int ageRated = min(max(gameAgeList.getInt(domain, id), 0), 19);
|
||||
|
||||
if (ageRated == 0 && (m_current_view == COVERFLOW_USB || m_current_view == COVERFLOW_CHANNEL))
|
||||
{
|
||||
GameXMLInfo gameinfo;
|
||||
if (gametdb.IsLoaded() && gametdb.GetGameXMLInfo(id.c_str(), &gameinfo))
|
||||
{
|
||||
switch(gameinfo.RatingType)
|
||||
{
|
||||
case GAMETDB_RATING_TYPE_CERO:
|
||||
if (gameinfo.RatingValue == "A")
|
||||
ageRated = 3;
|
||||
else if (gameinfo.RatingValue == "B")
|
||||
ageRated = 12;
|
||||
else if (gameinfo.RatingValue == "D")
|
||||
ageRated = 15;
|
||||
else if (gameinfo.RatingValue == "C")
|
||||
ageRated = 17;
|
||||
else if (gameinfo.RatingValue == "Z")
|
||||
ageRated = 18;
|
||||
break;
|
||||
case GAMETDB_RATING_TYPE_ESRB:
|
||||
if (gameinfo.RatingValue == "E")
|
||||
ageRated = 6;
|
||||
else if (gameinfo.RatingValue == "EC")
|
||||
ageRated = 3;
|
||||
else if (gameinfo.RatingValue == "E10+")
|
||||
ageRated = 10;
|
||||
else if (gameinfo.RatingValue == "T")
|
||||
ageRated = 13;
|
||||
else if (gameinfo.RatingValue == "M")
|
||||
ageRated = 17;
|
||||
else if (gameinfo.RatingValue == "AO")
|
||||
ageRated = 18;
|
||||
break;
|
||||
case GAMETDB_RATING_TYPE_PEGI:
|
||||
if (gameinfo.RatingValue == "3")
|
||||
ageRated = 3;
|
||||
else if (gameinfo.RatingValue == "7")
|
||||
ageRated = 7;
|
||||
else if (gameinfo.RatingValue == "12")
|
||||
ageRated = 12;
|
||||
else if (gameinfo.RatingValue == "16")
|
||||
ageRated = 16;
|
||||
else if (gameinfo.RatingValue == "18")
|
||||
ageRated = 18;
|
||||
break;
|
||||
case GAMETDB_RATING_TYPE_GRB:
|
||||
if (gameinfo.RatingValue == "A")
|
||||
ageRated = 3;
|
||||
else if (gameinfo.RatingValue == "12")
|
||||
ageRated = 12;
|
||||
else if (gameinfo.RatingValue == "15")
|
||||
ageRated = 15;
|
||||
else if (gameinfo.RatingValue == "18")
|
||||
ageRated = 18;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ageRated == 0)
|
||||
ageRated = min(max(m_cfg.getInt("GENERAL", "age_lock_default", AGE_LOCK_DEFAULT), 2), 19);
|
||||
if (ageRated == 0)
|
||||
ageRated = AGE_LOCK_DEFAULT;
|
||||
if (ageRated > ageLock)
|
||||
ageLocked = true;
|
||||
}
|
||||
|
||||
if ((!m_favorites || m_gcfg1.getBool("FAVORITES", id, false))
|
||||
&& (!m_locked || !m_gcfg1.getBool("ADULTONLY", id, false))
|
||||
&& !ageLocked)
|
||||
{
|
||||
if (catviews[0] == '0')
|
||||
{
|
||||
@ -1524,8 +1615,8 @@ void CMenu::_initCF(void)
|
||||
int playcount = m_gcfg1.getInt("PLAYCOUNT", id, 0);
|
||||
unsigned int lastPlayed = m_gcfg1.getUInt("LASTPLAYED", id, 0);
|
||||
|
||||
if(m_gamelistdump)
|
||||
m_dump.setWString(domain, id, m_gameList[i].title);
|
||||
if(dumpGameLst)
|
||||
dump.setWString(domain, id, m_gameList[i].title);
|
||||
|
||||
if (m_current_view == COVERFLOW_EMU)
|
||||
{
|
||||
@ -1560,9 +1651,9 @@ void CMenu::_initCF(void)
|
||||
}
|
||||
}
|
||||
m_gcfg1.unload();
|
||||
if (m_gamelistdump)
|
||||
if (dumpGameLst)
|
||||
{
|
||||
m_dump.save(true);
|
||||
dump.save(true);
|
||||
m_cfg.setBool(domain, "dump_list", false);
|
||||
}
|
||||
m_cf.setBoxMode(m_cfg.getBool("GENERAL", "box_mode", true));
|
||||
|
@ -76,7 +76,6 @@ private:
|
||||
u32 m_base_font_size;
|
||||
u8 m_aa;
|
||||
bool m_directLaunch;
|
||||
bool m_gamelistdump;
|
||||
bool m_locked;
|
||||
bool m_favorites;
|
||||
s16 m_showtimer;
|
||||
@ -394,6 +393,8 @@ private:
|
||||
u32 m_codeBtnKey[10];
|
||||
u32 m_codeBtnBack;
|
||||
u32 m_codeBtnErase;
|
||||
u32 m_codeBtnAge;
|
||||
u32 m_codeLblAge;
|
||||
u32 m_codeLblUser[4];
|
||||
//About menu
|
||||
u32 m_aboutLblTitle;
|
||||
@ -977,7 +978,7 @@ private:
|
||||
void _cfNeedsUpdate(void);
|
||||
void _game(bool launch = false);
|
||||
void _download(string gameId = string());
|
||||
bool _code(char code[4], bool erase = false);
|
||||
void _code(void);
|
||||
void _about(void);
|
||||
bool _wbfsOp(WBFS_OP op);
|
||||
void _cfTheme(void);
|
||||
|
@ -11,10 +11,12 @@ void CMenu::_hideCode(bool instant)
|
||||
m_btnMgr.hide(m_codeBtnKey[i], instant);
|
||||
m_btnMgr.hide(m_codeBtnBack, instant);
|
||||
m_btnMgr.hide(m_codeBtnErase, instant);
|
||||
m_btnMgr.hide(m_codeBtnAge, instant);
|
||||
m_btnMgr.hide(m_codeLblTitle, instant);
|
||||
for (u32 i = 0; i < ARRAY_SIZE(m_codeLblUser); ++i)
|
||||
if (m_codeLblUser[i] != -1u)
|
||||
m_btnMgr.hide(m_codeLblUser[i], instant);
|
||||
m_btnMgr.hide(m_codeLblAge, true);
|
||||
}
|
||||
|
||||
void CMenu::_showCode(void)
|
||||
@ -27,10 +29,15 @@ void CMenu::_showCode(void)
|
||||
for (u32 i = 0; i < ARRAY_SIZE(m_codeLblUser); ++i)
|
||||
if (m_codeLblUser[i] != -1u)
|
||||
m_btnMgr.show(m_codeLblUser[i]);
|
||||
m_btnMgr.hide(m_codeLblAge, true);
|
||||
}
|
||||
|
||||
bool CMenu::_code(char code[4], bool erase)
|
||||
|
||||
void CMenu::_code(void)
|
||||
{
|
||||
char code[4];
|
||||
_hideConfig();
|
||||
|
||||
u32 n = 0;
|
||||
wchar_t codeLbl[] = L"_ _ _ _";
|
||||
|
||||
@ -38,50 +45,60 @@ bool CMenu::_code(char code[4], bool erase)
|
||||
memset(code, 0, sizeof code);
|
||||
m_btnMgr.setText(m_codeLblTitle, codeLbl);
|
||||
_showCode();
|
||||
if (erase)
|
||||
bool ageLockMode = false;
|
||||
bool modeChanged = false;
|
||||
bool goBack = false;
|
||||
if (!m_locked)
|
||||
{
|
||||
m_btnMgr.show(m_codeBtnAge);
|
||||
m_btnMgr.show(m_codeBtnErase);
|
||||
}
|
||||
while (true)
|
||||
{
|
||||
int c = -1;
|
||||
_mainLoopCommon();
|
||||
if (BTN_HOME_PRESSED)
|
||||
{
|
||||
break;
|
||||
}
|
||||
else if (WPadIR_ANY())
|
||||
goBack = true;
|
||||
|
||||
if (WPadIR_ANY())
|
||||
{
|
||||
if (BTN_B_PRESSED)
|
||||
break;
|
||||
goBack = true;
|
||||
else if (BTN_UP_PRESSED)
|
||||
m_btnMgr.up();
|
||||
else if (BTN_DOWN_PRESSED)
|
||||
m_btnMgr.down();
|
||||
if (BTN_A_PRESSED)
|
||||
else if (BTN_A_PRESSED)
|
||||
{
|
||||
if (!m_locked && m_btnMgr.selected(m_codeBtnErase))
|
||||
{
|
||||
memset(code, 0, sizeof code);
|
||||
m_cfg.remove("GENERAL", "parent_code");
|
||||
n = 0;
|
||||
m_locked = false;
|
||||
break;
|
||||
}
|
||||
if (m_btnMgr.selected(m_codeBtnBack))
|
||||
break;
|
||||
goBack = true;
|
||||
else if (m_btnMgr.selected(m_codeBtnErase))
|
||||
{
|
||||
goBack = true;
|
||||
_cfNeedsUpdate();
|
||||
if (ageLockMode)
|
||||
m_cfg.remove("GENERAL", "age_lock");
|
||||
else
|
||||
{
|
||||
m_cfg.remove("GENERAL", "parent_code");
|
||||
m_locked = false;
|
||||
}
|
||||
}
|
||||
else if (m_btnMgr.selected(m_codeBtnAge))
|
||||
modeChanged = true;
|
||||
else
|
||||
for (int i = 0; i < 10; ++i)
|
||||
if (m_btnMgr.selected(m_codeBtnKey[i]))
|
||||
{
|
||||
codeLbl[n * 2] = 'X';
|
||||
code[n++] = '0' + i;
|
||||
m_btnMgr.setText(m_codeLblTitle, codeLbl);
|
||||
c = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (!ageLockMode)
|
||||
{
|
||||
// Map buttons to numbers
|
||||
int c = -1;
|
||||
c = -1;
|
||||
if (BTN_UP_PRESSED) c = 0;
|
||||
else if (BTN_LEFT_PRESSED) c = 1;
|
||||
else if (BTN_RIGHT_PRESSED) c = 2;
|
||||
@ -92,19 +109,90 @@ bool CMenu::_code(char code[4], bool erase)
|
||||
else if (BTN_B_PRESSED) c = 7;
|
||||
else if (BTN_1_PRESSED) c = 8;
|
||||
else if (BTN_2_PRESSED) c = 9;
|
||||
}
|
||||
|
||||
if (c != -1)
|
||||
if (goBack)
|
||||
{
|
||||
codeLbl[n * 2] = 'X';
|
||||
if (!ageLockMode)
|
||||
break;
|
||||
modeChanged = true;
|
||||
goBack = false;
|
||||
}
|
||||
// ageLockMode allows entry of numbers 2 - 19
|
||||
// a first digit of 0 is ignored
|
||||
// a first digit of 2 - 9 is taken to mean a single digit number
|
||||
// a first digit of 1 will be the start of a 2 digit number
|
||||
else if (c != -1 && !(ageLockMode && (n == 0 && c == 0)))
|
||||
{
|
||||
codeLbl[n * 2] = ageLockMode ? '0' + c : 'X';
|
||||
code[n++] = '0' + c;
|
||||
m_btnMgr.setText(m_codeLblTitle, codeLbl);
|
||||
}
|
||||
|
||||
if (modeChanged)
|
||||
{
|
||||
modeChanged = false;
|
||||
memset(code, 0, sizeof code);
|
||||
n = 0;
|
||||
ageLockMode = !ageLockMode;
|
||||
|
||||
if (ageLockMode)
|
||||
{
|
||||
int ageLockM = m_cfg.getInt("GENERAL", "age_lock");
|
||||
if (ageLockM < 2 || ageLockM > 19)
|
||||
ageLockM = 19;
|
||||
m_btnMgr.hide(m_codeBtnAge, true);
|
||||
wchar_t ageLbl[40];
|
||||
wcsncpy(ageLbl, (_t("cd3", L"Age Lock")).c_str(), 35);
|
||||
ageLbl[35] = 0;
|
||||
swprintf(ageLbl, 40, L"%ls: %d", ageLbl, ageLockM);
|
||||
m_btnMgr.setText(m_codeLblAge, ageLbl);
|
||||
m_btnMgr.show(m_codeLblAge);
|
||||
}
|
||||
else if (!m_locked)
|
||||
{
|
||||
m_btnMgr.show(m_codeBtnAge);
|
||||
m_btnMgr.hide(m_codeLblAge, true);
|
||||
}
|
||||
|
||||
for (u32 i = 0; i < sizeof code; i++)
|
||||
codeLbl[i*2] = (ageLockMode && i > 1) ? ' ' : '_';
|
||||
m_btnMgr.setText(m_codeLblTitle, codeLbl);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ageLockMode)
|
||||
{
|
||||
if ((n >= 2) || (n == 1 && c > 1))
|
||||
{
|
||||
modeChanged = true;
|
||||
m_cfg.setString("GENERAL", "age_lock", string(code, 2).c_str());
|
||||
_cfNeedsUpdate(); }
|
||||
}
|
||||
else if (n >= sizeof code)
|
||||
{
|
||||
if (m_locked)
|
||||
{
|
||||
if (memcmp(code, m_cfg.getString("GENERAL", "parent_code").c_str(), 4) == 0)
|
||||
{
|
||||
m_locked = false;
|
||||
_cfNeedsUpdate();
|
||||
}
|
||||
else
|
||||
error(_t("cfgg25", L"Password incorrect."));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_cfg.setString("GENERAL", "parent_code", string(code, 4).c_str());
|
||||
m_locked = true;
|
||||
_cfNeedsUpdate();
|
||||
}
|
||||
if (n >= sizeof code)
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
_hideCode();
|
||||
return n == sizeof code;
|
||||
_showConfig();
|
||||
}
|
||||
|
||||
void CMenu::_initCodeMenu(CMenu::SThemeData &theme)
|
||||
@ -112,24 +200,30 @@ void CMenu::_initCodeMenu(CMenu::SThemeData &theme)
|
||||
_addUserLabels(theme, m_codeLblUser, ARRAY_SIZE(m_codeLblUser), "CODE");
|
||||
m_codeBg = _texture(theme.texSet, "CODE/BG", "texture", theme.bg);
|
||||
m_codeLblTitle = _addLabel(theme, "CODE/CODE", theme.titleFont, L"_ _ _ _", 20, 30, 600, 60, theme.titleFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE);
|
||||
m_codeBtnKey[7] = _addButton(theme, "CODE/7_BTN", theme.btnFont, L"7", 160, 100, 100, 50, theme.btnFontColor);
|
||||
m_codeBtnKey[8] = _addButton(theme, "CODE/8_BTN", theme.btnFont, L"8", 270, 100, 100, 50, theme.btnFontColor);
|
||||
m_codeBtnKey[9] = _addButton(theme, "CODE/9_BTN", theme.btnFont, L"9", 380, 100, 100, 50, theme.btnFontColor);
|
||||
m_codeBtnKey[4] = _addButton(theme, "CODE/4_BTN", theme.btnFont, L"4", 160, 180, 100, 50, theme.btnFontColor);
|
||||
m_codeBtnKey[5] = _addButton(theme, "CODE/5_BTN", theme.btnFont, L"5", 270, 180, 100, 50, theme.btnFontColor);
|
||||
m_codeBtnKey[6] = _addButton(theme, "CODE/6_BTN", theme.btnFont, L"6", 380, 180, 100, 50, theme.btnFontColor);
|
||||
m_codeBtnKey[1] = _addButton(theme, "CODE/1_BTN", theme.btnFont, L"1", 160, 260, 100, 50, theme.btnFontColor);
|
||||
m_codeBtnKey[2] = _addButton(theme, "CODE/2_BTN", theme.btnFont, L"2", 270, 260, 100, 50, theme.btnFontColor);
|
||||
m_codeBtnKey[3] = _addButton(theme, "CODE/3_BTN", theme.btnFont, L"3", 380, 260, 100, 50, theme.btnFontColor);
|
||||
m_codeBtnKey[0] = _addButton(theme, "CODE/0_BTN", theme.btnFont, L"0", 270, 340, 210, 50, theme.btnFontColor);
|
||||
m_codeBtnErase = _addButton(theme, "CODE/ERASE_BTN", theme.btnFont, L"", 20, 400, 200, 56, theme.btnFontColor);
|
||||
m_codeBtnBack = _addButton(theme, "CODE/BACK_BTN", theme.btnFont, L"", 420, 400, 200, 56, theme.btnFontColor);
|
||||
//
|
||||
m_codeBtnAge = _addButton(theme, "CODE/AGE_BTN", theme.btnFont, L"", 20, 340, 200, 56, theme.btnFontColor);
|
||||
m_codeLblAge = _addTitle(theme, "CODE/AGE", theme.titleFont, L"", 20, 340, 200, 20, theme.titleFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE);
|
||||
|
||||
for (int i = 0; i < 10; ++i)
|
||||
_setHideAnim(m_codeBtnKey[i], fmt("CODE/%i_BTN", i), 0, 0, 0.f, 0.f);
|
||||
{
|
||||
const char *codeText = fmt("CODE/%i_BTN", i);
|
||||
if (i > 0)
|
||||
{
|
||||
int x = i - 1;
|
||||
int y = x / 3;
|
||||
x %= 3;
|
||||
x = 160 + x * 110;
|
||||
y = 260 - y * 80;
|
||||
m_codeBtnKey[i] = _addButton(theme, codeText, theme.btnFont, wfmt(L"%i", i), x, y, 100, 50, theme.btnFontColor);
|
||||
}
|
||||
_setHideAnim(m_codeBtnKey[i], codeText, 0, 0, 0.f, 0.f);
|
||||
}
|
||||
_setHideAnim(m_codeBtnErase, "CODE/ERASE_BTN", 0, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_codeBtnBack, "CODE/BACK_BTN", 0, 0, -2.f, 0.f);
|
||||
//
|
||||
_setHideAnim(m_codeBtnAge, "CODE/AGE_BTN", 0, 0, -2.f, 0.f);
|
||||
|
||||
_hideCode(true);
|
||||
_textCode();
|
||||
}
|
||||
@ -138,5 +232,6 @@ void CMenu::_textCode(void)
|
||||
{
|
||||
m_btnMgr.setText(m_codeBtnBack, _t("cd1", L"Back"));
|
||||
m_btnMgr.setText(m_codeBtnErase, _t("cd2", L"Erase"));
|
||||
m_btnMgr.setText(m_codeLblTitle, L"_ _ _ _");
|
||||
m_btnMgr.setText(m_codeBtnAge, _t("cd3", L"Age Lock"));
|
||||
// m_btnMgr.setText(m_codeLblTitle, L"_ _ _ _");
|
||||
}
|
||||
|
@ -194,31 +194,8 @@ int CMenu::_config1(void)
|
||||
_showConfig();
|
||||
m_cf.startCoverLoader();
|
||||
}
|
||||
else if (m_btnMgr.selected(m_configBtnUnlock))
|
||||
{
|
||||
char code[4];
|
||||
_hideConfig();
|
||||
if (_code(code) && memcmp(code, m_cfg.getString("GENERAL", "parent_code", "").c_str(), 4) == 0)
|
||||
{
|
||||
_cfNeedsUpdate();
|
||||
m_locked = false;
|
||||
}
|
||||
else
|
||||
error(_t("cfgg25",L"Password incorrect."));
|
||||
_showConfig();
|
||||
}
|
||||
else if (m_btnMgr.selected(m_configBtnSetCode))
|
||||
{
|
||||
char code[4];
|
||||
_hideConfig();
|
||||
if (_code(code, true))
|
||||
{
|
||||
_cfNeedsUpdate();
|
||||
m_cfg.setString("GENERAL", "parent_code", string(code, 4).c_str());
|
||||
m_locked = true;
|
||||
}
|
||||
_showConfig();
|
||||
}
|
||||
else if ((m_btnMgr.selected(m_configBtnUnlock)) || (m_btnMgr.selected(m_configBtnSetCode)))
|
||||
_code();
|
||||
else if ((m_btnMgr.selected(m_configBtnPartitionP) || m_btnMgr.selected(m_configBtnPartitionM)))
|
||||
{
|
||||
_enableNandEmu(true);
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include "loader/wbfs.h"
|
||||
#include "libwbfs/wiidisc.h"
|
||||
#include "menu.hpp"
|
||||
#include "defines.h"
|
||||
|
||||
#include "loader/sys.h"
|
||||
#include "gecko.h"
|
||||
@ -442,7 +443,7 @@ void CMenu::_showGameSettings(void)
|
||||
|
||||
void CMenu::_gameSettings(void)
|
||||
{
|
||||
m_gcfg2.load(fmt("%s/gameconfig2.ini", m_settingsDir.c_str()));
|
||||
m_gcfg2.load(fmt("%s/" GAME_SETTINGS2_FILENAME, m_settingsDir.c_str()));
|
||||
string id(m_cf.getId());
|
||||
|
||||
m_gameSettingsPage = 1;
|
||||
|
@ -340,7 +340,7 @@ static void setLanguage(int l)
|
||||
|
||||
void CMenu::_game(bool launch)
|
||||
{
|
||||
m_gcfg1.load(fmt("%s/gameconfig1.ini", m_settingsDir.c_str()));
|
||||
m_gcfg1.load(fmt("%s/" GAME_SETTINGS1_FILENAME, m_settingsDir.c_str()));
|
||||
if (!launch)
|
||||
{
|
||||
SetupInput();
|
||||
@ -629,7 +629,7 @@ void CMenu::_directlaunch(const string &id)
|
||||
|
||||
void CMenu::_launch(dir_discHdr *hdr)
|
||||
{
|
||||
m_gcfg2.load(fmt("%s/gameconfig2.ini", m_settingsDir.c_str()));
|
||||
m_gcfg2.load(fmt("%s/" GAME_SETTINGS2_FILENAME, m_settingsDir.c_str()));
|
||||
if(hdr->hdr.gc_magic == 0x4c4f4c4f)
|
||||
{
|
||||
string title(&hdr->path[string(hdr->path).find_last_of("/")+1]);
|
||||
|
@ -307,11 +307,11 @@ void CMenu::_textGameInfo(void)
|
||||
cnt_controlsreq = 0;
|
||||
cnt_controls = 0;
|
||||
|
||||
GameTDB m_gametdb;
|
||||
m_gametdb.OpenFile(fmt("%s/wiitdb.xml", m_settingsDir.c_str()));
|
||||
m_gametdb.SetLanguageCode(m_loc.getString(m_curLanguage, "gametdb_code", "EN").c_str());
|
||||
GameTDB gametdb;
|
||||
gametdb.OpenFile(fmt("%s/wiitdb.xml", m_settingsDir.c_str()));
|
||||
gametdb.SetLanguageCode(m_loc.getString(m_curLanguage, "gametdb_code", "EN").c_str());
|
||||
|
||||
titlecheck = m_gametdb.IsLoaded() && m_gametdb.GetGameXMLInfo(m_cf.getId().c_str(), &gameinfo);
|
||||
titlecheck = gametdb.IsLoaded() && gametdb.GetGameXMLInfo(m_cf.getId().c_str(), &gameinfo);
|
||||
if(titlecheck)
|
||||
{
|
||||
gprintf("ID: %s\nTitle: %s\n", gameinfo.GameID.c_str(), gameinfo.Title.c_str());
|
||||
@ -359,9 +359,7 @@ void CMenu::_textGameInfo(void)
|
||||
m_rating.fromPNG(cero_z_png);
|
||||
break;
|
||||
case GAMETDB_RATING_TYPE_ESRB:
|
||||
if (gameinfo.RatingValue == "AO")
|
||||
m_rating.fromPNG(esrb_ao_png);
|
||||
else if (gameinfo.RatingValue == "E")
|
||||
if (gameinfo.RatingValue == "E")
|
||||
m_rating.fromPNG(esrb_e_png);
|
||||
else if (gameinfo.RatingValue == "EC")
|
||||
m_rating.fromPNG(esrb_ec_png);
|
||||
@ -371,6 +369,8 @@ void CMenu::_textGameInfo(void)
|
||||
m_rating.fromPNG(esrb_t_png);
|
||||
else if (gameinfo.RatingValue == "M")
|
||||
m_rating.fromPNG(esrb_m_png);
|
||||
else if (gameinfo.RatingValue == "AO")
|
||||
m_rating.fromPNG(esrb_ao_png);
|
||||
break;
|
||||
case GAMETDB_RATING_TYPE_PEGI:
|
||||
if (gameinfo.RatingValue == "3")
|
||||
@ -385,7 +385,7 @@ void CMenu::_textGameInfo(void)
|
||||
m_rating.fromPNG(pegi_18_png);
|
||||
break;
|
||||
case GAMETDB_RATING_TYPE_GRB:
|
||||
if (gameinfo.RatingValue == "a")
|
||||
if (gameinfo.RatingValue == "A")
|
||||
m_rating.fromPNG(grb_a_png);
|
||||
else if (gameinfo.RatingValue == "12")
|
||||
m_rating.fromPNG(grb_12_png);
|
||||
@ -682,6 +682,6 @@ void CMenu::_textGameInfo(void)
|
||||
else
|
||||
m_btnMgr.setText(m_gameinfoLblTitle, wfmt(L"%s", "No Gameinfo"), true);
|
||||
|
||||
m_gametdb.CloseFile();
|
||||
gametdb.CloseFile();
|
||||
|
||||
}
|
@ -1,3 +1,13 @@
|
||||
[DEBUG]
|
||||
#Boolean: Enable the gecko log to write to SD - Defaults to false
|
||||
sd_write_log=
|
||||
#Boolean: Enable the wifi gecko - Defaults to false
|
||||
wifi_gecko=
|
||||
#Integer: The IP of the machine to send wifi gecko output to - Blank by default
|
||||
wifi_gecko_ip=
|
||||
#Integer: The port the machine is listenning on for gecko output - Blank by default
|
||||
wifi_gecko_port=
|
||||
|
||||
[GAMERCARD]
|
||||
#Boolean: Enable the gamercards notification code - Defaults to false
|
||||
wiinnertag_enable=
|
||||
@ -23,9 +33,13 @@ last_cf_mode=
|
||||
sort=
|
||||
|
||||
[GENERAL]
|
||||
#Integer: Age where any game rated above will not be shown. Range 2-19. 2=not many, 19=all
|
||||
age_lock=
|
||||
#Integer: What age to use if no age rating is found for a game
|
||||
age_lock_default=
|
||||
#Boolean: Hide the coverflow icons to switch modes - Defaults to false
|
||||
hideviews=
|
||||
#Boolean: Whether to favorites view is selected on boot - Defaults to false
|
||||
#Boolean: Whether the favorites view is selected on boot - Defaults to false
|
||||
favorites_on_startup=
|
||||
#Boolean: To configure watchdog for the ehci Module in d2xv7, not in use until v7 ehci is stable, ehci v6 has time hardcoded to 10s - Defaults to 10
|
||||
watchdog_timeout=
|
||||
@ -73,12 +87,6 @@ tv_height=
|
||||
tv_x=0
|
||||
#Integer: Y offset from the top of the screen where wiiflow should be drawn - Defaults to 0
|
||||
tv_y=0
|
||||
#Boolean: Enable the wifi gecko - Defaults to false
|
||||
wifi_gecko=
|
||||
#Integer: The IP of the machine to send wifi gecko output to - Blank by default
|
||||
wifi_gecko_ip=
|
||||
#Integer: The port the machine is listenning on for gecko output - Blank by default
|
||||
wifi_gecko_port=
|
||||
#Boolean: Keep covers after they are cached - Defaults to true
|
||||
keep_png=
|
||||
#Boolean: Patch video modes for games - Defaults to false
|
||||
|
Loading…
Reference in New Issue
Block a user