Allow games to render at their framebuffer widths

This effectively disables horizontal scaling and when paired with GCVideo it should give you a pixel perfect image.
This commit is contained in:
wiidev 2023-01-01 17:00:31 +00:00
parent c3a65d572c
commit bb21617dba
33 changed files with 267 additions and 17 deletions

View File

@ -1062,6 +1062,9 @@ msgstr ""
msgid "Frame Projection Y-Offset"
msgstr ""
msgid "Framebuffer"
msgstr ""
msgid "Frames"
msgstr ""
@ -2386,6 +2389,9 @@ msgstr ""
msgid "Video scale"
msgstr ""
msgid "Video Width"
msgstr ""
msgid "Virtual Pointer Speed"
msgstr ""

View File

@ -1062,6 +1062,9 @@ msgstr "Billedeprojektion X-Offset"
msgid "Frame Projection Y-Offset"
msgstr "Billedeprojektion Y-Offset"
msgid "Framebuffer"
msgstr ""
msgid "Frames"
msgstr "Billeder"
@ -2386,6 +2389,9 @@ msgstr ""
msgid "Video scale"
msgstr "Video Skala"
msgid "Video Width"
msgstr ""
msgid "Virtual Pointer Speed"
msgstr "Virtuel Pointer Hastighed"

View File

@ -1062,6 +1062,9 @@ msgstr "Rand projectie X-compensatie"
msgid "Frame Projection Y-Offset"
msgstr "Rand projectie Y-compensatie"
msgid "Framebuffer"
msgstr ""
msgid "Frames"
msgstr "Randen"
@ -2386,6 +2389,9 @@ msgstr ""
msgid "Video scale"
msgstr ""
msgid "Video Width"
msgstr ""
msgid "Virtual Pointer Speed"
msgstr "Virtuele Muis Snelheid"

View File

@ -1062,6 +1062,9 @@ msgstr ""
msgid "Frame Projection Y-Offset"
msgstr ""
msgid "Framebuffer"
msgstr ""
msgid "Frames"
msgstr ""
@ -2386,6 +2389,9 @@ msgstr ""
msgid "Video scale"
msgstr ""
msgid "Video Width"
msgstr ""
msgid "Virtual Pointer Speed"
msgstr ""

View File

@ -1062,6 +1062,9 @@ msgstr ""
msgid "Frame Projection Y-Offset"
msgstr ""
msgid "Framebuffer"
msgstr ""
msgid "Frames"
msgstr ""
@ -2386,6 +2389,9 @@ msgstr ""
msgid "Video scale"
msgstr ""
msgid "Video Width"
msgstr ""
msgid "Virtual Pointer Speed"
msgstr ""

View File

@ -1062,6 +1062,9 @@ msgstr "Projection image pos. X"
msgid "Frame Projection Y-Offset"
msgstr "Projection image pos. Y"
msgid "Framebuffer"
msgstr ""
msgid "Frames"
msgstr "images"
@ -2386,6 +2389,9 @@ msgstr "Position de l'image"
msgid "Video scale"
msgstr "Échelle de l'image"
msgid "Video Width"
msgstr ""
msgid "Virtual Pointer Speed"
msgstr "Vitesse du pointeur virtuel"

View File

@ -1062,6 +1062,9 @@ msgstr "Frame Projektions-X-Offset"
msgid "Frame Projection Y-Offset"
msgstr "Frame Projektions-Y-Offset"
msgid "Framebuffer"
msgstr ""
msgid "Frames"
msgstr "Frames"
@ -2386,6 +2389,9 @@ msgstr ""
msgid "Video scale"
msgstr ""
msgid "Video Width"
msgstr ""
msgid "Virtual Pointer Speed"
msgstr "Pointergeschwindigkeit"

View File

@ -1062,6 +1062,9 @@ msgstr "Οριζόντιο πλάτος προβολής καρέ"
msgid "Frame Projection Y-Offset"
msgstr "Κάθετο ύψος προβολής καρέ"
msgid "Framebuffer"
msgstr ""
msgid "Frames"
msgstr "Καρέ"
@ -2386,6 +2389,9 @@ msgstr ""
msgid "Video scale"
msgstr ""
msgid "Video Width"
msgstr ""
msgid "Virtual Pointer Speed"
msgstr "Ταχύτητα εικονικού δείκτη"

