- WIIU vWii: added per wii/wiiware/vc game an option to set wiiu widescreen aspect ratio #258
This commit is contained in:
Fledge68 2021-09-29 06:50:47 -05:00
parent afed7082f4
commit a0eba4ea8f
6 changed files with 77 additions and 10 deletions

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 MiB

After

Width:  |  Height:  |  Size: 4.4 MiB

View File

@ -1,6 +1,6 @@
#define APP_NAME "WiiFlow WFL"
#define APP_VERSION "5.5.0 beta 7"
#define APP_VERSION "5.5.0 beta 8"
#define APP_DATA_DIR "wiiflow"
#define APPS_DIR "apps/wiiflow"

View File

@ -596,6 +596,11 @@ private:
s16 m_gameSettingsLblFix480p;
s16 m_gameSettingsBtnFix480p;
s16 m_gameSettingsLblWidescreenWiiu;
s16 m_gameSettingsLblWidescreenWiiuVal;
s16 m_gameSettingsBtnWidescreenWiiuM;
s16 m_gameSettingsBtnWidescreenWiiuP;
s16 m_gameSettingsLblDeflickerWii;
s16 m_gameSettingsLblDeflickerWiiVal;
s16 m_gameSettingsBtnDeflickerWiiM;
@ -1317,6 +1322,7 @@ private:
static const SOption _SaveEmu[4];
static const SOption _GlobalSaveEmu[3];
static const SOption _AspectRatio[3];
static const SOption _WidescreenWiiu[3];
static const SOption _NinEmuCard[5];
static const SOption _vidModePatch[4];
static const SOption _debugger[3];

View File

