2010-10-28 11:00:52 +02:00
|
|
|
#include <string.h>
|
|
|
|
#include "GameTitles.h"
|
2010-12-03 19:38:57 +01:00
|
|
|
#include "CSettings.h"
|
|
|
|
#include "usbloader/GameList.h"
|
2011-11-12 19:14:09 +01:00
|
|
|
#include "Channels/channels.h"
|
2011-10-21 20:48:10 +02:00
|
|
|
#include "xml/GameTDB.hpp"
|
2012-01-08 19:24:46 +01:00
|
|
|
#include "svnrev.h"
|
|
|
|
#include "gecko.h"
|
|
|
|
|
2023-01-01 18:00:12 +01:00
|
|
|
#define VALID_CACHE_REVISION 1280
|
2010-10-28 11:00:52 +02:00
|
|
|
|
|
|
|
CGameTitles GameTitles;
|
|
|
|
|
2023-01-01 18:00:12 +01:00
|
|
|
void CGameTitles::SetGameTitle(const char * id, const char * title, const std::string region)
|
2010-10-28 11:00:52 +02:00
|
|
|
{
|
2011-07-26 00:28:22 +02:00
|
|
|
if(!id || !title)
|
|
|
|
return;
|
|
|
|
|
|
|
|
for(u32 i = 0; i < TitleList.size(); ++i)
|
|
|
|
{
|
|
|
|
if(strncasecmp(id, TitleList[i].GameID, 6) == 0)
|
|
|
|
{
|
|
|
|
TitleList[i].Title = title;
|
2023-01-01 18:00:12 +01:00
|
|
|
TitleList[i].Region = region;
|
2011-07-26 00:28:22 +02:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
GameTitle newTitle;
|
|
|
|
snprintf(newTitle.GameID, sizeof(newTitle.GameID), id);
|
2012-01-08 19:24:46 +01:00
|
|
|
newTitle.Title = title;
|
2023-01-01 18:00:12 +01:00
|
|
|
newTitle.Region = region;
|
2012-01-08 19:24:46 +01:00
|
|
|
newTitle.ParentalRating = -1;
|
|
|
|
newTitle.PlayersCount = 1;
|
|
|
|
newTitle.FromWiiTDB = 0;
|
2011-07-26 00:28:22 +02:00
|
|
|
|
|
|
|
TitleList.push_back(newTitle);
|
2010-10-28 11:00:52 +02:00
|
|
|
}
|
|
|
|
|
2011-01-13 20:05:31 +01:00
|
|
|
const char * CGameTitles::GetTitle(const char * id) const
|
2010-10-28 11:00:52 +02:00
|
|
|
{
|
2011-07-26 00:28:22 +02:00
|
|
|
if(!id)
|
|
|
|
return "";
|
2010-10-28 11:00:52 +02:00
|
|
|
|
2011-07-26 00:28:22 +02:00
|
|
|
for(u32 i = 0; i < TitleList.size(); ++i)
|
|
|
|
{
|
|
|
|
if(strncasecmp(id, TitleList[i].GameID, 6) == 0)
|
|
|
|
return TitleList[i].Title.c_str();
|
|
|
|
}
|
2010-10-28 11:00:52 +02:00
|
|
|
|
2011-07-26 00:28:22 +02:00
|
|
|
for(int i = 0; i < gameList.size(); ++i)
|
|
|
|
{
|
|
|
|
if(strncasecmp(id, (char *) gameList[i]->id, 6) == 0)
|
|
|
|
return gameList[i]->title;
|
2011-06-26 23:38:05 +02:00
|
|
|
|
2011-07-26 00:28:22 +02:00
|
|
|
}
|
2011-06-26 23:38:05 +02:00
|
|
|
|
2011-07-26 00:28:22 +02:00
|
|
|
return "";
|
2010-10-28 11:00:52 +02:00
|
|
|
}
|
|
|
|
|
2011-01-13 20:05:31 +01:00
|
|
|
const char * CGameTitles::GetTitle(const struct discHdr *header) const
|
2010-10-28 11:00:52 +02:00
|
|
|
{
|
2011-07-26 00:28:22 +02:00
|
|
|
if(!header)
|
|
|
|
return "";
|
2010-10-28 11:00:52 +02:00
|
|
|
|
2011-07-26 00:28:22 +02:00
|
|
|
for(u32 i = 0; i < TitleList.size(); ++i)
|
|
|
|
{
|
|
|
|
if(strncasecmp((const char *) header->id, TitleList[i].GameID, 6) == 0)
|
|
|
|
return TitleList[i].Title.c_str();
|
|
|
|
}
|
2010-10-28 11:00:52 +02:00
|
|
|
|
2011-07-26 00:28:22 +02:00
|
|
|
return header->title;
|
2010-10-28 11:00:52 +02:00
|
|
|
}
|
|
|
|
|
2023-01-01 18:00:12 +01:00
|
|
|
const char * CGameTitles::GetRegion(const char * id) const
|
|
|
|
{
|
|
|
|
if(!id || !Settings.titlesOverride)
|
|
|
|
return "NULL";
|
|
|
|
|
|
|
|
for(u32 i = 0; i < TitleList.size(); ++i)
|
|
|
|
{
|
|
|
|
if(strncasecmp(id, TitleList[i].GameID, 6) == 0)
|
|
|
|
return TitleList[i].Region.c_str();
|
|
|
|
}
|
|
|
|
|
|
|
|
return "NULL";
|
|
|
|
}
|
|
|
|
|
2011-01-13 20:05:31 +01:00
|
|
|
int CGameTitles::GetParentalRating(const char * id) const
|
*Completely rewrote the asynchron GuiImageData class (problems from switch Carousel<->Grid layour should be fixed now)
*Fixed bug mounting a wbfs partition which was formatted from an ext partition
*Rewrote the parental control feature. Removed loading pin or settings from the Wii Settings. Parental control is now completely managed in the loader from the settings selected and the password set.
*Saving password in config file is now encrypted
*Added loop to wait for usb when reloading the cIOS before game start
The parental control feature is filtering games like following when usb loader is locked:
level 0 (everyone 0+) > shows only games with lvl 0
level 1 (childs 7+) > shows games with lvl 0, 1
level 2 (teens 12+) > shows games with lvl 0, 1, 2
level 3 (mature 16+) > shows games with lvl 0, 1, 2, 3
level 4 (adults only 18+) > shows all games (lvl 0, 1, 2, 3, 4)
level 4 is default when creating new configs
2010-12-19 19:20:33 +01:00
|
|
|
{
|
2011-07-26 00:28:22 +02:00
|
|
|
if(!id)
|
|
|
|
return -1;
|
*Completely rewrote the asynchron GuiImageData class (problems from switch Carousel<->Grid layour should be fixed now)
*Fixed bug mounting a wbfs partition which was formatted from an ext partition
*Rewrote the parental control feature. Removed loading pin or settings from the Wii Settings. Parental control is now completely managed in the loader from the settings selected and the password set.
*Saving password in config file is now encrypted
*Added loop to wait for usb when reloading the cIOS before game start
The parental control feature is filtering games like following when usb loader is locked:
level 0 (everyone 0+) > shows only games with lvl 0
level 1 (childs 7+) > shows games with lvl 0, 1
level 2 (teens 12+) > shows games with lvl 0, 1, 2
level 3 (mature 16+) > shows games with lvl 0, 1, 2, 3
level 4 (adults only 18+) > shows all games (lvl 0, 1, 2, 3, 4)
level 4 is default when creating new configs
2010-12-19 19:20:33 +01:00
|
|
|
|
2011-07-26 00:28:22 +02:00
|
|
|
for(u32 i = 0; i < TitleList.size(); ++i)
|
|
|
|
{
|
|
|
|
if(strncasecmp(id, TitleList[i].GameID, 6) == 0)
|
|
|
|
return TitleList[i].ParentalRating;
|
|
|
|
}
|
*Completely rewrote the asynchron GuiImageData class (problems from switch Carousel<->Grid layour should be fixed now)
*Fixed bug mounting a wbfs partition which was formatted from an ext partition
*Rewrote the parental control feature. Removed loading pin or settings from the Wii Settings. Parental control is now completely managed in the loader from the settings selected and the password set.
*Saving password in config file is now encrypted
*Added loop to wait for usb when reloading the cIOS before game start
The parental control feature is filtering games like following when usb loader is locked:
level 0 (everyone 0+) > shows only games with lvl 0
level 1 (childs 7+) > shows games with lvl 0, 1
level 2 (teens 12+) > shows games with lvl 0, 1, 2
level 3 (mature 16+) > shows games with lvl 0, 1, 2, 3
level 4 (adults only 18+) > shows all games (lvl 0, 1, 2, 3, 4)
level 4 is default when creating new configs
2010-12-19 19:20:33 +01:00
|
|
|
|
2011-07-26 00:28:22 +02:00
|
|
|
return -1;
|
*Completely rewrote the asynchron GuiImageData class (problems from switch Carousel<->Grid layour should be fixed now)
*Fixed bug mounting a wbfs partition which was formatted from an ext partition
*Rewrote the parental control feature. Removed loading pin or settings from the Wii Settings. Parental control is now completely managed in the loader from the settings selected and the password set.
*Saving password in config file is now encrypted
*Added loop to wait for usb when reloading the cIOS before game start
The parental control feature is filtering games like following when usb loader is locked:
level 0 (everyone 0+) > shows only games with lvl 0
level 1 (childs 7+) > shows games with lvl 0, 1
level 2 (teens 12+) > shows games with lvl 0, 1, 2
level 3 (mature 16+) > shows games with lvl 0, 1, 2, 3
level 4 (adults only 18+) > shows all games (lvl 0, 1, 2, 3, 4)
level 4 is default when creating new configs
2010-12-19 19:20:33 +01:00
|
|
|
}
|
|
|
|
|
2011-02-02 19:30:15 +01:00
|
|
|
|
|
|
|
int CGameTitles::GetPlayersCount(const char * id) const
|
|
|
|
{
|
2011-07-26 00:28:22 +02:00
|
|
|
if(!id)
|
|
|
|
return 1;
|
2011-02-02 19:30:15 +01:00
|
|
|
|
2011-07-26 00:28:22 +02:00
|
|
|
for(u32 i = 0; i < TitleList.size(); ++i)
|
|
|
|
{
|
|
|
|
if(strncasecmp(id, TitleList[i].GameID, 6) == 0)
|
|
|
|
return TitleList[i].PlayersCount;
|
|
|
|
}
|
2011-02-02 19:30:15 +01:00
|
|
|
|
2011-07-26 00:28:22 +02:00
|
|
|
return 1;
|
2011-02-02 19:30:15 +01:00
|
|
|
}
|
|
|
|
|
2010-10-28 11:00:52 +02:00
|
|
|
void CGameTitles::SetDefault()
|
|
|
|
{
|
2011-07-26 00:28:22 +02:00
|
|
|
TitleList.clear();
|
|
|
|
//! Free vector memory
|
|
|
|
std::vector<GameTitle>().swap(TitleList);
|
2010-10-28 11:00:52 +02:00
|
|
|
}
|
2010-12-03 19:38:57 +01:00
|
|
|
|
2011-02-11 18:41:52 +01:00
|
|
|
typedef struct _CacheTitle
|
|
|
|
{
|
2011-07-26 00:28:22 +02:00
|
|
|
char GameID[7];
|
2023-01-01 18:00:12 +01:00
|
|
|
char Title[130]; // long titles e.g. RGOJJ9 & DLSP64
|
|
|
|
char Region[7];
|
2012-01-08 19:24:46 +01:00
|
|
|
char FromWiiTDB;
|
2011-07-26 00:28:22 +02:00
|
|
|
int ParentalRating;
|
|
|
|
int PlayersCount;
|
2011-02-11 18:41:52 +01:00
|
|
|
|
|
|
|
} ATTRIBUTE_PACKED CacheTitle;
|
|
|
|
|
|
|
|
u32 CGameTitles::ReadCachedTitles(const char * path)
|
|
|
|
{
|
2012-01-08 19:24:46 +01:00
|
|
|
std::string Cachepath = path;
|
|
|
|
if(path[strlen(path)-1] != '/')
|
|
|
|
Cachepath += '/';
|
|
|
|
Cachepath += "TitlesCache.bin";
|
|
|
|
|
2023-01-01 18:00:12 +01:00
|
|
|
//! Load cached last so that the titles are preloaded before reading list
|
2012-01-08 19:24:46 +01:00
|
|
|
FILE * f = fopen(Cachepath.c_str(), "rb");
|
2011-07-26 00:28:22 +02:00
|
|
|
if(!f) return 0;
|
2011-02-11 18:41:52 +01:00
|
|
|
|
2012-01-08 19:24:46 +01:00
|
|
|
u32 revision = 0;
|
|
|
|
|
|
|
|
fread(&revision, 1, 4, f);
|
|
|
|
|
|
|
|
if(revision < VALID_CACHE_REVISION)
|
|
|
|
{
|
|
|
|
fclose(f);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2011-07-26 00:28:22 +02:00
|
|
|
char LangCode[11];
|
|
|
|
memset(LangCode, 0, sizeof(LangCode));
|
2011-02-11 18:41:52 +01:00
|
|
|
|
2011-07-26 00:28:22 +02:00
|
|
|
fread(LangCode, 1, 10, f);
|
2011-02-11 18:41:52 +01:00
|
|
|
|
2011-07-26 00:28:22 +02:00
|
|
|
//! Check if cache has correct language code
|
|
|
|
if(strcmp(LangCode, Settings.db_language) != 0)
|
|
|
|
{
|
|
|
|
fclose(f);
|
|
|
|
return 0;
|
|
|
|
}
|
2011-02-11 18:41:52 +01:00
|
|
|
|
2011-07-26 00:28:22 +02:00
|
|
|
u32 count = 0;
|
|
|
|
fread(&count, 1, 4, f);
|
2011-02-11 18:41:52 +01:00
|
|
|
|
2011-07-26 00:28:22 +02:00
|
|
|
std::vector<CacheTitle> CachedList(count);
|
|
|
|
TitleList.resize(count);
|
2011-02-11 18:41:52 +01:00
|
|
|
|
2011-07-26 00:28:22 +02:00
|
|
|
fread(&CachedList[0], 1, count*sizeof(CacheTitle), f);
|
|
|
|
fclose(f);
|
2011-02-11 18:41:52 +01:00
|
|
|
|
2011-07-26 00:28:22 +02:00
|
|
|
for(u32 i = 0; i < count; ++i)
|
|
|
|
{
|
|
|
|
strcpy(TitleList[i].GameID, CachedList[i].GameID);
|
|
|
|
TitleList[i].Title = CachedList[i].Title;
|
2023-01-01 18:00:12 +01:00
|
|
|
TitleList[i].Region = CachedList[i].Region;
|
2011-07-26 00:28:22 +02:00
|
|
|
TitleList[i].ParentalRating = CachedList[i].ParentalRating;
|
|
|
|
TitleList[i].PlayersCount = CachedList[i].PlayersCount;
|
2012-01-08 19:24:46 +01:00
|
|
|
TitleList[i].FromWiiTDB = CachedList[i].FromWiiTDB;
|
2011-07-26 00:28:22 +02:00
|
|
|
}
|
2011-02-11 18:41:52 +01:00
|
|
|
|
2011-07-26 00:28:22 +02:00
|
|
|
return count;
|
2011-02-11 18:41:52 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void CGameTitles::WriteCachedTitles(const char * path)
|
|
|
|
{
|
2012-01-08 19:24:46 +01:00
|
|
|
std::string Cachepath = path;
|
|
|
|
if(path[strlen(path)-1] != '/')
|
|
|
|
Cachepath += '/';
|
|
|
|
Cachepath += "TitlesCache.bin";
|
|
|
|
|
|
|
|
FILE *f = fopen(Cachepath.c_str(), "wb");
|
2011-07-26 00:28:22 +02:00
|
|
|
if(!f)
|
|
|
|
return;
|
2011-02-11 18:41:52 +01:00
|
|
|
|
2011-07-26 00:28:22 +02:00
|
|
|
CacheTitle Cache;
|
|
|
|
u32 count = TitleList.size();
|
2012-01-08 19:24:46 +01:00
|
|
|
u32 revision = atoi(GetRev());
|
|
|
|
fwrite(&revision, 1, 4, f);
|
2011-07-26 00:28:22 +02:00
|
|
|
fwrite(Settings.db_language, 1, 10, f);
|
|
|
|
fwrite(&count, 1, 4, f);
|
2011-02-11 18:41:52 +01:00
|
|
|
|
2011-07-26 00:28:22 +02:00
|
|
|
for(u32 i = 0; i < count; ++i)
|
|
|
|
{
|
|
|
|
memset(&Cache, 0, sizeof(CacheTitle));
|
2020-12-12 22:35:12 +01:00
|
|
|
snprintf(Cache.GameID, sizeof(Cache.GameID), "%s", TitleList[i].GameID);
|
|
|
|
snprintf(Cache.Title, sizeof(Cache.Title), "%s", TitleList[i].Title.c_str());
|
2023-01-01 18:00:12 +01:00
|
|
|
snprintf(Cache.Region, sizeof(Cache.Region), "%s", TitleList[i].Region.c_str());
|
2011-07-26 00:28:22 +02:00
|
|
|
Cache.ParentalRating = TitleList[i].ParentalRating;
|
|
|
|
Cache.PlayersCount = TitleList[i].PlayersCount;
|
2012-01-08 19:24:46 +01:00
|
|
|
Cache.FromWiiTDB = TitleList[i].FromWiiTDB;
|
2011-02-11 18:41:52 +01:00
|
|
|
|
2011-07-26 00:28:22 +02:00
|
|
|
fwrite(&Cache, 1, sizeof(CacheTitle), f);
|
|
|
|
}
|
2011-02-11 18:41:52 +01:00
|
|
|
|
2011-07-26 00:28:22 +02:00
|
|
|
fclose(f);
|
2011-02-11 18:41:52 +01:00
|
|
|
}
|
|
|
|
|
2011-12-22 23:44:48 +01:00
|
|
|
void CGameTitles::GetMissingTitles(std::vector<std::string> &MissingTitles, bool removeUnused)
|
2011-02-11 18:41:52 +01:00
|
|
|
{
|
2011-12-22 23:44:48 +01:00
|
|
|
std::vector<struct discHdr *> &FullList = gameList.GetFilteredList();
|
2011-07-26 00:28:22 +02:00
|
|
|
std::vector<bool> UsedCachedList(TitleList.size(), false);
|
|
|
|
|
2011-11-12 19:14:09 +01:00
|
|
|
for(u32 i = 0; i < FullList.size(); ++i)
|
|
|
|
{
|
|
|
|
bool isCached = false;
|
|
|
|
|
|
|
|
for(u32 n = 0; n < TitleList.size(); ++n)
|
|
|
|
{
|
2011-12-22 23:44:48 +01:00
|
|
|
if(strncasecmp(TitleList[n].GameID, (const char *) FullList[i]->id, 6) == 0)
|
2011-11-12 19:14:09 +01:00
|
|
|
{
|
|
|
|
UsedCachedList[n] = true;
|
2012-01-08 19:24:46 +01:00
|
|
|
//! If the title is not from WiiTDB, try to reload it
|
|
|
|
isCached = TitleList[n].FromWiiTDB;
|
2011-11-12 19:14:09 +01:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if(!isCached)
|
|
|
|
{
|
|
|
|
char gameID[7];
|
2011-12-22 23:44:48 +01:00
|
|
|
snprintf(gameID, sizeof(gameID), (const char *) FullList[i]->id);
|
2011-11-12 19:14:09 +01:00
|
|
|
MissingTitles.push_back(std::string(gameID));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-12-22 23:44:48 +01:00
|
|
|
if(!removeUnused)
|
|
|
|
return;
|
2011-07-26 00:28:22 +02:00
|
|
|
|
|
|
|
for(u32 n = 0; n < TitleList.size(); ++n)
|
|
|
|
{
|
|
|
|
if(!UsedCachedList[n])
|
2011-12-22 23:44:48 +01:00
|
|
|
{
|
2011-07-26 00:28:22 +02:00
|
|
|
TitleList.erase(TitleList.begin()+n);
|
2011-12-22 23:44:48 +01:00
|
|
|
n--;
|
|
|
|
}
|
2011-07-26 00:28:22 +02:00
|
|
|
}
|
2011-02-11 18:41:52 +01:00
|
|
|
}
|
|
|
|
|
2012-01-08 19:24:46 +01:00
|
|
|
void CGameTitles::LoadTitlesFromGameTDB(const char * path, bool removeUnused)
|
2010-12-03 19:38:57 +01:00
|
|
|
{
|
2011-07-26 00:28:22 +02:00
|
|
|
if(!path || !Settings.titlesOverride)
|
|
|
|
return;
|
2010-12-03 19:38:57 +01:00
|
|
|
|
2011-07-26 00:28:22 +02:00
|
|
|
std::string Filepath = path;
|
|
|
|
if(path[strlen(path)-1] != '/')
|
|
|
|
Filepath += '/';
|
2011-02-11 18:41:52 +01:00
|
|
|
|
2011-07-26 00:28:22 +02:00
|
|
|
Filepath += "wiitdb.xml";
|
2010-12-03 19:38:57 +01:00
|
|
|
|
2011-07-26 00:28:22 +02:00
|
|
|
//! Read game list
|
|
|
|
gameList.LoadUnfiltered();
|
2011-02-11 18:41:52 +01:00
|
|
|
|
2011-07-26 00:28:22 +02:00
|
|
|
//! Removed unused cache titles and get the still missing ones
|
|
|
|
std::vector<std::string> MissingTitles;
|
2011-12-22 23:44:48 +01:00
|
|
|
GetMissingTitles(MissingTitles, removeUnused);
|
|
|
|
|
2011-07-26 00:28:22 +02:00
|
|
|
if(MissingTitles.size() == 0)
|
|
|
|
return;
|
2011-02-11 18:41:52 +01:00
|
|
|
|
2011-07-26 00:28:22 +02:00
|
|
|
std::string Title;
|
2011-02-11 18:41:52 +01:00
|
|
|
|
2011-10-21 20:48:10 +02:00
|
|
|
GameTDB XML_DB(Filepath.c_str());
|
2011-07-26 00:28:22 +02:00
|
|
|
XML_DB.SetLanguageCode(Settings.db_language);
|
|
|
|
int Rating;
|
|
|
|
std::string RatValTxt;
|
2023-01-01 18:00:12 +01:00
|
|
|
std::string Region;
|
2010-12-03 19:38:57 +01:00
|
|
|
|
2011-07-26 00:28:22 +02:00
|
|
|
for(u32 i = 0; i < MissingTitles.size(); ++i)
|
|
|
|
{
|
|
|
|
if(!XML_DB.GetTitle(MissingTitles[i].c_str(), Title))
|
|
|
|
continue;
|
*Completely rewrote the asynchron GuiImageData class (problems from switch Carousel<->Grid layour should be fixed now)
*Fixed bug mounting a wbfs partition which was formatted from an ext partition
*Rewrote the parental control feature. Removed loading pin or settings from the Wii Settings. Parental control is now completely managed in the loader from the settings selected and the password set.
*Saving password in config file is now encrypted
*Added loop to wait for usb when reloading the cIOS before game start
The parental control feature is filtering games like following when usb loader is locked:
level 0 (everyone 0+) > shows only games with lvl 0
level 1 (childs 7+) > shows games with lvl 0, 1
level 2 (teens 12+) > shows games with lvl 0, 1, 2
level 3 (mature 16+) > shows games with lvl 0, 1, 2, 3
level 4 (adults only 18+) > shows all games (lvl 0, 1, 2, 3, 4)
level 4 is default when creating new configs
2010-12-19 19:20:33 +01:00
|
|
|
|
2023-01-01 18:00:12 +01:00
|
|
|
if(XML_DB.GetRegion(MissingTitles[i].c_str(), Region))
|
|
|
|
this->SetGameTitle(MissingTitles[i].c_str(), Title.c_str(), Region);
|
|
|
|
else
|
|
|
|
this->SetGameTitle(MissingTitles[i].c_str(), Title.c_str());
|
2012-01-08 19:24:46 +01:00
|
|
|
//! Title is loaded from WiiTDB, remember that it's good
|
|
|
|
TitleList[TitleList.size()-1].FromWiiTDB = 1;
|
*Completely rewrote the asynchron GuiImageData class (problems from switch Carousel<->Grid layour should be fixed now)
*Fixed bug mounting a wbfs partition which was formatted from an ext partition
*Rewrote the parental control feature. Removed loading pin or settings from the Wii Settings. Parental control is now completely managed in the loader from the settings selected and the password set.
*Saving password in config file is now encrypted
*Added loop to wait for usb when reloading the cIOS before game start
The parental control feature is filtering games like following when usb loader is locked:
level 0 (everyone 0+) > shows only games with lvl 0
level 1 (childs 7+) > shows games with lvl 0, 1
level 2 (teens 12+) > shows games with lvl 0, 1, 2
level 3 (mature 16+) > shows games with lvl 0, 1, 2, 3
level 4 (adults only 18+) > shows all games (lvl 0, 1, 2, 3, 4)
level 4 is default when creating new configs
2010-12-19 19:20:33 +01:00
|
|
|
|
2011-07-26 00:28:22 +02:00
|
|
|
Rating = XML_DB.GetRating(MissingTitles[i].c_str());
|
|
|
|
if(Rating < 0)
|
|
|
|
continue;
|
*Completely rewrote the asynchron GuiImageData class (problems from switch Carousel<->Grid layour should be fixed now)
*Fixed bug mounting a wbfs partition which was formatted from an ext partition
*Rewrote the parental control feature. Removed loading pin or settings from the Wii Settings. Parental control is now completely managed in the loader from the settings selected and the password set.
*Saving password in config file is now encrypted
*Added loop to wait for usb when reloading the cIOS before game start
The parental control feature is filtering games like following when usb loader is locked:
level 0 (everyone 0+) > shows only games with lvl 0
level 1 (childs 7+) > shows games with lvl 0, 1
level 2 (teens 12+) > shows games with lvl 0, 1, 2
level 3 (mature 16+) > shows games with lvl 0, 1, 2, 3
level 4 (adults only 18+) > shows all games (lvl 0, 1, 2, 3, 4)
level 4 is default when creating new configs
2010-12-19 19:20:33 +01:00
|
|
|
|
2011-07-26 00:28:22 +02:00
|
|
|
if(!XML_DB.GetRatingValue(MissingTitles[i].c_str(), RatValTxt))
|
|
|
|
continue;
|
*Completely rewrote the asynchron GuiImageData class (problems from switch Carousel<->Grid layour should be fixed now)
*Fixed bug mounting a wbfs partition which was formatted from an ext partition
*Rewrote the parental control feature. Removed loading pin or settings from the Wii Settings. Parental control is now completely managed in the loader from the settings selected and the password set.
*Saving password in config file is now encrypted
*Added loop to wait for usb when reloading the cIOS before game start
The parental control feature is filtering games like following when usb loader is locked:
level 0 (everyone 0+) > shows only games with lvl 0
level 1 (childs 7+) > shows games with lvl 0, 1
level 2 (teens 12+) > shows games with lvl 0, 1, 2
level 3 (mature 16+) > shows games with lvl 0, 1, 2, 3
level 4 (adults only 18+) > shows all games (lvl 0, 1, 2, 3, 4)
level 4 is default when creating new configs
2010-12-19 19:20:33 +01:00
|
|
|
|
2011-10-21 20:48:10 +02:00
|
|
|
TitleList[TitleList.size()-1].ParentalRating = GameTDB::ConvertRating(RatValTxt.c_str(), GameTDB::RatingToString(Rating), "PEGI");
|
2011-07-26 00:28:22 +02:00
|
|
|
int ret = XML_DB.GetPlayers(MissingTitles[i].c_str());
|
|
|
|
if(ret > 0)
|
|
|
|
TitleList[TitleList.size()-1].PlayersCount = ret;
|
|
|
|
}
|
2023-01-01 18:00:12 +01:00
|
|
|
XML_DB.CloseFile();
|
2010-12-03 19:38:57 +01:00
|
|
|
}
|