View File

@ -1062,6 +1062,9 @@ msgstr ""
msgid "Frame Projection Y-Offset"
msgstr ""
msgid "Framebuffer"
msgstr ""
msgid "Frames"
msgstr ""
@ -2389,6 +2392,9 @@ msgstr ""
msgid "Video scale"
msgstr ""
msgid "Video Width"
msgstr ""
msgid "Virtual Pointer Speed"
msgstr ""

View File

@ -1062,6 +1062,9 @@ msgstr "Proiezione offset-x frame"
msgid "Frame Projection Y-Offset"
msgstr "Proiezione offset-y frame"
msgid "Framebuffer"
msgstr ""
msgid "Frames"
msgstr "Frames"
@ -2389,6 +2392,9 @@ msgstr ""
msgid "Video scale"
msgstr "Scaling video"
msgid "Video Width"
msgstr ""
msgid "Virtual Pointer Speed"
msgstr "Velocità puntatore virtuale"

View File

@ -1062,6 +1062,9 @@ msgstr "フレーム角のXオフセット"
msgid "Frame Projection Y-Offset"
msgstr "フレーム角のyオフセット"
msgid "Framebuffer"
msgstr ""
msgid "Frames"
msgstr "フレーム"
@ -2389,6 +2392,9 @@ msgstr ""
msgid "Video scale"
msgstr ""
msgid "Video Width"
msgstr ""
msgid "Virtual Pointer Speed"
msgstr "ポインタの速度"

View File

@ -1062,6 +1062,9 @@ msgstr "프레임 영상 X-옵셋"
msgid "Frame Projection Y-Offset"
msgstr "프레임 영상 Y-옵셋"
msgid "Framebuffer"
msgstr "프레임 버퍼"
msgid "Frames"
msgstr "프레임"
@ -2389,6 +2392,9 @@ msgstr "비디오 옵셋"
msgid "Video scale"
msgstr "비디오 스케일"
msgid "Video Width"
msgstr "비디오 폭"
msgid "Virtual Pointer Speed"
msgstr "가상 포인터 속도"

View File

@ -1062,6 +1062,9 @@ msgstr ""
msgid "Frame Projection Y-Offset"
msgstr ""
msgid "Framebuffer"
msgstr ""
msgid "Frames"
msgstr ""
@ -2386,6 +2389,9 @@ msgstr ""
msgid "Video scale"
msgstr ""
msgid "Video Width"
msgstr ""
msgid "Virtual Pointer Speed"
msgstr ""

View File

@ -1062,6 +1062,9 @@ msgstr ""
msgid "Frame Projection Y-Offset"
msgstr ""
msgid "Framebuffer"
msgstr ""
msgid "Frames"
msgstr ""
@ -2386,6 +2389,9 @@ msgstr ""
msgid "Video scale"
msgstr ""
msgid "Video Width"
msgstr ""
msgid "Virtual Pointer Speed"
msgstr ""

View File

@ -1062,6 +1062,9 @@ msgstr "Deslocamento X da Moldura"
msgid "Frame Projection Y-Offset"
msgstr "Deslocamento Y da Moldura"
msgid "Framebuffer"
msgstr ""
msgid "Frames"
msgstr ""
@ -2386,6 +2389,9 @@ msgstr ""
msgid "Video scale"
msgstr "Escala Video"
msgid "Video Width"
msgstr ""
msgid "Virtual Pointer Speed"
msgstr "Velocidade do Ponteiro"

View File

@ -1062,6 +1062,9 @@ msgstr ""
msgid "Frame Projection Y-Offset"
msgstr ""
msgid "Framebuffer"
msgstr ""
msgid "Frames"
msgstr ""
@ -2386,6 +2389,9 @@ msgstr ""
msgid "Video scale"
msgstr ""
msgid "Video Width"
msgstr ""
msgid "Virtual Pointer Speed"
msgstr ""

View File