@ -134,6 +134,12 @@ const CMenu::SOption CMenu::_AspectRatio[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::_NinEmuCard[5] = {
{ "NinMCDef", L"Default" },
{ "NinMCOff", L"Disabled" },
@ -238,6 +244,10 @@ void CMenu::_hideGameSettingsPg(bool instant)
m_btnMgr.hide(m_gameSettingsLblIOS, instant);
m_btnMgr.hide(m_gameSettingsBtnIOSP, instant);
m_btnMgr.hide(m_gameSettingsBtnIOSM, instant);
m_btnMgr.hide(m_gameSettingsLblWidescreenWiiu, instant);
m_btnMgr.hide(m_gameSettingsLblWidescreenWiiuVal, instant);
m_btnMgr.hide(m_gameSettingsBtnWidescreenWiiuP, instant);
m_btnMgr.hide(m_gameSettingsBtnWidescreenWiiuM, instant);
//wii only
m_btnMgr.hide(m_gameSettingsLblEmulation, instant);
m_btnMgr.hide(m_gameSettingsLblEmulationVal, instant);
@ -387,7 +397,7 @@ void CMenu::_showGameSettings()
GCLoader = (GCLoader == 0) ? min(m_cfg.getUInt(GC_DOMAIN, "default_loader", 1), ARRAY_SIZE(CMenu::_GlobalGCLoaders) - 1u) : GCLoader-1;
}
m_gameSettingsMaxPgs = 5;
m_gameSettingsMaxPgs = IsOnWiiU() ? 6 : 5;
if(GameHdr->type == TYPE_GC_GAME)
{
if(GCLoader == DEVOLUTION)
@ -603,13 +613,23 @@ void CMenu::_showGameSettings()
}
if(m_gameSettingsPage == 6)
{
m_btnMgr.show(m_gameSettingsLblBBA);
m_btnMgr.show(m_gameSettingsBtnBBA);
if(GameHdr->type == TYPE_GC_GAME)
{
m_btnMgr.show(m_gameSettingsLblBBA);
m_btnMgr.show(m_gameSettingsBtnBBA);
m_btnMgr.show(m_gameSettingsLblNetProfVal);
m_btnMgr.show(m_gameSettingsLblNetProf);
m_btnMgr.show(m_gameSettingsBtnNetProfP);
m_btnMgr.show(m_gameSettingsBtnNetProfM);
m_btnMgr.show(m_gameSettingsLblNetProfVal);
m_btnMgr.show(m_gameSettingsLblNetProf);
m_btnMgr.show(m_gameSettingsBtnNetProfP);
m_btnMgr.show(m_gameSettingsBtnNetProfM);
}
else
{
m_btnMgr.show(m_gameSettingsLblWidescreenWiiu);
m_btnMgr.show(m_gameSettingsLblWidescreenWiiuVal);
m_btnMgr.show(m_gameSettingsBtnWidescreenWiiuP);
m_btnMgr.show(m_gameSettingsBtnWidescreenWiiuM);
}
}
m_btnMgr.setText(m_gameSettingsBtnAdultOnly, m_gcfg1.getBool("ADULTONLY", id, false) ? _t("yes", L"Yes") : _t("no", L"No"));
@ -678,6 +698,9 @@ void CMenu::_showGameSettings()
i = min(m_gcfg2.getUInt(id, "deflicker_wii", 0), ARRAY_SIZE(CMenu::_DeflickerOptions) - 1u);
m_btnMgr.setText(m_gameSettingsLblDeflickerWiiVal, _t(CMenu::_DeflickerOptions[i].id, CMenu::_DeflickerOptions[i].text));
i = min(m_gcfg2.getUInt(id, "widescreen_wiiu", 0), ARRAY_SIZE(CMenu::_WidescreenWiiu) - 1u);
m_btnMgr.setText(m_gameSettingsLblWidescreenWiiuVal, _t(CMenu::_WidescreenWiiu[i].id, CMenu::_WidescreenWiiu[i].text));
m_btnMgr.setText(m_gameSettingsBtnCustom, _optBoolToString(m_gcfg2.getOptBool(id, "custom", 0)));
m_btnMgr.setText(m_gameSettingsBtnLaunchNK, _optBoolToString(m_gcfg2.getOptBool(id, "useneek", 0)));
m_btnMgr.setText(m_gameSettingsBtnApploader, _optBoolToString(m_gcfg2.getOptBool(id, "apploader", 0)));
@ -828,6 +851,12 @@ void CMenu::_gameSettings(const dir_discHdr *hdr, bool disc)
m_gcfg2.setBool(id, "wiiu_widescreen", !m_gcfg2.getBool(id, "wiiu_widescreen", 0));
_showGameSettings();
}
else if(m_btnMgr.selected(m_gameSettingsBtnWidescreenWiiuP) || m_btnMgr.selected(m_gameSettingsBtnWidescreenWiiuM))
{
s8 direction = m_btnMgr.selected(m_gameSettingsBtnWidescreenWiiuP) ? 1 : -1;
m_gcfg2.setInt(id, "widescreen_wiiu", (int)loopNum(m_gcfg2.getUInt(id, "widescreen_wiiu", 0) + direction, ARRAY_SIZE(CMenu::_WidescreenWiiu)));
_showGameSettings();
}
else if(m_btnMgr.selected(m_gameSettingsBtnLanguageP) || m_btnMgr.selected(m_gameSettingsBtnLanguageM))
{
s8 direction = m_btnMgr.selected(m_gameSettingsBtnLanguageP) ? 1 : -1;
@ -1234,7 +1263,7 @@ void CMenu::_initGameSettingsMenu()
m_gameSettingsLblPatch50 = _addLabel("GAME_SETTINGS/PATCH_PAL50", theme.lblFont, L"", 20, 305, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
m_gameSettingsBtnPatch50 = _addButton("GAME_SETTINGS/PATCH_PAL50_BTN", theme.btnFont, L"", 420, 310, 200, 48, theme.btnFontColor);
//Page 6 GC only
//Page 6 GC
m_gameSettingsLblBBA = _addLabel("GAME_SETTINGS/BBA", theme.lblFont, L"", 20, 125, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
m_gameSettingsBtnBBA = _addButton("GAME_SETTINGS/BBA_BTN", theme.btnFont, L"", 420, 130, 200, 48, theme.btnFontColor);
@ -1243,6 +1272,12 @@ void CMenu::_initGameSettingsMenu()
m_gameSettingsBtnNetProfM = _addPicButton("GAME_SETTINGS/NET_PROFILE_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 420, 190, 48, 48);
m_gameSettingsBtnNetProfP = _addPicButton("GAME_SETTINGS/NET_PROFILE_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 572, 190, 48, 48);
//wii
m_gameSettingsLblWidescreenWiiu = _addLabel("GAME_SETTINGS/WIDESCREEN_WIIU", theme.lblFont, L"", 20, 125, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
m_gameSettingsLblWidescreenWiiuVal = _addLabel("GAME_SETTINGS/WIDESCREEN_WIIU_BTN", theme.btnFont, L"", 468, 130, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
m_gameSettingsBtnWidescreenWiiuM = _addPicButton("GAME_SETTINGS/WIDESCREEN_WIIU_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 420, 130, 48, 48);
m_gameSettingsBtnWidescreenWiiuP = _addPicButton("GAME_SETTINGS/WIDESCREEN_WIIU_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 572, 130, 48, 48);
//Footer
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);
@ -1340,6 +1375,11 @@ void CMenu::_initGameSettingsMenu()
_setHideAnim(m_gameSettingsLblWiiuWidescreen, "GAME_SETTINGS/WIIU_WIDESCREEN", 50, 0, -2.f, 0.f);
_setHideAnim(m_gameSettingsBtnWiiuWidescreen, "GAME_SETTINGS/WIIU_WIDESCREEN_BTN", -50, 0, 1.f, 0.f);
_setHideAnim(m_gameSettingsLblWidescreenWiiu, "GAME_SETTINGS/WIDESCREEN_WIIU", 50, 0, -2.f, 0.f);
_setHideAnim(m_gameSettingsLblWidescreenWiiuVal, "GAME_SETTINGS/WIDESCREEN_WIIU_BTN", -50, 0, 1.f, 0.f);
_setHideAnim(m_gameSettingsBtnWidescreenWiiuM, "GAME_SETTINGS/WIDESCREEN_WIIU_MINUS", -50, 0, 1.f, 0.f);
_setHideAnim(m_gameSettingsBtnWidescreenWiiuP, "GAME_SETTINGS/WIDESCREEN_WIIU_PLUS", -50, 0, 1.f, 0.f);
_setHideAnim(m_gameSettingsLblArcade, "GAME_SETTINGS/ARCADE", 50, 0, -2.f, 0.f);
_setHideAnim(m_gameSettingsBtnArcade, "GAME_SETTINGS/ARCADE_BTN", -50, 0, 1.f, 0.f);
@ -1426,6 +1466,7 @@ void CMenu::_textGameSettings(void)
m_btnMgr.setText(m_gameSettingsLblDevoMemcardEmu, _t("cfgg47", L"Emulated MemCard"));
m_btnMgr.setText(m_gameSettingsLblWidescreen, _t("cfgg36", L"Widescreen Patch"));
m_btnMgr.setText(m_gameSettingsLblWiiuWidescreen, _t("cfgg46", L"WiiU Widescreen"));
m_btnMgr.setText(m_gameSettingsLblWidescreenWiiu, _t("cfgg46", L"WiiU Widescreen"));
m_btnMgr.setText(m_gameSettingsLblCountryPatch, _t("cfgg4", L"Patch country strings"));
m_btnMgr.setText(m_gameSettingsLblVipatch, _t("cfgg7", L"Vipatch"));

View File

@ -1,5 +1,6 @@
#include <fcntl.h>
#include <ogc/machine/processor.h>
#include "menu.hpp"
#include "types.h"
@ -777,7 +778,9 @@ void CMenu::_launchChannel(dir_discHdr *hdr)
language = (language == 0) ? min(m_cfg.getUInt("GENERAL", "game_language", 0), ARRAY_SIZE(CMenu::_languages) - 1u) : language;
u8 patchVidMode = min(m_gcfg2.getUInt(id, "patch_video_modes", 0), ARRAY_SIZE(CMenu::_vidModePatch) - 1u);
s8 aspectRatio = min(m_gcfg2.getUInt(id, "aspect_ratio", 0), ARRAY_SIZE(CMenu::_AspectRatio) - 1) - 1;// -1,0,1
u8 private_server = m_gcfg2.getUInt(id, "private_server", 0);
string server_addr = "";
if(private_server > 2)
@ -785,8 +788,12 @@ void CMenu::_launchChannel(dir_discHdr *hdr)
vector<string> custom_servers = stringToVector(m_cfg.getString("custom_servers", "servers"), '|');
server_addr = m_cfg.getString("custom_servers", fmt("%s_url", custom_servers[private_server - 3]), "");
}
int fix480pVal = m_gcfg2.getOptBool(id, "fix480p", 2);
bool fix480p = fix480pVal == 0 ? false : (fix480pVal == 1 ? true : m_cfg.getBool(WII_DOMAIN, "fix480p", false));
u8 wiiuWidescreen = min(m_gcfg2.getUInt(id, "widescreen_wiiu", 0), ARRAY_SIZE(CMenu::_WidescreenWiiu) - 1u);
u8 deflicker = min(m_gcfg2.getUInt(id, "deflicker_wii", 0), ARRAY_SIZE(CMenu::_DeflickerOptions) - 1u);
deflicker = (deflicker == 0) ? min(m_cfg.getUInt("GENERAL", "deflicker_wii", 0), ARRAY_SIZE(CMenu::_GlobalDeflickerOptions) - 1u) : deflicker - 1;
@ -900,6 +907,12 @@ void CMenu::_launchChannel(dir_discHdr *hdr)
cleanup();//no more error messages we can now cleanup
if(wiiuWidescreen > 0 && IsOnWiiU())
{
write32(0xd8006a0, wiiuWidescreen == 2 ? 0x30000004 : 0x30000002);
mask32(0xd8006a8, 0, 2);
}
if(WII_Launch)
{
ShutdownBeforeExit();
@ -1004,6 +1017,8 @@ void CMenu::_launchWii(dir_discHdr *hdr, bool dvd, bool disc_cfg)
u8 deflicker = min(m_gcfg2.getUInt(id, "deflicker_wii", 0), ARRAY_SIZE(CMenu::_DeflickerOptions) - 1u);
deflicker = (deflicker == 0) ? min(m_cfg.getUInt("GENERAL", "deflicker_wii", 0), ARRAY_SIZE(CMenu::_GlobalDeflickerOptions) - 1u) : deflicker-1;
u8 wiiuWidescreen = min(m_gcfg2.getUInt(id, "widescreen_wiiu", 0), ARRAY_SIZE(CMenu::_WidescreenWiiu) - 1u);
u8 videoMode = min(m_gcfg2.getUInt(id, "video_mode", 0), ARRAY_SIZE(CMenu::_VideoModes) - 1u);
videoMode = (videoMode == 0) ? min(m_cfg.getUInt("GENERAL", "video_mode", 0), ARRAY_SIZE(CMenu::_GlobalVideoModes) - 1u) : videoMode-1;
@ -1187,7 +1202,12 @@ void CMenu::_launchWii(dir_discHdr *hdr, bool dvd, bool disc_cfg)
app_gameconfig_load(id.c_str(), gameconfig, gameconfigSize);
MEM2_free(gameconfig);
}
if(wiiuWidescreen > 0 && IsOnWiiU())
{
write32(0xd8006a0, wiiuWidescreen == 2 ? 0x30000004 : 0x30000002);
mask32(0xd8006a8, 0, 2);
}
ExternalBooter_WiiGameSetup(wbfs_partition, dvd, patchregion, id.c_str());
WiiFlow_ExternalBooter(videoMode, vipatch, countryPatch, patchVidMode, aspectRatio, private_server, server_addr.c_str(),
fix480p, deflicker, returnTo, TYPE_WII_GAME, use_led);