WiiFlow_Lite/source/menu/menu_config_game.cpp

841 lines
30 KiB
C++
Raw Normal View History

2012-01-21 21:57:41 +01:00
#include "menu.hpp"
#include "types.h"
#include "loader/wbfs.h"
#include "libwbfs/wiidisc.h"
2012-01-21 21:57:41 +01:00
#define ARRAY_SIZE(a) (sizeof a / sizeof a[0])
u8 m_configGameMaxPgs = 5;
u8 m_configGamePage = 0;
static const dir_discHdr *GameHdr;
-updated NIN_CFG_VERSION to 7 for Nintendont argsboot and added triforce arcade option to game settings menu. tested and working. -fixed wii u widescreen option in game config menu. should properly work now. thanks pBullet! -added a fix for coverflow titles display when coverflow has 3 or more rows. for some reason 3 or more rows caused the title to display improperly. -removed **disabled** message from source menu. no need for it - was a stupid idea. if you don't want it to display then remove it from your source menu or don't add it. when a view is disabled in wiiflow_lite.ini then only that view icon is disabled from showing on the main menu screen. -removed titles.ini which wasn't really used except for displaying the return to channel in settings. I googled it and nothing really showed up. it seemed to be the same as custom_titles.ini - it seemed useless. -removed cacheing sourceflow list. the list is never big enuff to worry about cacheing. plus if you add or remove source btns you won't have to reload cache for the changes to take effect. -removed max_source_btns from wiiflow_lite.ini - added code to get highest source menu btn so now source menu can have as many buttons as you like. -removed Manage Languages Menu - restored option to just change wiiflow language. no need for downloading languages and the google link didn't work anyway. when i make a pack all the languages will be included. -added flat cover options for sourceflow and homebrew view. can be turned on/off via their config menu's accessed via 'HOME' btn. -added config menu for homebrew view - press 'HOME' btn while in homebrew view to access it. config menu options are - switch apps partition, adjust coverflow, smallbox on/off, and flat covers on/off. -updated config menu for source menu/flow. options include - sourceflow on/off, adjust coverflow, smallbox on/off, flat covers on/off, and for source menu only - multisource on/off. -added coverflow layouts/versions for individual plugins - which means each plugin can have its own coverflow layout without affecting the others. -set HQ cover to default to ON -made it so coverflow doesn't reload every time you access another menu or change favorites or whatever. -added error messages to game and app launching if any of the bin files needed for launching are missing. previously whenever these errors occurred wiiflow would just exit without the user knowing why. Now the error message should display before exit so the user has an idea what went wrong. had to move cleanup() back some for the errors to show. hopefully that doesn't cause out of mem issues for users with large game collections. -added error messages to game config menu. now all config options will show but if you can't use it then a error shows telling you. such as 'use neek2o' will be available but if you set it to on and neek2o isn't installed then an error message shows. added error msgs for extracting and flashing saves too. -added show_mem=yes/no option to wiiflow_lite.ini under [DEBUG]. manually edit wiiflow_lite.ini to turn it on/off. if set to 'yes' wiiflow will show how much free mem is available on screen. no need to compile wiiflow for this option anymore. -cleaned up some of the boot up code. -starting a random game - just hold 'B' and press '-'. no longer press'B' on config or question mark icon and no need to allow it in wiiflow_lite.ini
2016-11-07 16:06:00 +01:00
const CMenu::SOption CMenu::_GlobalVideoModes[6] = {
{ "vidgame", L"Game" },
{ "vidsys", L"System" },
{ "vidp50", L"PAL 50Hz" },
{ "vidp60", L"PAL 60Hz" },
{ "vidntsc", L"NTSC" },
{ "vidprog", L"Progressive" },
};
const CMenu::SOption CMenu::_VideoModes[7] = {
{ "viddef", L"Default" },
{ "vidgame", L"Game" },
{ "vidsys", L"System" },
{ "vidp50", L"PAL 50Hz" },
{ "vidp60", L"PAL 60Hz" },
{ "vidntsc", L"NTSC" },
{ "vidprog", L"Progressive" },
};
2021-09-25 21:00:02 +02:00
const CMenu::SOption CMenu::_GlobalDeflickerOptions[6] = {
{ "df_norm", L"Normal" },
{ "df_off", L"Off (Safe)" },
{ "df_ext", L"Off (Extended)" },
{ "df_low", L"On (Low)" },
{ "df_med", L"On (Medium)" },
{ "df_high", L"On (High)" },
};
const CMenu::SOption CMenu::_DeflickerOptions[7] = {
{ "df_def", L"Default" },
{ "df_norm", L"Normal" },
{ "df_off", L"Off (Safe)" },
{ "df_ext", L"Off (Extended)" },
{ "df_low", L"On (Low)" },
{ "df_med", L"On (Medium)" },
{ "df_high", L"On (High)" },
};
const CMenu::SOption CMenu::_languages[11] = {
{ "lngdef", L"Default" },// next should be console
{ "lngjap", L"Japanese" },
{ "lngeng", L"English" },
{ "lngger", L"German" },
{ "lngfre", L"French" },
{ "lngspa", L"Spanish" },
{ "lngita", L"Italian" },
{ "lngdut", L"Dutch" },
{ "lngsch", L"S. Chinese" },
{ "lngtch", L"T. Chinese" },
{ "lngkor", L"Korean" }
};
const CMenu::SOption CMenu::_ChannelsType[3] = {
{ "ChanReal", L"Real NAND" },
{ "ChanEmu", L"Emu NAND" },
{ "ChanBoth", L"Both" },
};
const CMenu::SOption CMenu::_NandEmu[2] = {
{ "NANDpart", L"Partial" },
{ "NANDfull", L"Full" },
};
const CMenu::SOption CMenu::_GlobalSaveEmu[3] = {
{ "SaveOffG", L"Off" },
{ "SavePartG", L"Game save" },
{ "SaveFullG", L"Full" },
};
const CMenu::SOption CMenu::_SaveEmu[4] = {
{ "SaveDef", L"Default" },
{ "SaveOff", L"Off" },
{ "SavePart", L"Game save" },
{ "SaveFull", L"Full" },
};
const CMenu::SOption CMenu::_AspectRatio[3] = {
{ "aspectDef", L"Default" },
{ "aspect43", L"Force 4:3" },
{ "aspect169", L"Force 16:9" },
};
const CMenu::SOption CMenu::_WidescreenWiiu[3] = {
{ "lngsys", L"System" },
{ "aspect43", L"Force 4:3" },
{ "aspect169", L"Force 16:9" },
};
const CMenu::SOption CMenu::_vidModePatch[4] = {
{ "vmpnone", L"None" },
{ "vmpnormal", L"Normal" },
{ "vmpmore", L"More" },
{ "vmpall", L"All" }
};
const CMenu::SOption CMenu::_hooktype[8] = {
{ "GC_Auto", L"Auto" },
{ "hooktype1", L"VBI" },
{ "hooktype2", L"KPAD read" },
{ "hooktype3", L"Joypad" },
{ "hooktype4", L"GXDraw" },
{ "hooktype5", L"GXFlush" },
{ "hooktype6", L"OSSleepThread" },
{ "hooktype7", L"AXNextFrame" },
};
const CMenu::SOption CMenu::_debugger[3] = {
{ "disabled", L"Disabled" },
{ "dbg_gecko", L"Gecko" },
{ "dbgfwrite", L"OSReport" },
};
const CMenu::SOption CMenu::_privateServer[3] = {
{ "off", L"Off" },
{ "ps_nossl", L"No SSL only" },
{ "ps_wiimmfi", L"wiimmfi" },
};
template <class T> static inline T loopNum(T i, T s)
2012-01-21 21:57:41 +01:00
{
return (i + s) % s;
2012-01-21 21:57:41 +01:00
}
-updated NIN_CFG_VERSION to 7 for Nintendont argsboot and added triforce arcade option to game settings menu. tested and working. -fixed wii u widescreen option in game config menu. should properly work now. thanks pBullet! -added a fix for coverflow titles display when coverflow has 3 or more rows. for some reason 3 or more rows caused the title to display improperly. -removed **disabled** message from source menu. no need for it - was a stupid idea. if you don't want it to display then remove it from your source menu or don't add it. when a view is disabled in wiiflow_lite.ini then only that view icon is disabled from showing on the main menu screen. -removed titles.ini which wasn't really used except for displaying the return to channel in settings. I googled it and nothing really showed up. it seemed to be the same as custom_titles.ini - it seemed useless. -removed cacheing sourceflow list. the list is never big enuff to worry about cacheing. plus if you add or remove source btns you won't have to reload cache for the changes to take effect. -removed max_source_btns from wiiflow_lite.ini - added code to get highest source menu btn so now source menu can have as many buttons as you like. -removed Manage Languages Menu - restored option to just change wiiflow language. no need for downloading languages and the google link didn't work anyway. when i make a pack all the languages will be included. -added flat cover options for sourceflow and homebrew view. can be turned on/off via their config menu's accessed via 'HOME' btn. -added config menu for homebrew view - press 'HOME' btn while in homebrew view to access it. config menu options are - switch apps partition, adjust coverflow, smallbox on/off, and flat covers on/off. -updated config menu for source menu/flow. options include - sourceflow on/off, adjust coverflow, smallbox on/off, flat covers on/off, and for source menu only - multisource on/off. -added coverflow layouts/versions for individual plugins - which means each plugin can have its own coverflow layout without affecting the others. -set HQ cover to default to ON -made it so coverflow doesn't reload every time you access another menu or change favorites or whatever. -added error messages to game and app launching if any of the bin files needed for launching are missing. previously whenever these errors occurred wiiflow would just exit without the user knowing why. Now the error message should display before exit so the user has an idea what went wrong. had to move cleanup() back some for the errors to show. hopefully that doesn't cause out of mem issues for users with large game collections. -added error messages to game config menu. now all config options will show but if you can't use it then a error shows telling you. such as 'use neek2o' will be available but if you set it to on and neek2o isn't installed then an error message shows. added error msgs for extracting and flashing saves too. -added show_mem=yes/no option to wiiflow_lite.ini under [DEBUG]. manually edit wiiflow_lite.ini to turn it on/off. if set to 'yes' wiiflow will show how much free mem is available on screen. no need to compile wiiflow for this option anymore. -cleaned up some of the boot up code. -starting a random game - just hold 'B' and press '-'. no longer press'B' on config or question mark icon and no need to allow it in wiiflow_lite.ini
2016-11-07 16:06:00 +01:00
wstringEx CMenu::_optBoolToString(int i)
{
switch (i)
{
case 0:
return _t("off", L"Off");
case 1:
return _t("on", L"On");
default:
return _t("def", L"Default");
}
}
void CMenu::_hideConfigGame(bool instant)
2012-01-21 21:57:41 +01:00
{
m_btnMgr.hide(m_gameSettingsLblTitle, instant);
m_btnMgr.hide(m_gameSettingsBtnBack, instant);
2012-01-21 21:57:41 +01:00
m_btnMgr.hide(m_gameSettingsLblPage, instant);
m_btnMgr.hide(m_gameSettingsBtnPageM, instant);
m_btnMgr.hide(m_gameSettingsBtnPageP, instant);
for(u8 i = 0; i < ARRAY_SIZE(m_gameSettingsLblUser); ++i)
if(m_gameSettingsLblUser[i] != -1)
m_btnMgr.hide(m_gameSettingsLblUser[i], instant);
_hideConfigButtons(instant);
2012-01-21 21:57:41 +01:00
}
void CMenu::_showConfigGame()
2012-01-21 21:57:41 +01:00
{
vector<string> custom_servers = stringToVector(m_cfg.getString("custom_servers", "servers"), '|');
bool b;
string adultDomain;
if(GameHdr->type == TYPE_PLUGIN)
adultDomain = "ADULTONLY_PLUGINS";
else
adultDomain = "ADULTONLY";
u8 i;
string id;
char gameTitle[64];
memset(gameTitle, 0 , 64);
if(GameHdr->type == TYPE_HOMEBREW)
{
wcstombs(gameTitle, GameHdr->title, 63);
id = gameTitle;
}
else if(GameHdr->type == TYPE_PLUGIN)
{
strncpy(m_plugin.PluginMagicWord, fmt("%08x", GameHdr->settings[0]), 8);
// if game has an id from the plugin database we use the new method which uses platform name/id
if(strcmp(GameHdr->id, "PLUGIN") != 0 && !m_platform.getString("PLUGINS", m_plugin.PluginMagicWord, "").empty())
id =sfmt("%s/%s", m_platform.getString("PLUGINS", m_plugin.PluginMagicWord).c_str(), GameHdr->id);
else // old pre 5.4.4 method which uses plugin magic/title of game
2019-05-28 23:34:32 +02:00
{
if(strrchr(GameHdr->path, '/') != NULL)
wcstombs(gameTitle, GameHdr->title, 63);
else
memcpy(gameTitle, GameHdr->path, 63);// scummvm
id = sfmt("%s/%s", m_plugin.PluginMagicWord, gameTitle);
2019-05-28 23:34:32 +02:00
}
}
else
id = GameHdr->id;
_setBg(m_gameSettingsBg, m_gameSettingsBg);
for(i = 0; i < ARRAY_SIZE(m_gameSettingsLblUser); ++i)
if(m_gameSettingsLblUser[i] != -1)
m_btnMgr.show(m_gameSettingsLblUser[i]);
m_btnMgr.show(m_gameSettingsBtnBack);
wstringEx title(_t("cfgg1", L"Settings"));
if(!NoGameID(GameHdr->type))
title.append(wfmt(L" [%.6s]", id.c_str()));
m_btnMgr.setText(m_gameSettingsLblTitle, title);
m_btnMgr.show(m_gameSettingsLblTitle);
if(GameHdr->type == TYPE_PLUGIN || GameHdr->type == TYPE_HOMEBREW)
{
m_configGameMaxPgs = 1;
m_btnMgr.setText(m_configLbl1, _t("cfgg58", L"Adult only"));
b = m_gcfg1.getBool(adultDomain, id, false);
if(!b)
m_gcfg1.remove(adultDomain, id);
m_btnMgr.setText(m_configBtn1, b ? _t("yes", L"Yes") : _t("no", L"No"));
m_btnMgr.show(m_configLbl1);
m_btnMgr.show(m_configBtn1);
m_btnMgr.setText(m_configLbl2, _t("cfgg62", L"Reload cached cover"));
m_btnMgr.setText(m_configBtn2, _t("Yes", L"Yes"));
m_btnMgr.show(m_configLbl2);
m_btnMgr.show(m_configBtn2);
return;
}
_hideConfigButtons();
m_configGameMaxPgs = 6;
m_btnMgr.setText(m_gameSettingsLblPage, wfmt(L"%i / %i", m_configGamePage, m_configGameMaxPgs));
m_btnMgr.show(m_gameSettingsLblPage);
m_btnMgr.show(m_gameSettingsBtnPageM);
m_btnMgr.show(m_gameSettingsBtnPageP);
if(m_configGamePage == 1)
2012-01-21 21:57:41 +01:00
{
m_btnMgr.setText(m_configLbl1, _t("cfgg58", L"Adult only"));
b = m_gcfg1.getBool(adultDomain, id, false);
if(!b)
m_gcfg1.remove(adultDomain, id);
m_btnMgr.setText(m_configBtn1, b ? _t("yes", L"Yes") : _t("no", L"No"));
m_btnMgr.setText(m_configLbl2, _t("cfgg10", L"IOS"));
i = m_gcfg2.getUInt(id, "ios", 0);
if(i && _installed_cios.size() > 0)
{
CIOSItr itr = _installed_cios.find(i);
i = (itr == _installed_cios.end()) ? 0 : itr->first;
}
else
i = 0;
if(i > 0)
m_btnMgr.setText(m_configLbl2Val, wfmt(L"%i", i));
else
m_btnMgr.setText(m_configLbl2Val, _t("GC_Auto", L"Auto"));
i = min(m_gcfg2.getUInt(id, "language", 0), ARRAY_SIZE(CMenu::_languages) - 1u);
m_btnMgr.setText(m_configLbl3Val, _t(CMenu::_languages[i].id, CMenu::_languages[i].text));
m_btnMgr.setText(m_configLbl3, _t("cfgg3", L"Language"));
i = min(m_gcfg2.getUInt(id, "video_mode", 0), ARRAY_SIZE(CMenu::_VideoModes) - 1u);
m_btnMgr.setText(m_configLbl4Val, _t(CMenu::_VideoModes[i].id, CMenu::_VideoModes[i].text));
m_btnMgr.setText(m_configLbl4, _t("cfgg2", L"Video mode"));
m_btnMgr.show(m_configLbl1);
m_btnMgr.show(m_configBtn1);
m_btnMgr.show(m_configLbl2);
m_btnMgr.show(m_configLbl2Val);
m_btnMgr.show(m_configBtn2P);
m_btnMgr.show(m_configBtn2M);
m_btnMgr.show(m_configLbl3);
m_btnMgr.show(m_configLbl3Val);
m_btnMgr.show(m_configBtn3P);
m_btnMgr.show(m_configBtn3M);
m_btnMgr.show(m_configLbl4);
m_btnMgr.show(m_configLbl4Val);
m_btnMgr.show(m_configBtn4P);
m_btnMgr.show(m_configBtn4M);
}
else if(m_configGamePage == 2)
{
i = min(m_gcfg2.getUInt(id, "debugger", 0), ARRAY_SIZE(CMenu::_debugger) - 1u);
m_btnMgr.setText(m_configLbl1Val, _t(CMenu::_debugger[i].id, CMenu::_debugger[i].text));
m_btnMgr.setText(m_configLbl1, _t("cfgg22", L"Debugger"));
i = min(m_gcfg2.getUInt(id, "hooktype", 0), ARRAY_SIZE(CMenu::_hooktype) - 1u);
m_btnMgr.setText(m_configLbl2Val, _t(CMenu::_hooktype[i].id, CMenu::_hooktype[i].text));
m_btnMgr.setText(m_configLbl2, _t("cfgg18", L"Hook Type"));
m_btnMgr.setText(m_configLbl3, _t("cfgg5", L"Ocarina"));
m_btnMgr.setText(m_configBtn3, _optBoolToString(m_gcfg2.getOptBool(id, "cheat", 0)));
m_btnMgr.setText(m_configLbl4, _t("cfgg15", L"Cheat Codes"));
m_btnMgr.setText(m_configBtn4, _t("cfgg16", L"Select"));
m_btnMgr.show(m_configLbl1);
m_btnMgr.show(m_configLbl1Val);
m_btnMgr.show(m_configBtn1P);
m_btnMgr.show(m_configBtn1M);
m_btnMgr.show(m_configLbl2);
m_btnMgr.show(m_configLbl2Val);
m_btnMgr.show(m_configBtn2M);
m_btnMgr.show(m_configBtn2P);
m_btnMgr.show(m_configLbl3);
m_btnMgr.show(m_configBtn3);
m_btnMgr.show(m_configLbl4);
m_btnMgr.show(m_configBtn4);
}
else if(m_configGamePage == 3)
{
m_btnMgr.setText(m_configLbl1, _t("cfgg14", L"Patch video modes"));
i = min(m_gcfg2.getUInt(id, "patch_video_modes", 0), ARRAY_SIZE(CMenu::_vidModePatch) - 1u);
m_btnMgr.setText(m_configLbl1Val, _t(CMenu::_vidModePatch[i].id, CMenu::_vidModePatch[i].text));
m_btnMgr.setText(m_configLbl2, _t("cfgg7", L"Vipatch"));
m_btnMgr.setText(m_configBtn2, _optBoolToString(m_gcfg2.getOptBool(id, "vipatch", 0)));
m_btnMgr.setText(m_configLbl3, _t("cfgg4", L"Patch country strings"));
m_btnMgr.setText(m_configBtn3, _optBoolToString(m_gcfg2.getOptBool(id, "country_patch", 0)));
m_btnMgr.setText(m_configLbl4, _t("cfgg27", L"Aspect Ratio"));
i = min(m_gcfg2.getUInt(id, "aspect_ratio", 0), ARRAY_SIZE(CMenu::_AspectRatio) - 1u);
m_btnMgr.setText(m_configLbl4Val, _t(CMenu::_AspectRatio[i].id, CMenu::_AspectRatio[i].text));
m_btnMgr.show(m_configLbl1);
m_btnMgr.show(m_configLbl1Val);
m_btnMgr.show(m_configBtn1M);
m_btnMgr.show(m_configBtn1P);
m_btnMgr.show(m_configLbl2);
m_btnMgr.show(m_configBtn2);
m_btnMgr.show(m_configLbl3);
m_btnMgr.show(m_configBtn3);
m_btnMgr.show(m_configLbl4);
m_btnMgr.show(m_configLbl4Val);
m_btnMgr.show(m_configBtn4M);
m_btnMgr.show(m_configBtn4P);
}
else if(m_configGamePage == 4)
{
m_btnMgr.setText(m_configLbl1, _t("cfgg40", L"Manage Cover and Banner"));
m_btnMgr.setText(m_configBtn1, _t("cfgg41", L"Manage"));
m_btnMgr.show(m_configLbl1);
m_btnMgr.show(m_configBtn1);
if(GameHdr->type == TYPE_CHANNEL || GameHdr->type == TYPE_EMUCHANNEL)
-updated NIN_CFG_VERSION to 7 for Nintendont argsboot and added triforce arcade option to game settings menu. tested and working. -fixed wii u widescreen option in game config menu. should properly work now. thanks pBullet! -added a fix for coverflow titles display when coverflow has 3 or more rows. for some reason 3 or more rows caused the title to display improperly. -removed **disabled** message from source menu. no need for it - was a stupid idea. if you don't want it to display then remove it from your source menu or don't add it. when a view is disabled in wiiflow_lite.ini then only that view icon is disabled from showing on the main menu screen. -removed titles.ini which wasn't really used except for displaying the return to channel in settings. I googled it and nothing really showed up. it seemed to be the same as custom_titles.ini - it seemed useless. -removed cacheing sourceflow list. the list is never big enuff to worry about cacheing. plus if you add or remove source btns you won't have to reload cache for the changes to take effect. -removed max_source_btns from wiiflow_lite.ini - added code to get highest source menu btn so now source menu can have as many buttons as you like. -removed Manage Languages Menu - restored option to just change wiiflow language. no need for downloading languages and the google link didn't work anyway. when i make a pack all the languages will be included. -added flat cover options for sourceflow and homebrew view. can be turned on/off via their config menu's accessed via 'HOME' btn. -added config menu for homebrew view - press 'HOME' btn while in homebrew view to access it. config menu options are - switch apps partition, adjust coverflow, smallbox on/off, and flat covers on/off. -updated config menu for source menu/flow. options include - sourceflow on/off, adjust coverflow, smallbox on/off, flat covers on/off, and for source menu only - multisource on/off. -added coverflow layouts/versions for individual plugins - which means each plugin can have its own coverflow layout without affecting the others. -set HQ cover to default to ON -made it so coverflow doesn't reload every time you access another menu or change favorites or whatever. -added error messages to game and app launching if any of the bin files needed for launching are missing. previously whenever these errors occurred wiiflow would just exit without the user knowing why. Now the error message should display before exit so the user has an idea what went wrong. had to move cleanup() back some for the errors to show. hopefully that doesn't cause out of mem issues for users with large game collections. -added error messages to game config menu. now all config options will show but if you can't use it then a error shows telling you. such as 'use neek2o' will be available but if you set it to on and neek2o isn't installed then an error message shows. added error msgs for extracting and flashing saves too. -added show_mem=yes/no option to wiiflow_lite.ini under [DEBUG]. manually edit wiiflow_lite.ini to turn it on/off. if set to 'yes' wiiflow will show how much free mem is available on screen. no need to compile wiiflow for this option anymore. -cleaned up some of the boot up code. -starting a random game - just hold 'B' and press '-'. no longer press'B' on config or question mark icon and no need to allow it in wiiflow_lite.ini
2016-11-07 16:06:00 +01:00
{
m_btnMgr.setText(m_configLbl2, _t("custom", L"Custom"));
m_btnMgr.setText(m_configBtn2, _optBoolToString(m_gcfg2.getOptBool(id, "custom", 0)));
m_btnMgr.show(m_configLbl2);
m_btnMgr.show(m_configBtn2);
m_btnMgr.setText(m_configLbl3, _t("cfgg37", L"Boot Apploader"));
m_btnMgr.setText(m_configBtn3, _optBoolToString(m_gcfg2.getOptBool(id, "apploader", 0)));
m_btnMgr.show(m_configLbl3);
m_btnMgr.show(m_configBtn3);
m_btnMgr.setText(m_configLbl4, _t("neek1", L"Launch Title with neek2o"));
m_btnMgr.setText(m_configBtn4, _optBoolToString(m_gcfg2.getOptBool(id, "useneek", 0)));
m_btnMgr.show(m_configLbl4);
m_btnMgr.show(m_configBtn4);
-updated NIN_CFG_VERSION to 7 for Nintendont argsboot and added triforce arcade option to game settings menu. tested and working. -fixed wii u widescreen option in game config menu. should properly work now. thanks pBullet! -added a fix for coverflow titles display when coverflow has 3 or more rows. for some reason 3 or more rows caused the title to display improperly. -removed **disabled** message from source menu. no need for it - was a stupid idea. if you don't want it to display then remove it from your source menu or don't add it. when a view is disabled in wiiflow_lite.ini then only that view icon is disabled from showing on the main menu screen. -removed titles.ini which wasn't really used except for displaying the return to channel in settings. I googled it and nothing really showed up. it seemed to be the same as custom_titles.ini - it seemed useless. -removed cacheing sourceflow list. the list is never big enuff to worry about cacheing. plus if you add or remove source btns you won't have to reload cache for the changes to take effect. -removed max_source_btns from wiiflow_lite.ini - added code to get highest source menu btn so now source menu can have as many buttons as you like. -removed Manage Languages Menu - restored option to just change wiiflow language. no need for downloading languages and the google link didn't work anyway. when i make a pack all the languages will be included. -added flat cover options for sourceflow and homebrew view. can be turned on/off via their config menu's accessed via 'HOME' btn. -added config menu for homebrew view - press 'HOME' btn while in homebrew view to access it. config menu options are - switch apps partition, adjust coverflow, smallbox on/off, and flat covers on/off. -updated config menu for source menu/flow. options include - sourceflow on/off, adjust coverflow, smallbox on/off, flat covers on/off, and for source menu only - multisource on/off. -added coverflow layouts/versions for individual plugins - which means each plugin can have its own coverflow layout without affecting the others. -set HQ cover to default to ON -made it so coverflow doesn't reload every time you access another menu or change favorites or whatever. -added error messages to game and app launching if any of the bin files needed for launching are missing. previously whenever these errors occurred wiiflow would just exit without the user knowing why. Now the error message should display before exit so the user has an idea what went wrong. had to move cleanup() back some for the errors to show. hopefully that doesn't cause out of mem issues for users with large game collections. -added error messages to game config menu. now all config options will show but if you can't use it then a error shows telling you. such as 'use neek2o' will be available but if you set it to on and neek2o isn't installed then an error message shows. added error msgs for extracting and flashing saves too. -added show_mem=yes/no option to wiiflow_lite.ini under [DEBUG]. manually edit wiiflow_lite.ini to turn it on/off. if set to 'yes' wiiflow will show how much free mem is available on screen. no need to compile wiiflow for this option anymore. -cleaned up some of the boot up code. -starting a random game - just hold 'B' and press '-'. no longer press'B' on config or question mark icon and no need to allow it in wiiflow_lite.ini
2016-11-07 16:06:00 +01:00
}
else if(GameHdr->type == TYPE_WII_GAME)
{
m_btnMgr.setText(m_configLbl2, _t("cfgg24", L"NAND Emulation"));
i = min(m_gcfg2.getUInt(id, "emulate_save", 0), ARRAY_SIZE(CMenu::_SaveEmu) - 1u);
m_btnMgr.setText(m_configLbl2Val, _t(CMenu::_SaveEmu[i].id, CMenu::_SaveEmu[i].text));
m_btnMgr.show(m_configLbl2);
m_btnMgr.show(m_configLbl2Val);
m_btnMgr.show(m_configBtn2M);
m_btnMgr.show(m_configBtn2P);
m_btnMgr.setText(m_configLbl3, _t("cfgg30", L"Extract Save from NAND"));
m_btnMgr.setText(m_configBtn3, _t("cfgg31", L"Extract"));
m_btnMgr.show(m_configLbl3);
m_btnMgr.show(m_configBtn3);
m_btnMgr.setText(m_configLbl4, _t("cfgg32", L"Flash Save to NAND"));
m_btnMgr.setText(m_configBtn4, _t("cfgg33", L"Flash"));
m_btnMgr.show(m_configLbl4);
m_btnMgr.show(m_configBtn4);
}
}
else if(m_configGamePage == 5)
{
m_btnMgr.setText(m_configLbl1, _t("cfgg38", L"Activity LED"));
m_btnMgr.setText(m_configBtn1, _optBoolToString(m_gcfg2.getOptBool(id, "led", 0)));
m_btnMgr.show(m_configLbl1);
m_btnMgr.show(m_configBtn1);
m_btnMgr.setText(m_configLbl2, _t("cfgg45", L"Private Server"));
i = min(m_gcfg2.getUInt(id, "private_server", 0), ARRAY_SIZE(CMenu::_privateServer) - 1u);
if(i < 3)
m_btnMgr.setText(m_configLbl2Val, _t(CMenu::_privateServer[i].id, CMenu::_privateServer[i].text));
else
m_btnMgr.setText(m_configLbl2Val, custom_servers[i - 3]);//wstringEx()
m_btnMgr.show(m_configLbl2);
m_btnMgr.show(m_configLbl2Val);
m_btnMgr.show(m_configBtn2P);
m_btnMgr.show(m_configBtn2M);
m_btnMgr.setText(m_configLbl3, _t("cfgg49", L"480p Pixel Patch"));
m_btnMgr.setText(m_configLbl3Val, _optBoolToString(m_gcfg2.getOptBool(id, "fix480p", 2)));
m_btnMgr.show(m_configLbl3);
m_btnMgr.show(m_configLbl3Val);
m_btnMgr.show(m_configBtn3P);
m_btnMgr.show(m_configBtn3M);
m_btnMgr.setText(m_configLbl4, _t("cfgg61", L"Deflicker Filter"));
i = min(m_gcfg2.getUInt(id, "deflicker_wii", 0), ARRAY_SIZE(CMenu::_DeflickerOptions) - 1u);
m_btnMgr.setText(m_configLbl4Val, _t(CMenu::_DeflickerOptions[i].id, CMenu::_DeflickerOptions[i].text));
m_btnMgr.show(m_configLbl4);
m_btnMgr.show(m_configLbl4Val);
m_btnMgr.show(m_configBtn4P);
m_btnMgr.show(m_configBtn4M);
}
else if(m_configGamePage == 6)
{
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);
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);
}
}
2012-01-21 21:57:41 +01:00
}
void CMenu::_configGame(const dir_discHdr *hdr, bool disc)
2012-01-21 21:57:41 +01:00
{
vector<string> custom_servers = stringToVector(m_cfg.getString("custom_servers", "servers"), '|');
m_gcfg2.load(fmt("%s/" GAME_SETTINGS2_FILENAME, m_settingsDir.c_str()));
2019-05-28 23:34:32 +02:00
GameHdr = hdr;// set for global use in other fuctions
string adultDomain;
if(hdr->type == TYPE_PLUGIN)
adultDomain = "ADULTONLY_PLUGINS";
else
adultDomain = "ADULTONLY";
u8 i;
string id;
//s8 direction;
char gameTitle[64];
memset(gameTitle, 0 , 64);
if(GameHdr->type == TYPE_HOMEBREW)
{
wcstombs(gameTitle, GameHdr->title, 63);
id = gameTitle;
}
else if(GameHdr->type == TYPE_PLUGIN)
{
strncpy(m_plugin.PluginMagicWord, fmt("%08x", GameHdr->settings[0]), 8);
// if game has an id from the plugin database we use the new method which uses platform name/id
if(strcmp(GameHdr->id, "PLUGIN") != 0 && !m_platform.getString("PLUGINS", m_plugin.PluginMagicWord, "").empty())
id = sfmt("%s/%s", m_platform.getString("PLUGINS", m_plugin.PluginMagicWord).c_str(), GameHdr->id);
else // old pre 5.4.4 method which uses plugin magic/title of game
2019-05-28 23:34:32 +02:00
{
if(strrchr(GameHdr->path, '/') != NULL)
wcstombs(gameTitle, GameHdr->title, 63);
else
memcpy(gameTitle, GameHdr->path, 63);// scummvm
id = sfmt("%s/%s", m_plugin.PluginMagicWord, gameTitle);
2019-05-28 23:34:32 +02:00
}
}
else
id = GameHdr->id;
m_configGamePage = 1;
_showConfigGame();
2012-09-09 20:35:15 +02:00
while(!m_exit)
2012-01-21 21:57:41 +01:00
{
_mainLoopCommon();
2012-09-09 20:35:15 +02:00
if(BTN_HOME_PRESSED || BTN_B_PRESSED)
2012-01-21 21:57:41 +01:00
break;
2012-09-09 20:35:15 +02:00
else if(BTN_UP_PRESSED)
2012-01-21 21:57:41 +01:00
m_btnMgr.up();
2012-09-09 20:35:15 +02:00
else if(BTN_DOWN_PRESSED)
2012-01-21 21:57:41 +01:00
m_btnMgr.down();
if(m_configGameMaxPgs > 1 && (BTN_MINUS_PRESSED || BTN_LEFT_PRESSED || (BTN_A_PRESSED && m_btnMgr.selected(m_gameSettingsBtnPageM))))
2012-01-21 21:57:41 +01:00
{
if(m_configGamePage == 1)
m_configGamePage = m_configGameMaxPgs;
else
--m_configGamePage;
if(BTN_LEFT_PRESSED || BTN_MINUS_PRESSED)
m_btnMgr.click(m_gameSettingsBtnPageM);
_showConfigGame();
2012-01-21 21:57:41 +01:00
}
else if(m_configGameMaxPgs > 1 && (BTN_PLUS_PRESSED || BTN_RIGHT_PRESSED || (BTN_A_PRESSED && m_btnMgr.selected(m_gameSettingsBtnPageP))))
2012-01-21 21:57:41 +01:00
{
if(m_configGamePage == m_configGameMaxPgs)
m_configGamePage = 1;
2012-09-09 20:35:15 +02:00
else
++m_configGamePage;
2012-09-09 20:35:15 +02:00
if(BTN_RIGHT_PRESSED || BTN_PLUS_PRESSED)
m_btnMgr.click(m_gameSettingsBtnPageP);
_showConfigGame();
2012-01-21 21:57:41 +01:00
}
2012-09-09 20:35:15 +02:00
else if(BTN_A_PRESSED)
2012-01-21 21:57:41 +01:00
{
2012-09-09 20:35:15 +02:00
if(m_btnMgr.selected(m_gameSettingsBtnBack))
2012-01-21 21:57:41 +01:00
break;
if(m_configGamePage == 1)
2012-01-21 21:57:41 +01:00
{
if(m_btnMgr.selected(m_configBtn1))
{
if(disc)
{
_error(_t("cfgg57", L"Not allowed for disc!"));
_showConfigGame();
}
else
{
m_gcfg1.setBool(adultDomain, id, !m_gcfg1.getBool(adultDomain, id, false));
bool b = m_gcfg1.getBool(adultDomain, id);
if(!b)
m_gcfg1.remove(adultDomain, id);
m_btnMgr.setText(m_configBtn1, b ? _t("yes", L"Yes") : _t("no", L"No"));
}
}
else if(m_btnMgr.selected(m_configBtn2))
{
_hideConfigGame(true);
m_btnMgr.setText(m_downloadLblDialog, L"");
m_btnMgr.show(m_downloadLblDialog);
_start_pThread();
CoverFlow.stopCoverLoader(true);
bool smallBox = false;
if(m_current_view == COVERFLOW_HOMEBREW && !m_sourceflow)
smallBox = m_cfg.getBool(HOMEBREW_DOMAIN, "smallbox", false);
//else if(m_sourceflow)
// smallBox = m_cfg.getBool(SOURCEFLOW_DOMAIN, "smallbox", false);
else if(m_current_view == COVERFLOW_PLUGIN && !m_sourceflow)
{
if(enabledPluginsCount == 1 && m_plugin.GetEnabledStatus(HB_PMAGIC))
smallBox = m_cfg.getBool(HOMEBREW_DOMAIN, "smallbox", false);
}
//delete cached wfc
const char *gameNameOrID = CoverFlow.getFilenameId(GameHdr);
if(GameHdr->type == TYPE_PLUGIN)
fsop_deleteFile(fmt("%s/%s/%s.wfc", m_cacheDir.c_str(), m_plugin.GetCoverFolderName(GameHdr->settings[0]), gameNameOrID));
else
fsop_deleteFile(fmt("%s/homebrew/%s.wfc", m_cacheDir.c_str(), gameNameOrID));
//cache new cover
m_thrdMessage = wfmt(_t("cfgg63", L"Converting cover please wait..."));
m_thrdMessageAdded = true;
_cacheCover(GameHdr, smallBox);
_stop_pThread();
m_btnMgr.setText(m_downloadLblDialog, _t("dlmsg14", L"Done."));
u8 pause = 150;
do
{
_mainLoopCommon();
pause--;
if(pause == 0)
m_btnMgr.hide(m_downloadLblDialog);
}while(!m_exit && pause > 0);
CoverFlow.startCoverLoader();
_showConfigGame();
}
else if(m_btnMgr.selected(m_configBtn2M) || m_btnMgr.selected(m_configBtn2P))
- separated nintendont widescreen and wiiu widescreen options again. I don't own a wiiu so it wasn't until recently that I realized they were different and both useful on a wiiu vwii. - added nintendont video width scale and video offset position options per game. you can set global defualts in wiiflow_lite.ini under [GAMECUBE] as nin_width and nin_pos. width can be 0(auto) or 40 to 120 and position can be -20 to 20 (0 is center normal). - added patch pal50 option per game for Nintendont. - removed devolution mount and unmount to speed up loading of devo gc games. not sure why they were there. - properly fixed nintendont video setting. last commit worked but on my tv with component cables and wii in progressive mode it would always switch to interlace then back to progressive when nintendont started and then back to interlaced when the actual game started. now it just switches to interlaced when the actual game starts unless im forcing progressive. - fixed nintendont gc disc launching and wii disc launching to use gameconfig2 settings. seems when launching a disc gameconfig2 wasn't loaded and thus no game settings were used. you should be able to use cheats with disc launch now. - added option to set game settings for a disc launch prior to the actual disc launch. just hold 'B' and press 'A' when selecting the disc icon to access settings menu before launch. just press 'A' to launch disc immediately. - removed 98% of the gap between unloading a banner and displaying the new banner in game selected menu. old way would momentarily show the game covers and play the background music. now there's only a very small chance you will even see the covers or hear the background music.
2017-04-18 01:23:50 +02:00
{
if(_installed_cios.size() > 0)
{
bool direction = m_btnMgr.selected(m_configBtn2P);
CIOSItr itr = _installed_cios.find((u32)m_gcfg2.getInt(id, "ios", 0));
if(direction && itr == _installed_cios.end())
itr = _installed_cios.begin();
else if(!direction && itr == _installed_cios.begin())
itr = _installed_cios.end();
else if(direction)
itr++;
if(!direction)
itr--;
i = itr->first;
m_gcfg2.setInt(id, "ios", i);
if(i > 0)
m_btnMgr.setText(m_configLbl2Val, wfmt(L"%i", i));
else
m_btnMgr.setText(m_configLbl2Val, _t("GC_Auto", L"Auto"));
}
}
else if(m_btnMgr.selected(m_configBtn3P) || m_btnMgr.selected(m_configBtn3M))
{
s8 direction = m_btnMgr.selected(m_configBtn3P) ? 1 : -1;
i = loopNum(m_gcfg2.getUInt(id, "language", 0) + direction, ARRAY_SIZE(CMenu::_languages));
m_gcfg2.setInt(id, "language", i);
m_btnMgr.setText(m_configLbl3Val, _t(CMenu::_languages[i].id, CMenu::_languages[i].text));
}
else if(m_btnMgr.selected(m_configBtn4P) || m_btnMgr.selected(m_configBtn4M))
{
s8 direction = m_btnMgr.selected(m_configBtn4P) ? 1 : -1;
i = loopNum(m_gcfg2.getUInt(id, "video_mode", 0) + direction, ARRAY_SIZE(CMenu::_VideoModes));
m_gcfg2.setInt(id, "video_mode", i);
m_btnMgr.setText(m_configLbl4Val, _t(CMenu::_VideoModes[i].id, CMenu::_VideoModes[i].text));
- separated nintendont widescreen and wiiu widescreen options again. I don't own a wiiu so it wasn't until recently that I realized they were different and both useful on a wiiu vwii. - added nintendont video width scale and video offset position options per game. you can set global defualts in wiiflow_lite.ini under [GAMECUBE] as nin_width and nin_pos. width can be 0(auto) or 40 to 120 and position can be -20 to 20 (0 is center normal). - added patch pal50 option per game for Nintendont. - removed devolution mount and unmount to speed up loading of devo gc games. not sure why they were there. - properly fixed nintendont video setting. last commit worked but on my tv with component cables and wii in progressive mode it would always switch to interlace then back to progressive when nintendont started and then back to interlaced when the actual game started. now it just switches to interlaced when the actual game starts unless im forcing progressive. - fixed nintendont gc disc launching and wii disc launching to use gameconfig2 settings. seems when launching a disc gameconfig2 wasn't loaded and thus no game settings were used. you should be able to use cheats with disc launch now. - added option to set game settings for a disc launch prior to the actual disc launch. just hold 'B' and press 'A' when selecting the disc icon to access settings menu before launch. just press 'A' to launch disc immediately. - removed 98% of the gap between unloading a banner and displaying the new banner in game selected menu. old way would momentarily show the game covers and play the background music. now there's only a very small chance you will even see the covers or hear the background music.
2017-04-18 01:23:50 +02:00
}
}
else if(m_configGamePage == 2)
{
if(m_btnMgr.selected(m_configBtn1P) || m_btnMgr.selected(m_configBtn1M))
{
s8 direction = m_btnMgr.selected(m_configBtn1P) ? 1 : -1;
i = loopNum(m_gcfg2.getUInt(id, "debugger", 0) + direction, ARRAY_SIZE(CMenu::_debugger));
m_gcfg2.setInt(id, "debugger", i);
m_btnMgr.setText(m_configLbl1Val, _t(CMenu::_debugger[i].id, CMenu::_debugger[i].text));
}
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, "hooktype", 1) + direction, ARRAY_SIZE(CMenu::_hooktype));
m_gcfg2.setInt(id, "hooktype", i);
m_btnMgr.setText(m_configLbl2Val, _t(CMenu::_hooktype[i].id, CMenu::_hooktype[i].text));
}
else if(m_btnMgr.selected(m_configBtn3))
{
m_gcfg2.setBool(id, "cheat", !m_gcfg2.getBool(id, "cheat", 0));
m_btnMgr.setText(m_configBtn3, _optBoolToString(m_gcfg2.getOptBool(id, "cheat", 0)));
}
else if(m_btnMgr.selected(m_configBtn4))
{
_hideConfigGame();
_CheatSettings();
_showConfigGame();
}
}
else if(m_configGamePage == 3)
{
if(m_btnMgr.selected(m_configBtn1P) || m_btnMgr.selected(m_configBtn1M))
{
s8 direction = m_btnMgr.selected(m_configBtn1P) ? 1 : -1;
i = loopNum(m_gcfg2.getUInt(id, "patch_video_modes", 0) + direction, ARRAY_SIZE(CMenu::_vidModePatch));
m_gcfg2.setInt(id, "patch_video_modes", i);
m_btnMgr.setText(m_configLbl1Val, _t(CMenu::_vidModePatch[i].id, CMenu::_vidModePatch[i].text));
}
else if(m_btnMgr.selected(m_configBtn2))
{
m_gcfg2.setBool(id, "vipatch", !m_gcfg2.getBool(id, "vipatch", 0));
m_btnMgr.setText(m_configBtn2, _optBoolToString(m_gcfg2.getOptBool(id, "vipatch", 0)));
}
else if(m_btnMgr.selected(m_configBtn3))
{
m_gcfg2.setBool(id, "country_patch", !m_gcfg2.getBool(id, "country_patch", 0));
m_btnMgr.setText(m_configBtn3, _optBoolToString(m_gcfg2.getOptBool(id, "country_patch", 0)));
}
else if(m_btnMgr.selected(m_configBtn4P) || m_btnMgr.selected(m_configBtn4M))
{
s8 direction = m_btnMgr.selected(m_configBtn4P) ? 1 : -1;
i = loopNum(m_gcfg2.getUInt(id, "aspect_ratio", 0) + direction, ARRAY_SIZE(CMenu::_AspectRatio));
m_gcfg2.setInt(id, "aspect_ratio", i);
m_btnMgr.setText(m_configLbl4Val, _t(CMenu::_AspectRatio[i].id, CMenu::_AspectRatio[i].text));
}
2021-09-25 21:00:02 +02:00
}
else if(m_configGamePage == 4)
{
if(m_btnMgr.selected(m_configBtn1))
- separated nintendont widescreen and wiiu widescreen options again. I don't own a wiiu so it wasn't until recently that I realized they were different and both useful on a wiiu vwii. - added nintendont video width scale and video offset position options per game. you can set global defualts in wiiflow_lite.ini under [GAMECUBE] as nin_width and nin_pos. width can be 0(auto) or 40 to 120 and position can be -20 to 20 (0 is center normal). - added patch pal50 option per game for Nintendont. - removed devolution mount and unmount to speed up loading of devo gc games. not sure why they were there. - properly fixed nintendont video setting. last commit worked but on my tv with component cables and wii in progressive mode it would always switch to interlace then back to progressive when nintendont started and then back to interlaced when the actual game started. now it just switches to interlaced when the actual game starts unless im forcing progressive. - fixed nintendont gc disc launching and wii disc launching to use gameconfig2 settings. seems when launching a disc gameconfig2 wasn't loaded and thus no game settings were used. you should be able to use cheats with disc launch now. - added option to set game settings for a disc launch prior to the actual disc launch. just hold 'B' and press 'A' when selecting the disc icon to access settings menu before launch. just press 'A' to launch disc immediately. - removed 98% of the gap between unloading a banner and displaying the new banner in game selected menu. old way would momentarily show the game covers and play the background music. now there's only a very small chance you will even see the covers or hear the background music.
2017-04-18 01:23:50 +02:00
{
if(disc)
_error(_t("cfgg57", L"Not allowed for disc!"));
else
{
CoverFlow.stopCoverLoader(true);
_hideConfigGame();
_CoverBanner();
CoverFlow.startCoverLoader();
}
_showConfigGame();
}
if(GameHdr->type == TYPE_CHANNEL || GameHdr->type == TYPE_EMUCHANNEL)
{
if(m_btnMgr.selected(m_configBtn2))
{
m_gcfg2.setBool(id, "custom", !m_gcfg2.getBool(id, "custom", 0));
m_btnMgr.setText(m_configBtn2, _optBoolToString(m_gcfg2.getOptBool(id, "custom", 0)));
}
else if(m_btnMgr.selected(m_configBtn3))
{
m_gcfg2.setBool(id, "apploader", !m_gcfg2.getBool(id, "apploader", 0));
m_btnMgr.setText(m_configBtn3, _optBoolToString(m_gcfg2.getOptBool(id, "apploader", 0)));
}
else if(m_btnMgr.selected(m_configBtn4))
{
m_gcfg2.setBool(id, "useneek", !m_gcfg2.getBool(id, "useneek", 0));
m_btnMgr.setText(m_configBtn4, _optBoolToString(m_gcfg2.getOptBool(id, "useneek", 0)));
}
}
else if(GameHdr->type == TYPE_WII_GAME)
{
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, "emulate_save", 0) + direction, ARRAY_SIZE(CMenu::_SaveEmu));
m_gcfg2.setInt(id, "emulate_save", i);
m_btnMgr.setText(m_configLbl2Val, _t(CMenu::_SaveEmu[i].id, CMenu::_SaveEmu[i].text));
}
else if(m_btnMgr.selected(m_configBtn3))
{
_hideConfigGame();
m_forceext = true;
if(!_ExtractGameSave(id))
_error(_t("cfgg50", L"No save to extract!"));
_showConfigGame();
}
else if(m_btnMgr.selected(m_configBtn4))
{
_hideConfigGame();
m_forceext = true;
if(!_FlashGameSave(id))
_error(_t("cfgg51", L"No save to flash to real NAND!"));
_showConfigGame();
}
- separated nintendont widescreen and wiiu widescreen options again. I don't own a wiiu so it wasn't until recently that I realized they were different and both useful on a wiiu vwii. - added nintendont video width scale and video offset position options per game. you can set global defualts in wiiflow_lite.ini under [GAMECUBE] as nin_width and nin_pos. width can be 0(auto) or 40 to 120 and position can be -20 to 20 (0 is center normal). - added patch pal50 option per game for Nintendont. - removed devolution mount and unmount to speed up loading of devo gc games. not sure why they were there. - properly fixed nintendont video setting. last commit worked but on my tv with component cables and wii in progressive mode it would always switch to interlace then back to progressive when nintendont started and then back to interlaced when the actual game started. now it just switches to interlaced when the actual game starts unless im forcing progressive. - fixed nintendont gc disc launching and wii disc launching to use gameconfig2 settings. seems when launching a disc gameconfig2 wasn't loaded and thus no game settings were used. you should be able to use cheats with disc launch now. - added option to set game settings for a disc launch prior to the actual disc launch. just hold 'B' and press 'A' when selecting the disc icon to access settings menu before launch. just press 'A' to launch disc immediately. - removed 98% of the gap between unloading a banner and displaying the new banner in game selected menu. old way would momentarily show the game covers and play the background music. now there's only a very small chance you will even see the covers or hear the background music.
2017-04-18 01:23:50 +02:00
}
2012-01-21 21:57:41 +01:00
}
else if(m_configGamePage == 5)
{
if(m_btnMgr.selected(m_configBtn1))
{
m_gcfg2.setBool(id, "led", !m_gcfg2.getBool(id, "led", 0));
m_btnMgr.setText(m_configBtn1, _optBoolToString(m_gcfg2.getOptBool(id, "led", 0)));
}
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, "private_server") + direction, ARRAY_SIZE(CMenu::_privateServer) + custom_servers.size());
m_gcfg2.setUInt(id, "private_server", i);
if(i < 3)
m_btnMgr.setText(m_configLbl2Val, _t(CMenu::_privateServer[i].id, CMenu::_privateServer[i].text));
else
m_btnMgr.setText(m_configLbl2Val, custom_servers[i - 3]);//wstringEx()
}
else if(m_btnMgr.selected(m_configBtn3P) || m_btnMgr.selected(m_configBtn3M))
{
s8 direction = m_btnMgr.selected(m_configBtn3P) ? 1 : -1;
i = loopNum(m_gcfg2.getOptBool(id, "fix480p") + direction, 3);
m_gcfg2.setOptBool(id, "fix480p", i);
m_btnMgr.setText(m_configLbl3Val, _optBoolToString(m_gcfg2.getOptBool(id, "fix480p", 2)));
}
else if(m_btnMgr.selected(m_configBtn4P) || m_btnMgr.selected(m_configBtn4M))
{
s8 direction = m_btnMgr.selected(m_configBtn4P) ? 1 : -1;
i = loopNum(m_gcfg2.getUInt(id, "deflicker_wii") + direction, ARRAY_SIZE(CMenu::_DeflickerOptions));
m_gcfg2.setInt(id, "deflicker_wii", i);
m_btnMgr.setText(m_configLbl4Val, _t(CMenu::_DeflickerOptions[i].id, CMenu::_DeflickerOptions[i].text));
}
}
else if(m_configGamePage == 6)
{
if(m_btnMgr.selected(m_configBtn1))
{
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_configLbl2Val, _t(CMenu::_WidescreenWiiu[i].id, CMenu::_WidescreenWiiu[i].text));
}
}
2012-01-21 21:57:41 +01:00
}
}
- separated nintendont widescreen and wiiu widescreen options again. I don't own a wiiu so it wasn't until recently that I realized they were different and both useful on a wiiu vwii. - added nintendont video width scale and video offset position options per game. you can set global defualts in wiiflow_lite.ini under [GAMECUBE] as nin_width and nin_pos. width can be 0(auto) or 40 to 120 and position can be -20 to 20 (0 is center normal). - added patch pal50 option per game for Nintendont. - removed devolution mount and unmount to speed up loading of devo gc games. not sure why they were there. - properly fixed nintendont video setting. last commit worked but on my tv with component cables and wii in progressive mode it would always switch to interlace then back to progressive when nintendont started and then back to interlaced when the actual game started. now it just switches to interlaced when the actual game starts unless im forcing progressive. - fixed nintendont gc disc launching and wii disc launching to use gameconfig2 settings. seems when launching a disc gameconfig2 wasn't loaded and thus no game settings were used. you should be able to use cheats with disc launch now. - added option to set game settings for a disc launch prior to the actual disc launch. just hold 'B' and press 'A' when selecting the disc icon to access settings menu before launch. just press 'A' to launch disc immediately. - removed 98% of the gap between unloading a banner and displaying the new banner in game selected menu. old way would momentarily show the game covers and play the background music. now there's only a very small chance you will even see the covers or hear the background music.
2017-04-18 01:23:50 +02:00
if(!disc)
m_gcfg2.save(true);// do not save changes for disc games
_hideConfigGame();
2012-01-21 21:57:41 +01:00
}
void CMenu::_initConfigGameMenu()
2012-01-21 21:57:41 +01:00
{
_addUserLabels(m_gameSettingsLblUser, ARRAY_SIZE(m_gameSettingsLblUser), "GAME_SETTINGS");
m_gameSettingsBg = _texture("GAME_SETTINGS/BG", "texture", theme.bg, false);
m_gameSettingsLblTitle = _addLabel("GAME_SETTINGS/TITLE", theme.titleFont, L"", 0, 10, 640, 60, theme.titleFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE);
m_gameSettingsLblPage = _addLabel("GAME_SETTINGS/PAGE_BTN", theme.btnFont, L"", 68, 400, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
m_gameSettingsBtnPageM = _addPicButton("GAME_SETTINGS/PAGE_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 20, 400, 48, 48);
m_gameSettingsBtnPageP = _addPicButton("GAME_SETTINGS/PAGE_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 172, 400, 48, 48);
m_gameSettingsBtnBack = _addButton("GAME_SETTINGS/BACK_BTN", theme.btnFont, L"", 420, 400, 200, 48, theme.btnFontColor);
_setHideAnim(m_gameSettingsLblTitle, "GAME_SETTINGS/TITLE", 0, 0, -2.f, 0.f);
_setHideAnim(m_gameSettingsLblPage, "GAME_SETTINGS/PAGE_BTN", 0, 0, 1.f, -1.f);
_setHideAnim(m_gameSettingsBtnPageM, "GAME_SETTINGS/PAGE_MINUS", 0, 0, 1.f, -1.f);
_setHideAnim(m_gameSettingsBtnPageP, "GAME_SETTINGS/PAGE_PLUS", 0, 0, 1.f, -1.f);
-updating wiiflow lite to beta 4.3.0 -fixed using categories to hide GC disc 2's. Apparently this has never really worked right for some time or ever. -fixed deleting the cached cover texture file for plugin games. Delete cover for plugins only deletes the cached texture file (.wfc) -fixed favorites and adultonly (parental lock) for plugin games. Apparently I may have broke this a few revisions back. -favorites and adultonly for plugin games now have their own domains in gamecfg1- [FAVORITES_PLUGINS] and [ADULTONLY_PLUGINS]. just makes it more organized. -only wii, GC, channels are added to [PLAYCOUNT] and [LAST_PLAYED] in gamecfg1. -now loading gamecfg1 at startup and leaving it loaded till exit. no more loading it and unloading all the time. -fixed scrolling for game_info synopsis, credits, and help text. -made source menu buttons wider for wiiflow default. old 80x80, now 100x80. looks better. -display music info now defaults to off -screensaver_disabled now defaults to yes -show GC view button is now on by default no matter what. the only way it is disabled is if you edit wiiflow.ini manually. this is how all the view buttons work. -removed hiding homebrew button but if wiiflow locked it won't work or in sourceflow it won't show. -dump_list is now under [GENERAL] instead of each view. Also only works for Wii, GC, and channels. -sorting only works for Wii, GC, and Channels now. disabled for sourceflow, plugins, homebrew, and combined view. -now if no games are found a message is shown with the current path so you can see where wiiflow is looking. (except for plugins) -removed auto create emuNAND for emuNAND view if gamelist is empty. just go to settings>NAND settings if you want to extract or disable it. -now when no games are found all buttons at bottom are still accessible allowing you to change the view or go to settings and change current partition or path and even extract your NAND to create a EmuNAND. Or go to Home Menu and Install a Wii or GC game. -removed auto extract NAND to emuNAND when launching a Wii game with EmuNAND save. Now a message is diplayed saying 'emuNAND for saves not found - using real NAND'. -made the speed at which cover titles fade in/out almost instantly. -removed update button from Home Menu. online update code is still there but not used and probably won't be used any more as there just isn't a need for it now. -removed ftp button from Home Menu and all code for the FTP server. I just use WiiXplorer's FTP server. it seems to work better for me. -disabled keep USB Alive thread for now. i think there's a possibilty it might be the cause of my SD/USB files getting corrupted. -removed Btn B and - combo to switch partitions. didn't seem useful anymore. -redid nand emulation settings menu. looks like this now: pg1 Select EmuNAND EmuNAND Enulation Select SaveNAND SaveNAND Emulation pg2 Extract Saves All Missing Extract NAND Select Saves Partition -no longer blocking Select Plugin menu and View icons when using source menu combined view -now Select Plugins Menu is like switching to plugin view but you get to choose the plugins first -now [PLUGIN] partition= is the default partition for all plugins. to change individual plugins add 'romPartition=x' to the plugin ini. x is the partition number 0 thru 8 with SD being 0. this is how my usbloadergx plugin mod works.
2016-10-05 01:44:13 +02:00
_setHideAnim(m_gameSettingsBtnBack, "GAME_SETTINGS/BACK_BTN", 0, 0, 1.f, -1.f);
_hideConfigGame(true);
_textConfigGame();
2012-01-21 21:57:41 +01:00
}
void CMenu::_textConfigGame(void)
2012-01-21 21:57:41 +01:00
{
m_btnMgr.setText(m_gameSettingsLblTitle, _t("cfgg1", L"Settings"));
m_btnMgr.setText(m_gameSettingsBtnBack, _t("cfgg8", L"Back"));
}