@ -1062,6 +1062,9 @@ msgstr ""
msgid "Frame Projection Y-Offset"
msgstr ""
msgid "Framebuffer"
msgstr ""
msgid "Frames"
msgstr ""
@ -2386,6 +2389,9 @@ msgstr ""
msgid "Video scale"
msgstr ""
msgid "Video Width"
msgstr ""
msgid "Virtual Pointer Speed"
msgstr ""

View File

@ -1062,6 +1062,9 @@ msgstr "帧投影 X 轴偏移"
msgid "Frame Projection Y-Offset"
msgstr "帧投影 Y 轴偏移"
msgid "Framebuffer"
msgstr ""
msgid "Frames"
msgstr "帧数"
@ -2386,6 +2389,9 @@ msgstr ""
msgid "Video scale"
msgstr ""
msgid "Video Width"
msgstr ""
msgid "Virtual Pointer Speed"
msgstr "虚拟指针速度"

View File

@ -1062,6 +1062,9 @@ msgstr "Proyección del marco X-Offset"
msgid "Frame Projection Y-Offset"
msgstr "Proyección del marco Y-Offset"
msgid "Framebuffer"
msgstr ""
msgid "Frames"
msgstr "Marcos"
@ -2386,6 +2389,9 @@ msgstr "Offset de vídeo"
msgid "Video scale"
msgstr "Escala de vídeo"
msgid "Video Width"
msgstr ""
msgid "Virtual Pointer Speed"
msgstr "Vel. Puntero Virtual"

View File

@ -1062,6 +1062,9 @@ msgstr ""
msgid "Frame Projection Y-Offset"
msgstr ""
msgid "Framebuffer"
msgstr ""
msgid "Frames"
msgstr ""
@ -2386,6 +2389,9 @@ msgstr ""
msgid "Video scale"
msgstr ""
msgid "Video Width"
msgstr ""
msgid "Virtual Pointer Speed"
msgstr ""

View File

@ -1062,6 +1062,9 @@ msgstr "畫框投射X軸位移"
msgid "Frame Projection Y-Offset"
msgstr "畫框投射Y軸位移"
msgid "Framebuffer"
msgstr ""
msgid "Frames"
msgstr "畫框數"
@ -2386,6 +2389,9 @@ msgstr ""
msgid "Video scale"
msgstr ""
msgid "Video Width"
msgstr ""
msgid "Virtual Pointer Speed"
msgstr "虛擬指針的速度"

View File

@ -1062,6 +1062,9 @@ msgstr ""
msgid "Frame Projection Y-Offset"
msgstr ""
msgid "Framebuffer"
msgstr ""
msgid "Frames"
msgstr ""
@ -2386,6 +2389,9 @@ msgstr ""
msgid "Video scale"
msgstr ""
msgid "Video Width"
msgstr ""
msgid "Virtual Pointer Speed"
msgstr ""

View File

@ -1062,6 +1062,9 @@ msgstr ""
msgid "Frame Projection Y-Offset"
msgstr ""
msgid "Framebuffer"
msgstr ""
msgid "Frames"
msgstr ""
@ -2386,6 +2389,9 @@ msgstr ""
msgid "Video scale"
msgstr ""
msgid "Video Width"
msgstr ""
msgid "Virtual Pointer Speed"
msgstr ""

View File

