mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-30 15:14:18 +01:00
-set up limits of fmt to prevent some missing words
-corrected a few spelling mistakes in menu_nandemu -removed unneeded std:: from menu and menu_game
This commit is contained in:
parent
6abfa87e0e
commit
be5195aa96
@ -58,8 +58,8 @@ private:
|
|||||||
// Nothing to do with CText. Q&D helpers for string formating.
|
// Nothing to do with CText. Q&D helpers for string formating.
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
MAX_MSG_SIZE = 512,
|
MAX_MSG_SIZE = 1024,
|
||||||
MAX_USES = 8
|
MAX_USES = 16,
|
||||||
};
|
};
|
||||||
|
|
||||||
const char *fmt(const char *format, ...);
|
const char *fmt(const char *format, ...);
|
||||||
|
@ -71,7 +71,7 @@ private:
|
|||||||
Config m_version;
|
Config m_version;
|
||||||
Plugin m_plugin;
|
Plugin m_plugin;
|
||||||
Channels m_channels;
|
Channels m_channels;
|
||||||
vector<std::string> m_homebrewArgs;
|
vector<string> m_homebrewArgs;
|
||||||
SmartBuf m_base_font;
|
SmartBuf m_base_font;
|
||||||
u32 m_base_font_size;
|
u32 m_base_font_size;
|
||||||
u8 m_aa;
|
u8 m_aa;
|
||||||
@ -80,44 +80,44 @@ private:
|
|||||||
bool m_locked;
|
bool m_locked;
|
||||||
bool m_favorites;
|
bool m_favorites;
|
||||||
s16 m_showtimer;
|
s16 m_showtimer;
|
||||||
std::string m_curLanguage;
|
string m_curLanguage;
|
||||||
std::string m_curGameId;
|
string m_curGameId;
|
||||||
std::string m_curChanId;
|
string m_curChanId;
|
||||||
|
|
||||||
u8 m_numCFVersions;
|
u8 m_numCFVersions;
|
||||||
|
|
||||||
std::string m_themeDataDir;
|
string m_themeDataDir;
|
||||||
std::string m_appDir;
|
string m_appDir;
|
||||||
std::string m_dataDir;
|
string m_dataDir;
|
||||||
std::string m_pluginsDir;
|
string m_pluginsDir;
|
||||||
std::string m_picDir;
|
string m_picDir;
|
||||||
std::string m_boxPicDir;
|
string m_boxPicDir;
|
||||||
std::string m_cpicDir;
|
string m_cpicDir;
|
||||||
std::string m_boxcPicDir;
|
string m_boxcPicDir;
|
||||||
std::string m_cacheDir;
|
string m_cacheDir;
|
||||||
std::string m_themeDir;
|
string m_themeDir;
|
||||||
std::string m_musicDir;
|
string m_musicDir;
|
||||||
std::string m_txtCheatDir;
|
string m_txtCheatDir;
|
||||||
std::string m_cheatDir;
|
string m_cheatDir;
|
||||||
std::string m_wipDir;
|
string m_wipDir;
|
||||||
std::string m_videoDir;
|
string m_videoDir;
|
||||||
std::string m_fanartDir;
|
string m_fanartDir;
|
||||||
std::string m_screenshotDir;
|
string m_screenshotDir;
|
||||||
std::string m_settingsDir;
|
string m_settingsDir;
|
||||||
std::string m_languagesDir;
|
string m_languagesDir;
|
||||||
std::string m_listCacheDir;
|
string m_listCacheDir;
|
||||||
std::string m_DMLgameDir;
|
string m_DMLgameDir;
|
||||||
std::string m_helpDir;
|
string m_helpDir;
|
||||||
/* Updates */
|
/* Updates */
|
||||||
char m_app_update_drive[6];
|
char m_app_update_drive[6];
|
||||||
const char* m_app_update_url;
|
const char* m_app_update_url;
|
||||||
const char* m_data_update_url;
|
const char* m_data_update_url;
|
||||||
std::string m_dol;
|
string m_dol;
|
||||||
std::string m_app_update_zip;
|
string m_app_update_zip;
|
||||||
u32 m_app_update_size;
|
u32 m_app_update_size;
|
||||||
std::string m_data_update_zip;
|
string m_data_update_zip;
|
||||||
u32 m_data_update_size;
|
u32 m_data_update_size;
|
||||||
std::string m_ver;
|
string m_ver;
|
||||||
/* End Updates */
|
/* End Updates */
|
||||||
//
|
//
|
||||||
STexture m_prevBg;
|
STexture m_prevBg;
|
||||||
@ -373,6 +373,12 @@ private:
|
|||||||
s8 _versionDownloader();
|
s8 _versionDownloader();
|
||||||
s8 _versionTxtDownloader();
|
s8 _versionTxtDownloader();
|
||||||
//Game menu
|
//Game menu
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
LOAD_IOS_FAILED = 0,
|
||||||
|
LOAD_IOS_SUCCEEDED,
|
||||||
|
LOAD_IOS_NOT_NEEDED
|
||||||
|
};
|
||||||
u32 m_gameLblInfo;
|
u32 m_gameLblInfo;
|
||||||
u32 m_gameBtnFavoriteOn;
|
u32 m_gameBtnFavoriteOn;
|
||||||
u32 m_gameBtnFavoriteOff;
|
u32 m_gameBtnFavoriteOff;
|
||||||
@ -556,7 +562,7 @@ private:
|
|||||||
u32 m_categoryLblUser[4];
|
u32 m_categoryLblUser[4];
|
||||||
u8 m_max_categories;
|
u8 m_max_categories;
|
||||||
// NandEmulation menu
|
// NandEmulation menu
|
||||||
std::string m_saveExtGameId;
|
string m_saveExtGameId;
|
||||||
bool m_nandext;
|
bool m_nandext;
|
||||||
bool m_fulldump;
|
bool m_fulldump;
|
||||||
bool m_sgdump;
|
bool m_sgdump;
|
||||||
@ -681,7 +687,7 @@ private:
|
|||||||
volatile bool m_thrdNetwork;
|
volatile bool m_thrdNetwork;
|
||||||
float m_thrdStep;
|
float m_thrdStep;
|
||||||
float m_thrdStepLen;
|
float m_thrdStepLen;
|
||||||
std::string m_coverDLGameId;
|
string m_coverDLGameId;
|
||||||
mutex_t m_mutex;
|
mutex_t m_mutex;
|
||||||
wstringEx m_thrdMessage;
|
wstringEx m_thrdMessage;
|
||||||
volatile float m_thrdProgress;
|
volatile float m_thrdProgress;
|
||||||
@ -698,11 +704,17 @@ private:
|
|||||||
bool m_video_playing;
|
bool m_video_playing;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum WBFS_OP { WO_ADD_GAME, WO_REMOVE_GAME, WO_FORMAT, WO_COPY_GAME };
|
enum WBFS_OP
|
||||||
typedef std::pair<std::string, u32> FontDesc;
|
{
|
||||||
typedef std::map<FontDesc, SFont> FontSet;
|
WO_ADD_GAME,
|
||||||
typedef std::map<std::string, STexture> TexSet;
|
WO_REMOVE_GAME,
|
||||||
typedef std::map<std::string, SmartGuiSound > SoundSet;
|
WO_FORMAT,
|
||||||
|
WO_COPY_GAME,
|
||||||
|
};
|
||||||
|
typedef pair<string, u32> FontDesc;
|
||||||
|
typedef map<FontDesc, SFont> FontSet;
|
||||||
|
typedef map<string, STexture> TexSet;
|
||||||
|
typedef map<string, SmartGuiSound > SoundSet;
|
||||||
struct SThemeData
|
struct SThemeData
|
||||||
{
|
{
|
||||||
TexSet texSet;
|
TexSet texSet;
|
||||||
@ -799,8 +811,22 @@ private:
|
|||||||
};
|
};
|
||||||
struct SCFParamDesc
|
struct SCFParamDesc
|
||||||
{
|
{
|
||||||
enum { PDT_EMPTY, PDT_FLOAT, PDT_V3D, PDT_COLOR, PDT_BOOL, PDT_INT, PDT_TXTSTYLE } paramType[4];
|
enum
|
||||||
enum { PDD_BOTH, PDD_NORMAL, PDD_SELECTED } domain;
|
{
|
||||||
|
PDT_EMPTY,
|
||||||
|
PDT_FLOAT,
|
||||||
|
PDT_V3D,
|
||||||
|
PDT_COLOR,
|
||||||
|
PDT_BOOL,
|
||||||
|
PDT_INT,
|
||||||
|
PDT_TXTSTYLE,
|
||||||
|
} paramType[4];
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
PDD_BOTH,
|
||||||
|
PDD_NORMAL,
|
||||||
|
PDD_SELECTED,
|
||||||
|
} domain;
|
||||||
bool scrnFmt;
|
bool scrnFmt;
|
||||||
const char name[32];
|
const char name[32];
|
||||||
const char valName[4][64];
|
const char valName[4][64];
|
||||||
@ -939,7 +965,7 @@ private:
|
|||||||
};
|
};
|
||||||
void _cfNeedsUpdate(void);
|
void _cfNeedsUpdate(void);
|
||||||
void _game(bool launch = false);
|
void _game(bool launch = false);
|
||||||
void _download(std::string gameId = std::string());
|
void _download(string gameId = string());
|
||||||
bool _code(char code[4], bool erase = false);
|
bool _code(char code[4], bool erase = false);
|
||||||
void _about(void);
|
void _about(void);
|
||||||
bool _wbfsOp(WBFS_OP op);
|
bool _wbfsOp(WBFS_OP op);
|
||||||
@ -958,21 +984,21 @@ private:
|
|||||||
vector<dir_discHdr> _searchGamesByType(const char type);
|
vector<dir_discHdr> _searchGamesByType(const char type);
|
||||||
vector<dir_discHdr> _searchGamesByRegion(const char region); */
|
vector<dir_discHdr> _searchGamesByRegion(const char region); */
|
||||||
public:
|
public:
|
||||||
void _directlaunch(const std::string &id);
|
void _directlaunch(const string &id);
|
||||||
private:
|
private:
|
||||||
bool _loadFile(SmartBuf &buffer, u32 &size, const char *path, const char *file);
|
bool _loadFile(SmartBuf &buffer, u32 &size, const char *path, const char *file);
|
||||||
int _loadIOS(u8 ios, string id);
|
int _loadIOS(u8 ios, string id);
|
||||||
void _launch(dir_discHdr *hdr);
|
void _launch(dir_discHdr *hdr);
|
||||||
void _launchGame(dir_discHdr *hdr, bool dvd);
|
void _launchGame(dir_discHdr *hdr, bool dvd);
|
||||||
void _launchChannel(dir_discHdr *hdr);
|
void _launchChannel(dir_discHdr *hdr);
|
||||||
void _launchHomebrew(const char *filepath, vector<std::string> arguments);
|
void _launchHomebrew(const char *filepath, vector<string> arguments);
|
||||||
void _launchGC(dir_discHdr *hdr, bool DML);
|
void _launchGC(dir_discHdr *hdr, bool DML);
|
||||||
void _setAA(int aa);
|
void _setAA(int aa);
|
||||||
void _loadCFCfg(SThemeData &theme);
|
void _loadCFCfg(SThemeData &theme);
|
||||||
void _loadCFLayout(int version, bool forceAA = false, bool otherScrnFmt = false);
|
void _loadCFLayout(int version, bool forceAA = false, bool otherScrnFmt = false);
|
||||||
Vector3D _getCFV3D(const std::string &domain, const std::string &key, const Vector3D &def, bool otherScrnFmt = false);
|
Vector3D _getCFV3D(const string &domain, const string &key, const Vector3D &def, bool otherScrnFmt = false);
|
||||||
int _getCFInt(const std::string &domain, const std::string &key, int def, bool otherScrnFmt = false);
|
int _getCFInt(const string &domain, const string &key, int def, bool otherScrnFmt = false);
|
||||||
float _getCFFloat(const std::string &domain, const std::string &key, float def, bool otherScrnFmt = false);
|
float _getCFFloat(const string &domain, const string &key, float def, bool otherScrnFmt = false);
|
||||||
void _cfParam(bool inc, int i, const SCFParamDesc &p, int cfVersion, bool wide);
|
void _cfParam(bool inc, int i, const SCFParamDesc &p, int cfVersion, bool wide);
|
||||||
void _buildMenus(void);
|
void _buildMenus(void);
|
||||||
void _loadDefaultFont(bool korean);
|
void _loadDefaultFont(bool korean);
|
||||||
@ -1073,8 +1099,8 @@ private:
|
|||||||
static const SOption _hooktype[8];
|
static const SOption _hooktype[8];
|
||||||
static const SOption _exitTo[6];
|
static const SOption _exitTo[6];
|
||||||
static const SOption _DumpMode[4];
|
static const SOption _DumpMode[4];
|
||||||
static std::map<u8, u8> _installed_cios;
|
static map<u8, u8> _installed_cios;
|
||||||
typedef std::map<u8, u8>::iterator CIOSItr;
|
typedef map<u8, u8>::iterator CIOSItr;
|
||||||
static int _version[9];
|
static int _version[9];
|
||||||
static const SCFParamDesc _cfParams[];
|
static const SCFParamDesc _cfParams[];
|
||||||
static const int _nbCfgPages;
|
static const int _nbCfgPages;
|
||||||
|
@ -220,7 +220,7 @@ const CMenu::SOption CMenu::_DumpMode[4] = {
|
|||||||
{ "DumpLMss", L"List Missing" },
|
{ "DumpLMss", L"List Missing" },
|
||||||
};
|
};
|
||||||
|
|
||||||
std::map<u8, u8> CMenu::_installed_cios;
|
map<u8, u8> CMenu::_installed_cios;
|
||||||
u8 banner_title[84];
|
u8 banner_title[84];
|
||||||
|
|
||||||
static inline int loopNum(int i, int s)
|
static inline int loopNum(int i, int s)
|
||||||
@ -638,12 +638,12 @@ void CMenu::_launch(dir_discHdr *hdr)
|
|||||||
m_gcfg2.load(fmt("%s/gameconfig2.ini", m_settingsDir.c_str()));
|
m_gcfg2.load(fmt("%s/gameconfig2.ini", m_settingsDir.c_str()));
|
||||||
if(hdr->hdr.gc_magic == 0x4c4f4c4f)
|
if(hdr->hdr.gc_magic == 0x4c4f4c4f)
|
||||||
{
|
{
|
||||||
string title(&hdr->path[std::string(hdr->path).find_last_of("/")+1]);
|
string title(&hdr->path[string(hdr->path).find_last_of("/")+1]);
|
||||||
string wiiflow_dol(m_dol);
|
string wiiflow_dol(m_dol);
|
||||||
if(strstr(wiiflow_dol.c_str(), "sd:/") == NULL)
|
if(strstr(wiiflow_dol.c_str(), "sd:/") == NULL)
|
||||||
wiiflow_dol.erase(3,1);
|
wiiflow_dol.erase(3,1);
|
||||||
string path((char*)hdr->path, size_t(strlen((char*)hdr->path) - title.size()));
|
string path((char*)hdr->path, size_t(strlen((char*)hdr->path) - title.size()));
|
||||||
vector<std::string> arguments;
|
vector<string> arguments;
|
||||||
gprintf("Game title: %s\n", title.c_str());
|
gprintf("Game title: %s\n", title.c_str());
|
||||||
if(strstr(path.c_str(), ":/") != NULL)
|
if(strstr(path.c_str(), ":/") != NULL)
|
||||||
{
|
{
|
||||||
@ -655,7 +655,7 @@ void CMenu::_launch(dir_discHdr *hdr)
|
|||||||
arguments.push_back(sfmt("%s/WiiFlowLoader.dol",m_pluginsDir.c_str()));
|
arguments.push_back(sfmt("%s/WiiFlowLoader.dol",m_pluginsDir.c_str()));
|
||||||
else
|
else
|
||||||
arguments.push_back(wiiflow_dol);
|
arguments.push_back(wiiflow_dol);
|
||||||
m_cfg.setString("EMULATOR", "current_item", &hdr->path[std::string(hdr->path).find_last_of("/")]);
|
m_cfg.setString("EMULATOR", "current_item", &hdr->path[string(hdr->path).find_last_of("/")]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -769,7 +769,7 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool DML)
|
|||||||
Sys_LoadMenu();
|
Sys_LoadMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMenu::_launchHomebrew(const char *filepath, vector<std::string> arguments)
|
void CMenu::_launchHomebrew(const char *filepath, vector<string> arguments)
|
||||||
{
|
{
|
||||||
gprintf("Filepath of homebrew: %s\n",filepath);
|
gprintf("Filepath of homebrew: %s\n",filepath);
|
||||||
if(LoadHomebrew(filepath))
|
if(LoadHomebrew(filepath))
|
||||||
@ -796,8 +796,6 @@ void CMenu::_launchHomebrew(const char *filepath, vector<std::string> arguments)
|
|||||||
m_exit = true;
|
m_exit = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum {LOAD_IOS_FAILED = 0, LOAD_IOS_SUCCEEDED, LOAD_IOS_NOT_NEEDED};
|
|
||||||
|
|
||||||
int CMenu::_loadIOS(u8 ios, string id)
|
int CMenu::_loadIOS(u8 ios, string id)
|
||||||
{
|
{
|
||||||
int gameIOS = 0;
|
int gameIOS = 0;
|
||||||
|
@ -13,7 +13,7 @@ static inline int loopNum(int i, int s)
|
|||||||
return i < 0 ? (s - (-i % s)) % s : i % s;
|
return i < 0 ? (s - (-i % s)) % s : i % s;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool _saveExcists(const char *path)
|
static bool _saveExists(const char *path)
|
||||||
{
|
{
|
||||||
DIR *d;
|
DIR *d;
|
||||||
d = opendir(path);
|
d = opendir(path);
|
||||||
@ -28,7 +28,7 @@ static bool _saveExcists(const char *path)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool _nandSaveExcists(const char *npath)
|
static bool _nandSaveExists(const char *npath)
|
||||||
{
|
{
|
||||||
u32 temp = 0;
|
u32 temp = 0;
|
||||||
|
|
||||||
@ -211,7 +211,7 @@ int CMenu::_NandEmuCfg(void)
|
|||||||
m_btnMgr.setText(m_nandfileLblMessage, L"");
|
m_btnMgr.setText(m_nandfileLblMessage, L"");
|
||||||
m_btnMgr.setText(m_nandemuLblDialog, _t("cfgne11", L"Overall progress:"));
|
m_btnMgr.setText(m_nandemuLblDialog, _t("cfgne11", L"Overall progress:"));
|
||||||
if(m_fulldump)
|
if(m_fulldump)
|
||||||
m_btnMgr.setText(m_nandemuLblTitle, _t("cfgne12", L"Nand extractor"));
|
m_btnMgr.setText(m_nandemuLblTitle, _t("cfgne12", L"NAND extractor"));
|
||||||
else
|
else
|
||||||
m_btnMgr.setText(m_nandemuLblTitle, _t("cfgne13", L"Game save extractor"));
|
m_btnMgr.setText(m_nandemuLblTitle, _t("cfgne13", L"Game save extractor"));
|
||||||
m_thrdStop = false;
|
m_thrdStop = false;
|
||||||
@ -238,17 +238,14 @@ int CMenu::_NandEmuCfg(void)
|
|||||||
|
|
||||||
if (!m_thrdWorking)
|
if (!m_thrdWorking)
|
||||||
{
|
{
|
||||||
|
|
||||||
if(m_sgdump)
|
if(m_sgdump)
|
||||||
m_btnMgr.setText(m_nandfinLblDialog, wfmt(_fmt("cfgne14", L"Extracted: %d saves / %d files / %d folders"), m_nandexentry, m_filesdone, m_foldersdone));
|
m_btnMgr.setText(m_nandfinLblDialog, wfmt(_fmt("cfgne14", L"Extracted: %d saves / %d files / %d folders"), m_nandexentry, m_filesdone, m_foldersdone));
|
||||||
else
|
else
|
||||||
m_btnMgr.setText(m_nandfinLblDialog, wfmt(_fmt("cfgne15", L"Extracted: %d files / %d folders"), m_filesdone, m_foldersdone));
|
m_btnMgr.setText(m_nandfinLblDialog, wfmt(_fmt("cfgne15", L"Extracted: %d files / %d folders"), m_filesdone, m_foldersdone));
|
||||||
if(m_dumpsize/0x400 > 0x270f)
|
if(m_dumpsize/0x400 > 0x270f)
|
||||||
m_btnMgr.setText(m_nandemuLblDialog, wfmt(_fmt("cfgne16", L"Total size: %uMb (%d blocks)"), (m_dumpsize/0x100000), (m_dumpsize/0x8000)>>2));
|
m_btnMgr.setText(m_nandemuLblDialog, wfmt(_fmt("cfgne16", L"Total size: %uMB (%d blocks)"), (m_dumpsize/0x100000), (m_dumpsize/0x8000)>>2));
|
||||||
else
|
else
|
||||||
m_btnMgr.setText(m_nandemuLblDialog, wfmt(_fmt("cfgne17", L"Total size: %ukb (%d blocks)"), (m_dumpsize/0x400), (m_dumpsize/0x8000)>>2));
|
m_btnMgr.setText(m_nandemuLblDialog, wfmt(_fmt("cfgne17", L"Total size: %uKB (%d blocks)"), (m_dumpsize/0x400), (m_dumpsize/0x8000)>>2));
|
||||||
|
|
||||||
|
|
||||||
m_btnMgr.show(m_nandemuBtnBack);
|
m_btnMgr.show(m_nandemuBtnBack);
|
||||||
m_btnMgr.show(m_nandfinLblDialog);
|
m_btnMgr.show(m_nandfinLblDialog);
|
||||||
}
|
}
|
||||||
@ -265,7 +262,7 @@ int CMenu::_AutoExtractSave(string gameId)
|
|||||||
string npath = sfmt("/title/00010000/%x", savePath);
|
string npath = sfmt("/title/00010000/%x", savePath);
|
||||||
string path = sfmt("%s:%s/title/00010000/%x", DeviceName[emuPartition], m_cfg.getString("GAMES", "savepath", m_cfg.getString("NAND", "path", "")).c_str(), savePath);
|
string path = sfmt("%s:%s/title/00010000/%x", DeviceName[emuPartition], m_cfg.getString("GAMES", "savepath", m_cfg.getString("NAND", "path", "")).c_str(), savePath);
|
||||||
|
|
||||||
if(!_nandSaveExcists(npath.c_str()) || (!m_forceext && _saveExcists(path.c_str())))
|
if(!_nandSaveExists(npath.c_str()) || (!m_forceext && _saveExists(path.c_str())))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
lwp_t thread = 0;
|
lwp_t thread = 0;
|
||||||
@ -278,7 +275,7 @@ int CMenu::_AutoExtractSave(string gameId)
|
|||||||
{
|
{
|
||||||
m_btnMgr.setText(m_nandemuBtnExtract, _t("cfgne24", L"Extract save"));
|
m_btnMgr.setText(m_nandemuBtnExtract, _t("cfgne24", L"Extract save"));
|
||||||
m_btnMgr.setText(m_nandemuBtnDisable, _t("cfgne25", L"Create new save"));
|
m_btnMgr.setText(m_nandemuBtnDisable, _t("cfgne25", L"Create new save"));
|
||||||
m_btnMgr.setText(m_nandemuLblInit, _t("cfgne26", L"A save file for this game was created on real nand. Extract existing safe file from real nand or create new file for nand emulation?"));
|
m_btnMgr.setText(m_nandemuLblInit, _t("cfgne26", L"A save file for this game was created on real NAND. Extract existing save file from real nand or create new file for NAND Emulation?"));
|
||||||
m_btnMgr.show(m_nandemuBtnExtract);
|
m_btnMgr.show(m_nandemuBtnExtract);
|
||||||
m_btnMgr.show(m_nandemuBtnDisable);
|
m_btnMgr.show(m_nandemuBtnDisable);
|
||||||
m_btnMgr.show(m_nandemuLblInit);
|
m_btnMgr.show(m_nandemuLblInit);
|
||||||
@ -333,9 +330,9 @@ int CMenu::_AutoExtractSave(string gameId)
|
|||||||
{
|
{
|
||||||
m_btnMgr.setText(m_nandfinLblDialog, wfmt(_fmt("cfgne14", L"Extracted: %d saves / %d files / %d folders"), m_nandexentry, m_filesdone, m_foldersdone));
|
m_btnMgr.setText(m_nandfinLblDialog, wfmt(_fmt("cfgne14", L"Extracted: %d saves / %d files / %d folders"), m_nandexentry, m_filesdone, m_foldersdone));
|
||||||
if(m_dumpsize/0x400 > 0x270f)
|
if(m_dumpsize/0x400 > 0x270f)
|
||||||
m_btnMgr.setText(m_nandemuLblDialog, wfmt(_fmt("cfgne16", L"Total size: %uMb (%d blocks)"), (m_dumpsize/0x100000), (m_dumpsize/0x8000)>>2));
|
m_btnMgr.setText(m_nandemuLblDialog, wfmt(_fmt("cfgne16", L"Total size: %uMB (%d blocks)"), (m_dumpsize/0x100000), (m_dumpsize/0x8000)>>2));
|
||||||
else
|
else
|
||||||
m_btnMgr.setText(m_nandemuLblDialog, wfmt(_fmt("cfgne17", L"Total size: %ukb (%d blocks)"), (m_dumpsize/0x400), (m_dumpsize/0x8000)>>2));
|
m_btnMgr.setText(m_nandemuLblDialog, wfmt(_fmt("cfgne17", L"Total size: %uKB (%d blocks)"), (m_dumpsize/0x400), (m_dumpsize/0x8000)>>2));
|
||||||
|
|
||||||
_hideNandEmu();
|
_hideNandEmu();
|
||||||
return 1;
|
return 1;
|
||||||
@ -354,9 +351,9 @@ int CMenu::_AutoCreateNand(void)
|
|||||||
m_thrdMessageAdded = false;
|
m_thrdMessageAdded = false;
|
||||||
m_nandext = false;
|
m_nandext = false;
|
||||||
|
|
||||||
m_btnMgr.setText(m_nandemuBtnExtract, _t("cfgne5", L"Extract nand"));
|
m_btnMgr.setText(m_nandemuBtnExtract, _t("cfgne5", L"Extract NAND"));
|
||||||
m_btnMgr.setText(m_nandemuBtnDisable, _t("cfgne22", L"Disable nandemulation"));
|
m_btnMgr.setText(m_nandemuBtnDisable, _t("cfgne22", L"Disable NAND Emulation"));
|
||||||
m_btnMgr.setText(m_nandemuLblInit, _t("cfgne23", L"Welcome to WiiFlow. I have not found a valid nand for nand emulation. Click Extract to extract your nand, or click disable to disable nand emulation."));
|
m_btnMgr.setText(m_nandemuLblInit, _t("cfgne23", L"Welcome to WiiFlow. I have not found a valid nand for NAND Emulation. Click Extract to extract your NAND, or click disable to disable NAND Emulation."));
|
||||||
m_btnMgr.show(m_nandemuBtnExtract);
|
m_btnMgr.show(m_nandemuBtnExtract);
|
||||||
m_btnMgr.show(m_nandemuBtnDisable);
|
m_btnMgr.show(m_nandemuBtnDisable);
|
||||||
m_btnMgr.show(m_nandemuLblInit);
|
m_btnMgr.show(m_nandemuLblInit);
|
||||||
@ -380,7 +377,7 @@ int CMenu::_AutoCreateNand(void)
|
|||||||
m_btnMgr.setText(m_nandemuLblMessage, L"");
|
m_btnMgr.setText(m_nandemuLblMessage, L"");
|
||||||
m_btnMgr.setText(m_nandfileLblMessage, L"");
|
m_btnMgr.setText(m_nandfileLblMessage, L"");
|
||||||
m_btnMgr.setText(m_nandemuLblDialog, _t("cfgne11", L"Overall progress:"));
|
m_btnMgr.setText(m_nandemuLblDialog, _t("cfgne11", L"Overall progress:"));
|
||||||
m_btnMgr.setText(m_nandemuLblTitle, _t("cfgne12", L"Nand extractor"));
|
m_btnMgr.setText(m_nandemuLblTitle, _t("cfgne12", L"NAND Extractor"));
|
||||||
m_thrdStop = false;
|
m_thrdStop = false;
|
||||||
m_thrdProgress = 0.f;
|
m_thrdProgress = 0.f;
|
||||||
m_thrdWorking = true;
|
m_thrdWorking = true;
|
||||||
@ -467,7 +464,7 @@ int CMenu::_NandDumper(void *obj)
|
|||||||
|
|
||||||
if(!emuPartIsValid)
|
if(!emuPartIsValid)
|
||||||
{
|
{
|
||||||
m.error(sfmt("No valid FAT partition found for nandemulation!"));
|
m.error(sfmt("No valid FAT partition found for NAND Emulation!"));
|
||||||
m.m_thrdWorking = false;
|
m.m_thrdWorking = false;
|
||||||
m.m_btnMgr.hide(m.m_nandfilePBar);
|
m.m_btnMgr.hide(m.m_nandfilePBar);
|
||||||
m.m_btnMgr.hide(m.m_nandfileLblMessage);
|
m.m_btnMgr.hide(m.m_nandfileLblMessage);
|
||||||
@ -533,21 +530,19 @@ int CMenu::_NandDumper(void *obj)
|
|||||||
path = sfmt("%s/title/00010000/%x", basepath, savePath);
|
path = sfmt("%s/title/00010000/%x", basepath, savePath);
|
||||||
npath = sfmt("/title/00010000/%x", savePath);
|
npath = sfmt("/title/00010000/%x", savePath);
|
||||||
|
|
||||||
if(!missingOnly || !_saveExcists(path.c_str()))
|
if(!missingOnly || !_saveExists(path.c_str()))
|
||||||
{
|
{
|
||||||
if(_nandSaveExcists(npath.c_str()))
|
if(_nandSaveExists(npath.c_str()))
|
||||||
{
|
{
|
||||||
m.m_nandexentry++;
|
m.m_nandexentry++;
|
||||||
saveList.push_back(id);
|
saveList.push_back(id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
saveList.push_back(m.m_saveExtGameId);
|
saveList.push_back(m.m_saveExtGameId);
|
||||||
|
|
||||||
|
|
||||||
for(u32 i = 0; i < saveList.size() && !m.m_thrdStop; ++i)
|
for(u32 i = 0; i < saveList.size() && !m.m_thrdStop; ++i)
|
||||||
{
|
{
|
||||||
char source[ISFS_MAXPATH];
|
char source[ISFS_MAXPATH];
|
||||||
@ -600,7 +595,6 @@ void CMenu::_initNandEmuMenu(CMenu::SThemeData &theme)
|
|||||||
m_nandemuBtnDisable = _addButton(theme, "NANDEMU/DISABLE", theme.titleFont, L"", 72, 290, 496, 56, theme.titleFontColor);
|
m_nandemuBtnDisable = _addButton(theme, "NANDEMU/DISABLE", theme.titleFont, L"", 72, 290, 496, 56, theme.titleFontColor);
|
||||||
m_nandemuLblInit = _addLabel(theme, "NANDEMU/INIT", theme.lblFont, L"", 40, 40, 560, 140, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
m_nandemuLblInit = _addLabel(theme, "NANDEMU/INIT", theme.lblFont, L"", 40, 40, 560, 140, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||||
|
|
||||||
|
|
||||||
_setHideAnim(m_nandemuLblTitle, "NANDEMU/TITLE", 0, 0, -2.f, 0.f);
|
_setHideAnim(m_nandemuLblTitle, "NANDEMU/TITLE", 0, 0, -2.f, 0.f);
|
||||||
_setHideAnim(m_nandfileLblMessage, "NANDEMU/FMESSAGE", 0, 0, -2.f, 0.f);
|
_setHideAnim(m_nandfileLblMessage, "NANDEMU/FMESSAGE", 0, 0, -2.f, 0.f);
|
||||||
_setHideAnim(m_nandemuLblMessage, "NANDEMU/MESSAGE", 0, 0, -2.f, 0.f);
|
_setHideAnim(m_nandemuLblMessage, "NANDEMU/MESSAGE", 0, 0, -2.f, 0.f);
|
||||||
@ -629,11 +623,11 @@ void CMenu::_initNandEmuMenu(CMenu::SThemeData &theme)
|
|||||||
|
|
||||||
void CMenu::_textNandEmu(void)
|
void CMenu::_textNandEmu(void)
|
||||||
{
|
{
|
||||||
m_btnMgr.setText(m_nandemuLblEmulation, _t("cfgne1", L"Nand emulation"));
|
m_btnMgr.setText(m_nandemuLblEmulation, _t("cfgne1", L"NAND Emulation"));
|
||||||
m_btnMgr.setText(m_nandemuLblSaveDump, _t("cfgne2", L"Extract game saves"));
|
m_btnMgr.setText(m_nandemuLblSaveDump, _t("cfgne2", L"Extract game saves"));
|
||||||
m_btnMgr.setText(m_nandemuBtnAll, _t("cfgne3", L"All"));
|
m_btnMgr.setText(m_nandemuBtnAll, _t("cfgne3", L"All"));
|
||||||
m_btnMgr.setText(m_nandemuBtnMissing, _t("cfgne4", L"Missing"));
|
m_btnMgr.setText(m_nandemuBtnMissing, _t("cfgne4", L"Missing"));
|
||||||
m_btnMgr.setText(m_nandemuLblNandDump, _t("cfgne5", L"Extract nand"));
|
m_btnMgr.setText(m_nandemuLblNandDump, _t("cfgne5", L"Extract NAND"));
|
||||||
m_btnMgr.setText(m_nandemuBtnNandDump, _t("cfgne6", L"Start"));
|
m_btnMgr.setText(m_nandemuBtnNandDump, _t("cfgne6", L"Start"));
|
||||||
m_btnMgr.setText(m_nandemuBtnBack, _t("cfgne7", L"Back"));
|
m_btnMgr.setText(m_nandemuBtnBack, _t("cfgne7", L"Back"));
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user