add soft and sharp video filtering options

This commit is contained in:
Daryl Borth 2018-08-16 09:36:28 -06:00
parent 905f94b03e
commit 72a6c2a79e
3 changed files with 14 additions and 4 deletions

View File

@ -663,7 +663,13 @@ ResetVideo_Emu ()
GX_SetDispCopySrc (0, 0, rmode->fbWidth, rmode->efbHeight);
GX_SetDispCopyDst (rmode->fbWidth, rmode->xfbHeight);
GX_SetCopyFilter(rmode->aa, rmode->sample_pattern, (rmode->xfbMode == VI_XFBMODE_SF) ? GX_FALSE : GX_TRUE, rmode->vfilter);
u8 sharp[7] = {0,0,21,22,21,0,0};
u8 soft[7] = {8,8,10,12,10,8,8};
u8* vfilter =
GCSettings.render == 3 ? sharp
: GCSettings.render == 4 ? soft
: rmode->vfilter;
GX_SetCopyFilter(rmode->aa, rmode->sample_pattern, (rmode->xfbMode == VI_XFBMODE_SF) ? GX_FALSE : GX_TRUE, vfilter);
GX_SetFieldMode (rmode->field_rendering, ((rmode->viHeight == 2 * rmode->xfbHeight) ? GX_ENABLE : GX_DISABLE));

View File

@ -3121,7 +3121,7 @@ static int MenuSettingsVideo()
{
case 0:
GCSettings.render++;
if (GCSettings.render > 2)
if (GCSettings.render > 4)
GCSettings.render = 0;
break;
@ -3183,6 +3183,10 @@ static int MenuSettingsVideo()
sprintf (options.value[0], "Filtered");
else if (GCSettings.render == 2)
sprintf (options.value[0], "Unfiltered");
else if (GCSettings.render == 3)
sprintf (options.value[0], "Filtered (Sharp)");
else if (GCSettings.render == 4)
sprintf (options.value[0], "Filtered (Soft)");
if(GCSettings.widescreen)
sprintf (options.value[1], "16:9 Correction");

View File

@ -379,8 +379,8 @@ void FixInvalidSettings()
GCSettings.language = LANG_ENGLISH;
if(GCSettings.Controller > CTRL_PAD4 || GCSettings.Controller < CTRL_ZAPPER)
GCSettings.Controller = CTRL_PAD2;
if(!(GCSettings.render >= 0 && GCSettings.render < 3))
GCSettings.render = 2;
if(!(GCSettings.render >= 0 && GCSettings.render < 5))
GCSettings.render = 4;
if(GCSettings.timing < 0 || GCSettings.timing > 2)
GCSettings.timing = 2;
if(!(GCSettings.videomode >= 0 && GCSettings.videomode < 5))