mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-27 05:34:15 +01:00
-added force aspect ratio patch from usb loader gx (thanks dimok for permission)
This commit is contained in:
parent
a04569d401
commit
c921214cc4
@ -37,7 +37,7 @@ typedef struct _dolheader{
|
||||
|
||||
u32 entryPoint;
|
||||
|
||||
s32 BootChannel(u8 *data, u64 chantitle, u8 vidMode, bool vipatch, bool countryString, u8 patchVidMode, bool disableIOSreload)
|
||||
s32 BootChannel(u8 *data, u64 chantitle, u8 vidMode, bool vipatch, bool countryString, u8 patchVidMode, bool disableIOSreload, int aspectRatio)
|
||||
{
|
||||
u32 ios;
|
||||
Identify(chantitle, &ios);
|
||||
@ -56,7 +56,7 @@ s32 BootChannel(u8 *data, u64 chantitle, u8 vidMode, bool vipatch, bool countryS
|
||||
if (hooktype != 0)
|
||||
ocarina_do_code();
|
||||
|
||||
PatchChannel(vidMode, vmode, vipatch, countryString, patchVidMode);
|
||||
PatchChannel(vidMode, vmode, vipatch, countryString, patchVidMode, aspectRatio);
|
||||
|
||||
entrypoint appJump = (entrypoint)entryPoint;
|
||||
|
||||
@ -167,7 +167,7 @@ u32 LoadChannel(u8 *buffer)
|
||||
return dolfile->entry_point;
|
||||
}
|
||||
|
||||
void PatchChannel(u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryString, u8 patchVidModes)
|
||||
void PatchChannel(u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryString, u8 patchVidModes, int aspectRatio)
|
||||
{
|
||||
bool hookpatched = false;
|
||||
|
||||
@ -178,6 +178,7 @@ void PatchChannel(u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryStrin
|
||||
if (vipatch) vidolpatcher(dolchunkoffset[i], dolchunksize[i]);
|
||||
if (configbytes[0] != 0xCD) langpatcher(dolchunkoffset[i], dolchunksize[i]);
|
||||
if (countryString) PatchCountryStrings(dolchunkoffset[i], dolchunksize[i]);
|
||||
if (aspectRatio != -1) PatchAspectRatio(dolchunkoffset[i], dolchunksize[i], aspectRatio);
|
||||
|
||||
if (hooktype != 0)
|
||||
if (dogamehooks(dolchunkoffset[i], dolchunksize[i], true))
|
||||
|
@ -8,10 +8,10 @@ extern "C" {
|
||||
#include <gctypes.h>
|
||||
#include <gccore.h>
|
||||
|
||||
s32 BootChannel(u8 *data, u64 chantitle, u8 vidMode, bool vipatch, bool countryString, u8 patchVidMode, bool disableIOSreload);
|
||||
s32 BootChannel(u8 *data, u64 chantitle, u8 vidMode, bool vipatch, bool countryString, u8 patchVidMode, bool disableIOSreload, int aspectRatio);
|
||||
|
||||
u32 LoadChannel(u8 *buffer);
|
||||
void PatchChannel(u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryString, u8 patchVidModes);
|
||||
void PatchChannel(u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryString, u8 patchVidModes, int aspectRatio);
|
||||
|
||||
u8 * GetDol(u64 title, char *id, u32 bootcontent);
|
||||
|
||||
|
@ -103,9 +103,9 @@ u8 Channels::GetRequestedIOS(u64 title)
|
||||
return IOS;
|
||||
}
|
||||
|
||||
bool Channels::Launch(u8 *data, u64 chantitle, u8 vidMode, bool vipatch, bool countryString, u8 patchVidMode, bool disableIOSreload)
|
||||
bool Channels::Launch(u8 *data, u64 chantitle, u8 vidMode, bool vipatch, bool countryString, u8 patchVidMode, bool disableIOSreload, int aspectRatio)
|
||||
{
|
||||
return BootChannel(data, chantitle, vidMode, vipatch, countryString, patchVidMode, disableIOSreload);
|
||||
return BootChannel(data, chantitle, vidMode, vipatch, countryString, patchVidMode, disableIOSreload, aspectRatio);
|
||||
}
|
||||
|
||||
u64* Channels::GetChannelList(u32* count)
|
||||
|
@ -56,7 +56,7 @@ class Channels
|
||||
|
||||
u8 * Load(u64 title, char* id);
|
||||
u8 GetRequestedIOS(u64 title);
|
||||
bool Launch(u8 *data, u64 chantitle, u8 vidMode, bool vipatch, bool countryString, u8 patchVidMode, bool disableIOSreload);
|
||||
bool Launch(u8 *data, u64 chantitle, u8 vidMode, bool vipatch, bool countryString, u8 patchVidMode, bool disableIOSreload, int aspectRatio);
|
||||
|
||||
int Count();
|
||||
wchar_t *GetName(int index);
|
||||
|
@ -24,7 +24,7 @@ typedef void (*app_entry)(void (**init)(void (*report)(const char *fmt, ...)),
|
||||
/* Variables */
|
||||
static u32 buffer[0x20] ATTRIBUTE_ALIGN(32);
|
||||
|
||||
static bool maindolpatches(void *dst, int len, u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryString, u8 patchVidModes);
|
||||
static bool maindolpatches(void *dst, int len, u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryString, u8 patchVidModes, int aspectRatio);
|
||||
static bool Remove_001_Protection(void *Address, int Size);
|
||||
static bool PrinceOfPersiaPatch();
|
||||
|
||||
@ -32,7 +32,7 @@ static void __noprint(const char *fmt, ...)
|
||||
{
|
||||
}
|
||||
|
||||
s32 Apploader_Run(entry_point *entry, u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryString, u8 patchVidModes)
|
||||
s32 Apploader_Run(entry_point *entry, u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryString, u8 patchVidModes, int aspectRatio)
|
||||
{
|
||||
void *dst = NULL;
|
||||
int len = 0;
|
||||
@ -72,7 +72,7 @@ s32 Apploader_Run(entry_point *entry, u8 vidMode, GXRModeObj *vmode, bool vipatc
|
||||
{
|
||||
/* Read data from DVD */
|
||||
WDVD_Read(dst, len, (u64)(offset << 2));
|
||||
if(maindolpatches(dst, len, vidMode, vmode, vipatch, countryString, patchVidModes))
|
||||
if(maindolpatches(dst, len, vidMode, vmode, vipatch, countryString, patchVidModes, aspectRatio))
|
||||
hookpatched = true;
|
||||
}
|
||||
|
||||
@ -236,7 +236,7 @@ bool NewSuperMarioBrosPatch(void *Address, int Size)
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool maindolpatches(void *dst, int len, u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryString, u8 patchVidModes)
|
||||
static bool maindolpatches(void *dst, int len, u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryString, u8 patchVidModes, int aspectRatio)
|
||||
{
|
||||
bool ret = false;
|
||||
|
||||
@ -248,7 +248,7 @@ static bool maindolpatches(void *dst, int len, u8 vidMode, GXRModeObj *vmode, bo
|
||||
if (vipatch) vidolpatcher(dst, len);
|
||||
if (configbytes[0] != 0xCD) langpatcher(dst, len);
|
||||
if (countryString) PatchCountryStrings(dst, len); // Country Patch by WiiPower
|
||||
|
||||
if (aspectRatio != -1) PatchAspectRatio(dst, len, aspectRatio);
|
||||
Remove_001_Protection(dst, len);
|
||||
|
||||
// NSMB Patch by WiiPower
|
||||
|
@ -5,6 +5,6 @@
|
||||
typedef void (*entry_point)(void);
|
||||
|
||||
/* Prototypes */
|
||||
s32 Apploader_Run(entry_point *, u8, GXRModeObj *vmode, bool, bool, u8);
|
||||
s32 Apploader_Run(entry_point *, u8, GXRModeObj *vmode, bool, bool, u8, int);
|
||||
|
||||
#endif
|
||||
|
@ -339,7 +339,7 @@ s32 Disc_IsGC(void)
|
||||
return Disc_Type(1);
|
||||
}
|
||||
|
||||
s32 Disc_BootPartition(u64 offset, u8 vidMode, bool vipatch, bool countryString, u8 patchVidMode, bool disableIOSreload)
|
||||
s32 Disc_BootPartition(u64 offset, u8 vidMode, bool vipatch, bool countryString, u8 patchVidMode, bool disableIOSreload, int aspectRatio)
|
||||
{
|
||||
entry_point p_entry;
|
||||
|
||||
@ -358,7 +358,7 @@ s32 Disc_BootPartition(u64 offset, u8 vidMode, bool vipatch, bool countryString,
|
||||
__Disc_SetLowMem();
|
||||
|
||||
/* Run apploader */
|
||||
ret = Apploader_Run(&p_entry, vidMode, vmode, vipatch, countryString, patchVidMode);
|
||||
ret = Apploader_Run(&p_entry, vidMode, vmode, vipatch, countryString, patchVidMode, aspectRatio);
|
||||
free_wip();
|
||||
if (ret < 0) return ret;
|
||||
|
||||
@ -425,7 +425,7 @@ s32 Disc_BootPartition(u64 offset, u8 vidMode, bool vipatch, bool countryString,
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 Disc_WiiBoot(u8 vidMode, bool vipatch, bool countryString, u8 patchVidModes, bool disableIOSreload)
|
||||
s32 Disc_WiiBoot(u8 vidMode, bool vipatch, bool countryString, u8 patchVidModes, bool disableIOSreload, int aspectRatio)
|
||||
{
|
||||
u64 offset;
|
||||
|
||||
@ -434,5 +434,5 @@ s32 Disc_WiiBoot(u8 vidMode, bool vipatch, bool countryString, u8 patchVidModes,
|
||||
if (ret < 0) return ret;
|
||||
|
||||
/* Boot partition */
|
||||
return Disc_BootPartition(offset, vidMode, vipatch, countryString, patchVidModes, disableIOSreload);
|
||||
return Disc_BootPartition(offset, vidMode, vipatch, countryString, patchVidModes, disableIOSreload, aspectRatio);
|
||||
}
|
||||
|
@ -102,8 +102,8 @@ extern "C" {
|
||||
s32 Disc_Type(bool);
|
||||
s32 Disc_IsWii(void);
|
||||
s32 Disc_IsGC(void);
|
||||
s32 Disc_BootPartition(u64, u8, bool, bool, u8, bool);
|
||||
s32 Disc_WiiBoot(u8, bool, bool, u8, bool);
|
||||
s32 Disc_BootPartition(u64, u8, bool, bool, u8, bool, int);
|
||||
s32 Disc_WiiBoot(u8, bool, bool, u8, bool, int);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -276,4 +276,35 @@ s32 IOSReloadBlock(u8 reqios, bool enable)
|
||||
IOS_Close(ESHandle);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
void PatchAspectRatio(void *addr, u32 len, u8 aspect)
|
||||
{
|
||||
if(aspect > 1)
|
||||
return;
|
||||
|
||||
static const u32 aspect_searchpattern1[5] = {
|
||||
0x9421FFF0, 0x7C0802A6, 0x38800001, 0x90010014, 0x38610008
|
||||
};
|
||||
|
||||
static const u32 aspect_searchpattern2[15] = {
|
||||
0x2C030000, 0x40820010, 0x38000000, 0x98010008, 0x48000018,
|
||||
0x88010008, 0x28000001, 0x4182000C, 0x38000000, 0x98010008,
|
||||
0x80010014, 0x88610008, 0x7C0803A6, 0x38210010, 0x4E800020
|
||||
};
|
||||
|
||||
u8 *addr_start = (u8 *) addr;
|
||||
u8 *addr_end = addr_start + len - sizeof(aspect_searchpattern1) - 4 - sizeof(aspect_searchpattern2);
|
||||
|
||||
while(addr_start < addr_end)
|
||||
{
|
||||
if( (memcmp(addr_start, aspect_searchpattern1, sizeof(aspect_searchpattern1)) == 0)
|
||||
&& (memcmp(addr_start + 4 + sizeof(aspect_searchpattern1), aspect_searchpattern2, sizeof(aspect_searchpattern2)) == 0))
|
||||
{
|
||||
*((u32 *)(addr_start+0x44)) = (0x38600000 | aspect);
|
||||
gprintf("Aspect ratio patched to: %s\n", aspect ? "16:9" : "4:3");
|
||||
break;
|
||||
}
|
||||
addr_start += 4;
|
||||
}
|
||||
}
|
@ -34,6 +34,7 @@ bool dogamehooks(void *addr, u32 len, bool channel);
|
||||
void langpatcher(void *addr, u32 len);
|
||||
void vidolpatcher(void *addr, u32 len);
|
||||
s32 IOSReloadBlock(u8 reqios, bool enable);
|
||||
void PatchAspectRatio(void *addr, u32 len, u8 aspect);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -333,6 +333,11 @@ private:
|
||||
u32 m_gameSettingsLblIOSreloadBlock;
|
||||
u32 m_gameSettingsBtnIOSreloadBlock;
|
||||
|
||||
u32 m_gameSettingsLblAspectRatio;
|
||||
u32 m_gameSettingsLblAspectRatioVal;
|
||||
u32 m_gameSettingsBtnAspectRatioP;
|
||||
u32 m_gameSettingsBtnAspectRatioM;
|
||||
|
||||
u32 m_gameSettingsLblOcarina;
|
||||
u32 m_gameSettingsBtnOcarina;
|
||||
u32 m_gameSettingsLblVipatch;
|
||||
@ -780,6 +785,7 @@ private:
|
||||
static const SOption _videoModes[7];
|
||||
static const SOption _DMLvideoModes[3];
|
||||
static const SOption _SaveEmu[3];
|
||||
static const SOption _AspectRatio[3];
|
||||
static const SOption _vidModePatch[4];
|
||||
static const SOption _hooktype[8];
|
||||
static const SOption _exitTo[5];
|
||||
|
@ -36,6 +36,10 @@ void CMenu::_hideGameSettings(bool instant)
|
||||
m_btnMgr.hide(m_gameSettingsLblDMLVideo, instant);
|
||||
m_btnMgr.hide(m_gameSettingsBtnDMLVideoP, instant);
|
||||
m_btnMgr.hide(m_gameSettingsBtnDMLVideoM, instant);
|
||||
m_btnMgr.hide(m_gameSettingsLblAspectRatio, instant);
|
||||
m_btnMgr.hide(m_gameSettingsLblAspectRatioVal, instant);
|
||||
m_btnMgr.hide(m_gameSettingsBtnAspectRatioP, instant);
|
||||
m_btnMgr.hide(m_gameSettingsBtnAspectRatioM, instant);
|
||||
m_btnMgr.hide(m_gameSettingsLblIOSreloadBlock, instant);
|
||||
m_btnMgr.hide(m_gameSettingsBtnIOSreloadBlock, instant);
|
||||
m_btnMgr.hide(m_gameSettingsLblOcarina, instant);
|
||||
@ -237,7 +241,6 @@ void CMenu::_showGameSettings(void)
|
||||
m_btnMgr.hide(m_gameSettingsLblCountryPatch);
|
||||
m_btnMgr.hide(m_gameSettingsBtnCountryPatch);
|
||||
|
||||
|
||||
m_btnMgr.hide(m_gameSettingsLblEmulationVal);
|
||||
m_btnMgr.hide(m_gameSettingsLblEmulation);
|
||||
m_btnMgr.hide(m_gameSettingsBtnEmulationP);
|
||||
@ -254,6 +257,11 @@ void CMenu::_showGameSettings(void)
|
||||
{
|
||||
m_btnMgr.show(m_gameSettingsLblIOSreloadBlock);
|
||||
m_btnMgr.show(m_gameSettingsBtnIOSreloadBlock);
|
||||
|
||||
m_btnMgr.show(m_gameSettingsLblAspectRatio);
|
||||
m_btnMgr.show(m_gameSettingsLblAspectRatioVal);
|
||||
m_btnMgr.show(m_gameSettingsBtnAspectRatioP);
|
||||
m_btnMgr.show(m_gameSettingsBtnAspectRatioM);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -265,6 +273,11 @@ void CMenu::_showGameSettings(void)
|
||||
|
||||
m_btnMgr.hide(m_gameSettingsLblIOSreloadBlock);
|
||||
m_btnMgr.hide(m_gameSettingsBtnIOSreloadBlock);
|
||||
|
||||
m_btnMgr.hide(m_gameSettingsLblAspectRatio);
|
||||
m_btnMgr.hide(m_gameSettingsLblAspectRatioVal);
|
||||
m_btnMgr.hide(m_gameSettingsBtnAspectRatioP);
|
||||
m_btnMgr.hide(m_gameSettingsBtnAspectRatioM);
|
||||
}
|
||||
|
||||
|
||||
@ -344,6 +357,8 @@ void CMenu::_showGameSettings(void)
|
||||
m_btnMgr.setText(m_gameSettingsLblDMLVideo, _t(CMenu::_DMLvideoModes[i].id, CMenu::_DMLvideoModes[i].text));
|
||||
i = min((u32)m_gcfg2.getInt(id, "language", 0), ARRAY_SIZE(CMenu::_languages) - 1u);
|
||||
m_btnMgr.setText(m_gameSettingsLblLanguage, _t(CMenu::_languages[i].id, CMenu::_languages[i].text));
|
||||
i = min((u32)m_gcfg2.getInt(id, "aspect_ratio", 0), ARRAY_SIZE(CMenu::_AspectRatio) - 1u);
|
||||
m_btnMgr.setText(m_gameSettingsLblAspectRatioVal, _t(CMenu::_AspectRatio[i].id, CMenu::_AspectRatio[i].text));
|
||||
|
||||
int j = 0;
|
||||
if (m_gcfg2.getInt(id, "ios", &j) && _installed_cios.size() > 0)
|
||||
@ -478,6 +493,12 @@ void CMenu::_gameSettings(void)
|
||||
m_gcfg2.setInt(id, "dml_video_mode", (int)loopNum((u32)m_gcfg2.getInt(id, "dml_video_mode", 0) + direction, ARRAY_SIZE(CMenu::_DMLvideoModes)));
|
||||
_showGameSettings();
|
||||
}
|
||||
else if (m_btnMgr.selected(m_gameSettingsBtnAspectRatioP) || m_btnMgr.selected(m_gameSettingsBtnAspectRatioM))
|
||||
{
|
||||
s8 direction = m_btnMgr.selected(m_gameSettingsBtnAspectRatioP) ? 1 : -1;
|
||||
m_gcfg2.setInt(id, "aspect_ratio", (int)loopNum((u32)m_gcfg2.getInt(id, "aspect_ratio", 0) + direction, ARRAY_SIZE(CMenu::_AspectRatio)));
|
||||
_showGameSettings();
|
||||
}
|
||||
else if (m_btnMgr.selected(m_gameSettingsBtnIOSM) || m_btnMgr.selected(m_gameSettingsBtnIOSP))
|
||||
{
|
||||
if( _installed_cios.size() > 0)
|
||||
@ -645,6 +666,11 @@ void CMenu::_initGameSettingsMenu(CMenu::SThemeData &theme)
|
||||
|
||||
m_gameSettingsLblIOSreloadBlock = _addLabel(theme, "GAME_SETTINGS/IOS_RELOAD_BLOCK", theme.lblFont, L"", 40, 190, 340, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_gameSettingsBtnIOSreloadBlock = _addButton(theme, "GAME_SETTINGS/IOS_RELOAD_BLOCK_BTN", theme.btnFont, L"", 380, 190, 220, 56, theme.btnFontColor);
|
||||
|
||||
m_gameSettingsLblAspectRatio = _addLabel(theme, "GAME_SETTINGS/ASPECT_RATIO", theme.lblFont, L"", 40, 250, 290, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_gameSettingsLblAspectRatioVal = _addLabel(theme, "GAME_SETTINGS/ASPECT_RATIO_BTN", theme.btnFont, L"", 386, 250, 158, 56, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
|
||||
m_gameSettingsBtnAspectRatioP = _addPicButton(theme, "GAME_SETTINGS/ASPECT_RATIO_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 544, 250, 56, 56);
|
||||
m_gameSettingsBtnAspectRatioM = _addPicButton(theme, "GAME_SETTINGS/ASPECT_RATIO_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 330, 250, 56, 56);
|
||||
|
||||
//Categories Page 1
|
||||
//m_gameSettingsLblCategory[0] = _addLabel(theme, "GAME_SETTINGS/CAT_ALL", theme.lblFont, L"All", 40, 130, 290, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
@ -720,6 +746,10 @@ void CMenu::_initGameSettingsMenu(CMenu::SThemeData &theme)
|
||||
_setHideAnim(m_gameSettingsLblPatchVidModesVal, "GAME_SETTINGS/PATCH_VIDEO_MODE_BTN", 200, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_gameSettingsBtnPatchVidModesM, "GAME_SETTINGS/PATCH_VIDEO_MODE_MINUS", 200, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_gameSettingsBtnPatchVidModesP, "GAME_SETTINGS/PATCH_VIDEO_MODE_PLUS", 200, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_gameSettingsLblAspectRatio, "GAME_SETTINGS/ASPECT_RATIO", -200, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_gameSettingsLblAspectRatioVal, "GAME_SETTINGS/ASPECT_RATIO_BTN", 200, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_gameSettingsBtnAspectRatioP, "GAME_SETTINGS/ASPECT_RATIO_PLUS", 200, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_gameSettingsBtnAspectRatioM, "GAME_SETTINGS/ASPECT_RATIO_MINUS", 200, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_gameSettingsLblHooktype, "GAME_SETTINGS/HOOKTYPE", -200, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_gameSettingsLblHooktypeVal, "GAME_SETTINGS/HOOKTYPE_BTN", 200, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_gameSettingsBtnHooktypeM, "GAME_SETTINGS/HOOKTYPE_MINUS", 200, 0, 1.f, 0.f);
|
||||
@ -754,7 +784,6 @@ void CMenu::_textGameSettings(void)
|
||||
m_btnMgr.setText(m_gameSettingsLblCountryPatch, _t("cfgg4", L"Patch country strings"));
|
||||
m_btnMgr.setText(m_gameSettingsLblOcarina, _t("cfgg5", L"Ocarina"));
|
||||
m_btnMgr.setText(m_gameSettingsLblDMLGameVideo, _t("cfgg2", L"Video mode"));
|
||||
m_btnMgr.setText(m_gameSettingsLblIOSreloadBlock, _t("cfgg26",L"Disable IOS Reload block"));
|
||||
m_btnMgr.setText(m_gameSettingsLblVipatch, _t("cfgg7", L"Vipatch"));
|
||||
m_btnMgr.setText(m_gameSettingsBtnBack, _t("cfgg8", L"Back"));
|
||||
m_btnMgr.setText(m_gameSettingsLblGameIOS, _t("cfgg10", L"IOS"));
|
||||
@ -766,8 +795,10 @@ void CMenu::_textGameSettings(void)
|
||||
m_btnMgr.setText(m_gameSettingsLblCategoryMain, _t("cfgg17", L"Categories"));
|
||||
m_btnMgr.setText(m_gameSettingsBtnCategoryMain, _t("cfgg16", L"Select"));
|
||||
m_btnMgr.setText(m_gameSettingsLblHooktype, _t("cfgg18", L"Hook Type"));
|
||||
m_btnMgr.setText(m_gameSettingsLblEmulation, _t("cfgg24", L"Savegame Emulation"));
|
||||
m_btnMgr.setText(m_gameSettingsLblDebugger, _t("cfgg22", L"Debugger"));
|
||||
m_btnMgr.setText(m_gameSettingsLblEmulation, _t("cfgg24", L"Savegame Emulation"));
|
||||
m_btnMgr.setText(m_gameSettingsLblIOSreloadBlock, _t("cfgg26", L"Disable IOS Reload block"));
|
||||
m_btnMgr.setText(m_gameSettingsLblAspectRatio, _t("cfgg27", L"Aspect Ratio"));
|
||||
for (int i = 1; i < 12; ++i)
|
||||
m_btnMgr.setText(m_gameSettingsLblCategory[i], m_cat.getWString("GENERAL", fmt("cat%d",i), wfmt(L"Category %i",i).c_str()));
|
||||
}
|
@ -111,6 +111,12 @@ const CMenu::SOption CMenu::_SaveEmu[3] = {
|
||||
{ "2", L"Full" },
|
||||
};
|
||||
|
||||
const CMenu::SOption CMenu::_AspectRatio[3] = {
|
||||
{ "0", L"Default" },
|
||||
{ "1", L"Force 4:3" },
|
||||
{ "2", L"Force 16:9" },
|
||||
};
|
||||
|
||||
const CMenu::SOption CMenu::_vidModePatch[4] = {
|
||||
{ "vmpnone", L"None" },
|
||||
{ "vmpnormal", L"Normal" },
|
||||
@ -655,7 +661,8 @@ void CMenu::_launchChannel(dir_discHdr *hdr)
|
||||
const char *rtrn = m_gcfg2.getBool(id, "returnto", true) ? m_cfg.getString("GENERAL", "returnto").c_str() : NULL;
|
||||
u8 patchVidMode = min((u32)m_gcfg2.getInt(id, "patch_video_modes", 0), ARRAY_SIZE(CMenu::_vidModePatch) - 1u);
|
||||
bool disableIOSreload = m_gcfg2.testOptBool(id, "reload_block", m_cfg.getBool("GENERAL", "reload_block", false));
|
||||
|
||||
int aspectRatio = min((u32)m_gcfg2.getInt(id, "aspect_ratio", 0), ARRAY_SIZE(CMenu::_AspectRatio) - 1u)-1;
|
||||
|
||||
int gameIOS = 0;
|
||||
|
||||
if(!forwarder)
|
||||
@ -800,7 +807,7 @@ void CMenu::_launchChannel(dir_discHdr *hdr)
|
||||
if (WII_LaunchTitle(hdr->hdr.chantitle) < 0)
|
||||
Sys_LoadMenu();
|
||||
}
|
||||
else if(!channel.Launch(data, hdr->hdr.chantitle, videoMode, vipatch, countryPatch, patchVidMode, disableIOSreload))
|
||||
else if(!channel.Launch(data, hdr->hdr.chantitle, videoMode, vipatch, countryPatch, patchVidMode, disableIOSreload, aspectRatio))
|
||||
Sys_LoadMenu();
|
||||
}
|
||||
|
||||
@ -861,7 +868,8 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
|
||||
int language = min((u32)m_gcfg2.getInt(id, "language", 0), ARRAY_SIZE(CMenu::_languages) - 1u);
|
||||
const char *rtrn = m_gcfg2.getBool(id, "returnto", true) ? m_cfg.getString("GENERAL", "returnto").c_str() : NULL;
|
||||
bool disableIOSreload = m_gcfg2.testOptBool(id, "reload_block", m_cfg.getBool("GENERAL", "reload_block", false));
|
||||
|
||||
int aspectRatio = min((u32)m_gcfg2.getInt(id, "aspect_ratio", 0), ARRAY_SIZE(CMenu::_AspectRatio) - 1u)-1;
|
||||
|
||||
int emuPartition = m_cfg.getInt("GAMES", "savepartition", -1);
|
||||
if(emuPartition == -1)
|
||||
emuPartition = m_cfg.getInt("NAND", "partition", -1);
|
||||
@ -1059,7 +1067,7 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
|
||||
else
|
||||
{
|
||||
gprintf("Booting game\n");
|
||||
if (Disc_WiiBoot(videoMode, vipatch, countryPatch, patchVidMode, disableIOSreload) < 0)
|
||||
if (Disc_WiiBoot(videoMode, vipatch, countryPatch, patchVidMode, disableIOSreload, aspectRatio) < 0)
|
||||
Sys_LoadMenu();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user