@ -59,7 +59,7 @@ void ClearDOLList()
}
void gamepatches(u8 videoSelected, u8 videoPatchDol, u8 aspectForce, u8 languageChoice, u8 patchcountrystring,
u8 vipatch, u8 deflicker, u8 sneekVideoPatch, u8 hooktype, u64 returnTo, u8 privateServer, const char *serverAddr)
u8 vipatch, u8 deflicker, u8 sneekVideoPatch, u8 hooktype, u8 videoWidth, u64 returnTo, u8 privateServer, const char *serverAddr)
{
int i;
u8 vfilter_off[7] = {0, 0, 21, 22, 21, 0, 0};
@ -99,6 +99,9 @@ void gamepatches(u8 videoSelected, u8 videoPatchDol, u8 aspectForce, u8 language
anti_002_fix(dst, len);
if (videoWidth == WIDTH_FRAMEBUFFER)
patch_width(dst, len);
if (deflicker == DEFLICKER_ON_LOW)
{
patch_vfilters(dst, len, vfilter_low);
@ -169,6 +172,54 @@ void anti_002_fix(u8 *addr, u32 len)
}
}
void patch_width(u8 *addr, u32 len)
{
u8 SearchPattern[32] = {
0x40, 0x82, 0x00, 0x08, 0x48, 0x00, 0x00, 0x1C,
0x28, 0x09, 0x00, 0x03, 0x40, 0x82, 0x00, 0x08,
0x48, 0x00, 0x00, 0x10, 0x2C, 0x03, 0x00, 0x00,
0x40, 0x82, 0x00, 0x08, 0x54, 0xA5, 0x0C, 0x3C};
u8 *addr_start = addr;
u8 *addr_end = addr + len - sizeof(SearchPattern);
while (addr_start <= addr_end)
{
if (memcmp(addr_start, SearchPattern, sizeof(SearchPattern)) == 0)
{
if (addr_start[-0x70] == 0xA0 && addr_start[-0x6E] == 0x00 && addr_start[-0x6D] == 0x0A)
{
if (addr_start[-0x44] == 0xA0 && addr_start[-0x42] == 0x00 && addr_start[-0x41] == 0x0E)
{
u8 reg_a = (addr_start[-0x6F] >> 5);
u8 reg_b = (addr_start[-0x43] >> 5);
// Patch to the framebuffer resolution
addr_start[-0x41] = 0x04;
// Center the image
void *offset = addr_start - 0x70;
u32 old_heap_ptr = *(u32 *)0x80003110;
*(u32 *)0x80003110 = old_heap_ptr - 0x20;
u32 heap_space = old_heap_ptr - 0x20;
u32 org_address = (addr_start[-0x70] << 24) | (addr_start[-0x6F] << 16);
*(u32 *)(heap_space + 0x00) = org_address | 4;
*(u32 *)(heap_space + 0x04) = 0x200002D0 | (reg_b << 21) | (reg_a << 16);
*(u32 *)(heap_space + 0x08) = 0x38000002 | (reg_a << 21);
*(u32 *)(heap_space + 0x0C) = 0x7C000396 | (reg_a << 21) | (reg_b << 16) | (reg_a << 11);
*(u32 *)offset = 0x48000000 + ((heap_space - (u32)offset) & 0x3ffffff);
*(u32 *)(heap_space + 0x10) = 0x48000000 + ((((u32)offset + 0x04) - (heap_space + 0x10)) & 0x3ffffff);
gprintf("Patched resolution. Branched from 0x%x to 0x%x\n", offset, heap_space);
return;
}
}
}
addr_start += 4;
}
}
/** Patch GXSetCopyFilter to disable the deflicker filter **/
void deflicker_patch(u8 *addr, u32 len)
{

View File

@ -10,11 +10,12 @@ extern "C" {
void RegisterDOL(u8 *dst, int len);
void ClearDOLList();
void gamepatches(u8 videoSelected, u8 videoPatchDol, u8 aspectForce, u8 languageChoice, u8 patchcountrystring,
u8 vipatch, u8 deflicker, u8 sneekVideoPatch, u8 hooktype, u64 returnTo, u8 privateServer, const char *serverAddr);
u8 vipatch, u8 deflicker, u8 sneekVideoPatch, u8 hooktype, u8 videoWidth, u64 returnTo, u8 privateServer, const char *serverAddr);
void anti_002_fix(u8 *addr, u32 len);
void deflicker_patch(u8 *addr, u32 len);
void patch_vfilters(u8 *addr, u32 len, u8 *vfilter);
void patch_vfilters_rogue(u8 *addr, u32 len, u8 *vfilter);
void patch_width(u8 *addr, u32 len);
void PrivateServerPatcher(void *addr, u32 len, u8 privateServer, const char *serverAddr);
void PatchFix480p();
s8 do_new_wiimmfi();

View File

@ -188,6 +188,7 @@ bool CGameSettings::Save()
fprintf(f, "videoPatchDol:%d; ", GameList[i].videoPatchDol);
fprintf(f, "patchFix480p:%d; ", GameList[i].patchFix480p);
fprintf(f, "deflicker:%d; ", GameList[i].deflicker);
fprintf(f, "videowidth:%d; ", GameList[i].videoWidth);
fprintf(f, "aspectratio:%d; ", GameList[i].aspectratio);
fprintf(f, "language:%d; ", GameList[i].language);
fprintf(f, "ocarina:%d; ", GameList[i].ocarina);
@ -276,6 +277,11 @@ bool CGameSettings::SetSetting(GameCFG & game, const char *name, const char *val
game.deflicker = atoi(value);
return true;
}
else if(strcmp(name, "videowidth") == 0)
{
game.videoWidth = atoi(value);
return true;
}
else if(strcmp(name, "aspectratio") == 0)
{
game.aspectratio = atoi(value);
@ -677,6 +683,7 @@ void CGameSettings::SetDefault(GameCFG &game)
game.videoPatchDol = INHERIT;
game.patchFix480p = INHERIT;
game.deflicker = INHERIT;
game.videoWidth = INHERIT;
game.aspectratio = INHERIT;
game.language = INHERIT;
game.ocarina = INHERIT;

View File

@ -25,6 +25,7 @@ typedef struct _GameCFG
u32 alternatedolstart;
short patchcountrystrings;
std::string alternatedolname;
short videoWidth;
short returnTo;
short sneekVideoPatch;
short NandEmuMode;
@ -92,6 +93,7 @@ typedef struct _GameCFG
this->alternatedolstart = game.alternatedolstart;
this->patchcountrystrings = game.patchcountrystrings;
this->alternatedolname = game.alternatedolname;
this->videoWidth = game.videoWidth;
this->returnTo = game.returnTo;
this->sneekVideoPatch = game.sneekVideoPatch;
this->NandEmuMode = game.NandEmuMode;

View File

@ -108,6 +108,7 @@ void CSettings::SetDefault()
videoPatchDol = OFF;
patchFix480p = ON;
deflicker = DEFLICKER_AUTO;
videoWidth = WIDTH_AUTO;
language = CONSOLE_DEFAULT;
ocarina = OFF;
hddinfo = CLOCK_HR12;
@ -327,6 +328,7 @@ bool CSettings::Save()
fprintf(file, "videoPatchDol = %d\n", videoPatchDol);
fprintf(file, "patchFix480p = %d\n", patchFix480p);
fprintf(file, "deflicker = %d\n", deflicker);
fprintf(file, "videowidth = %d\n", videoWidth);
fprintf(file, "language = %d\n", language);
fprintf(file, "ocarina = %d\n", ocarina);
fprintf(file, "hddinfo = %d\n", hddinfo);
@ -584,6 +586,11 @@ bool CSettings::SetSetting(char *name, char *value)
deflicker = atoi(value);
return true;
}
else if (strcmp(name, "videowidth") == 0)
{
videoWidth = atoi(value);
return true;
}
else if (strcmp(name, "language") == 0)
{
language = atoi(value);

View File

@ -120,6 +120,7 @@ class CSettings
short gamesoundvolume;
short tooltips;
short parentalcontrol;
short videoWidth;
u8 BootIOS;
u8 LoaderIOS;
u8 cios;

View File

@ -123,6 +123,13 @@ enum
DEFLICKER_MAX
};
enum
{
WIDTH_AUTO,
WIDTH_FRAMEBUFFER,
WIDTH_MAX
};
enum
{
CLOCK_HR12 = 1, // use OFF for clock off

View File

@ -72,6 +72,12 @@ static const char * DeflickerText[] =
trNOOP( "ON (High)" )
};
static const char * WidthText[] =
{
trNOOP( "Auto" ),
trNOOP( "Framebuffer" )
};
static const char * AspectText[] =
{
trNOOP( "Force 4:3" ),
@ -206,6 +212,7 @@ void GameLoadSM::SetOptionNames()
Options->SetName(Idx++, "%s", tr( "Sneek Video Patch" ));
Options->SetName(Idx++, "%s", tr( "VIDTV Patch" ));
Options->SetName(Idx++, "%s", tr( "Deflicker Filter" ));
Options->SetName(Idx++, "%s", tr( "Video Width" ));
Options->SetName(Idx++, "%s", tr( "Aspect Ratio" ));
Options->SetName(Idx++, "%s", tr( "Patch Country Strings" ));
Options->SetName(Idx++, "%s", tr( "Game Language" ));
@ -288,6 +295,12 @@ void GameLoadSM::SetOptionValues()
else
Options->SetValue(Idx++, "%s", tr(DeflickerText[GameConfig.deflicker]));
//! Settings: Video Width
if(GameConfig.videoWidth == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(WidthText[GameConfig.videoWidth]));
//! Settings: Aspect Ratio
if(GameConfig.aspectratio == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
@ -483,6 +496,12 @@ int GameLoadSM::GetMenuInternal()
if (++GameConfig.deflicker >= DEFLICKER_MAX) GameConfig.deflicker = INHERIT;
}
//! Settings: Video Width
else if (ret == ++Idx)
{
if (++GameConfig.videoWidth >= WIDTH_MAX) GameConfig.videoWidth = INHERIT;
}
//! Settings: Aspect Ratio
else if (ret == ++Idx)
{

View File

@ -61,7 +61,7 @@ static const char * VideoModeText[] =
trNOOP( "Force NTSC" ),
trNOOP( "Region Patch" ),
trNOOP( "Force PAL480p" ),
trNOOP( "Force NTSC480p" ),
trNOOP( "Force NTSC480p" )
};
static const char * VideoPatchDolText[] =
@ -69,7 +69,7 @@ static const char * VideoPatchDolText[] =
trNOOP( "OFF" ),
trNOOP( "Region Patch" ),
trNOOP( "ON" ),
trNOOP( "All" ),
trNOOP( "All" )
};
static const char * DeflickerText[] =
@ -82,6 +82,12 @@ static const char * DeflickerText[] =
trNOOP( "ON (High)" )
};
static const char * WidthText[] =
{
trNOOP( "Auto" ),
trNOOP( "Framebuffer" )
};
static const char * LanguageText[] =
{
trNOOP( "Japanese" ),
@ -114,20 +120,20 @@ static const char * HooktypeText[] =
trNOOP( "GXDraw" ),
trNOOP( "GXFlush" ),
trNOOP( "OSSleepThread" ),
trNOOP( "AXNextFrame" ),
trNOOP( "AXNextFrame" )
};
static const char * ChannelLaunchText[] =
{
trNOOP( "Main DOL" ),
trNOOP( "Boot Content" ),
trNOOP( "Boot Content" )
};
static const char * GCMode[] =
{
trNOOP( "MIOS (Default & Customs)" ),
trNOOP( "Devolution" ),
trNOOP( "Nintendont" ),
trNOOP( "Nintendont" )
};
static const char * GCSourceText[][3] =
@ -136,7 +142,7 @@ static const char * GCSourceText[][3] =
{ trNOOP( "SD Path" ), "", "" },
{ trNOOP( "Auto" ), "", "" },
{ trNOOP( "Main Path" ), "/", trNOOP( "SD Path" ) },
{ trNOOP( "SD Path" ), "/", trNOOP( "Main Path" ) },
{ trNOOP( "SD Path" ), "/", trNOOP( "Main Path" ) }
};
static const char * DMLVideoText[] =
@ -150,21 +156,21 @@ static const char * DMLVideoText[] =
"", // unused
trNOOP( "Force PAL480p" ),
trNOOP( "Force NTSC480p" ),
trNOOP( "None" ),
trNOOP( "None" )
};
static const char * DMLNMMMode[] =
{
trNOOP( "OFF" ),
trNOOP( "ON" ),
trNOOP( "Debug" ),
trNOOP( "Debug" )
};
static const char * DMLDebug[] =
{
trNOOP( "OFF" ),
trNOOP( "ON" ),
trNOOP( "Debug Wait" ),
trNOOP( "Debug Wait" )
};
static const char * DEVOMCText[] =
@ -172,21 +178,21 @@ static const char * DEVOMCText[] =
trNOOP( "OFF" ),
trNOOP( "ON" ),
trNOOP( "Individual" ),
trNOOP( "Regional" ),
trNOOP( "Regional" )
};
static const char * NINMCText[] =
{
trNOOP( "OFF" ),
trNOOP( "Individual" ),
trNOOP( "ON (Multi)" ),
trNOOP( "ON (Multi)" )
};
static const char * NINCfgText[] =
{
trNOOP( "Delete" ),
trNOOP( "Create" ),
trNOOP( "No change" ),
trNOOP( "No change" )
};
static const char * PrivServText[] =
@ -195,7 +201,7 @@ static const char * PrivServText[] =
trNOOP( "NoSSL only" ),
trNOOP( "Wiimmfi" ),
trNOOP( "AltWFC" ),
trNOOP( "Custom" ),
trNOOP( "Custom" )
};
static const char blocked[22] =
@ -244,6 +250,7 @@ void LoaderSettings::SetOptionNames()
Options->SetName(Idx++, "%s", tr( "Sneek Video Patch" ));
Options->SetName(Idx++, "%s", tr( "VIDTV Patch" ));
Options->SetName(Idx++, "%s", tr( "Deflicker Filter" ));
Options->SetName(Idx++, "%s", tr( "Video Width" ));
Options->SetName(Idx++, "%s", tr( "Aspect Ratio" ));
Options->SetName(Idx++, "%s", tr( "Game Language" ));
Options->SetName(Idx++, "%s", tr( "Patch Country Strings" ));
@ -340,6 +347,9 @@ void LoaderSettings::SetOptionValues()
//! Settings: Deflicker Filter
Options->SetValue(Idx++, "%s", tr( DeflickerText[Settings.deflicker] ));
//! Settings: Video Width
Options->SetValue(Idx++, "%s", tr( WidthText[Settings.videoWidth] ));
//! Settings: Aspect Ratio
Options->SetValue(Idx++, "%s", tr( AspectText[Settings.GameAspectRatio] ));
@ -601,6 +611,12 @@ int LoaderSettings::GetMenuInternal()
if (++Settings.deflicker >= DEFLICKER_MAX) Settings.deflicker = 0;
}
//! Settings: Video Width
else if (ret == ++Idx)
{
if (++Settings.videoWidth >= WIDTH_MAX) Settings.videoWidth = 0;
}
//! Settings: Aspect Ratio
else if (ret == ++Idx )
{

View File

@ -312,6 +312,7 @@ int GameBooter::BootGame(struct discHdr *gameHdr)
u8 reloadblock = game_cfg->iosreloadblock == INHERIT ? Settings.BlockIOSReload : game_cfg->iosreloadblock;
u8 Hooktype = game_cfg->Hooktype == INHERIT ? Settings.Hooktype : game_cfg->Hooktype;
u8 WiirdDebugger = game_cfg->WiirdDebugger == INHERIT ? Settings.WiirdDebugger : game_cfg->WiirdDebugger;
u16 videoWidth = game_cfg->videoWidth == INHERIT ? Settings.videoWidth : game_cfg->videoWidth;
u64 returnToChoice = strlen(Settings.returnTo) > 0 ? (game_cfg->returnTo ? NandTitles.FindU32(Settings.returnTo) : 0) : 0;
u8 NandEmuMode = OFF;
const char *NandEmuPath = game_cfg->NandEmuPath.size() == 0 ? Settings.NandEmuPath : game_cfg->NandEmuPath.c_str();
@ -485,13 +486,13 @@ int GameBooter::BootGame(struct discHdr *gameHdr)
{
//! Either the server is not Wiimmfi, or, if it is Wiimmfi, the game isn't MKWii - patch the old way
gamepatches(videoChoice, videoPatchDolChoice, aspectChoice, languageChoice, countrystrings, viChoice,
deflicker, sneekChoice, Hooktype, returnToChoice, PrivServChoice, customAddress);
deflicker, sneekChoice, Hooktype, videoWidth, returnToChoice, PrivServChoice, customAddress);
}
else
{
//! Wiimmfi patch for Mario Kart Wii - patch with PRIVSERV_OFF and handle all the patching within do_new_wiimmfi()
gamepatches(videoChoice, videoPatchDolChoice, aspectChoice, languageChoice, countrystrings, viChoice,
deflicker, sneekChoice, Hooktype, returnToChoice, PRIVSERV_OFF, customAddress);
deflicker, sneekChoice, Hooktype, videoWidth, returnToChoice, PRIVSERV_OFF, customAddress);
}
//! Load Code handler if needed