improved pixel rendering

This commit is contained in:
dborth 2012-01-11 18:46:55 +00:00
parent 39102d8169
commit b562209da7
2 changed files with 17 additions and 3 deletions

View File

@ -3782,7 +3782,12 @@ MainMenu (int menu)
gameScreenImg = new GuiImage(gameScreen); gameScreenImg = new GuiImage(gameScreen);
gameScreenImg->SetAlpha(192); gameScreenImg->SetAlpha(192);
gameScreenImg->ColorStripe(30); gameScreenImg->ColorStripe(30);
if (GCSettings.render > 0 && !GCSettings.widescreen)
gameScreenImg->SetScaleX(screenwidth/(vmode->fbWidth*0.8));
else
gameScreenImg->SetScaleX(screenwidth/(float)vmode->fbWidth); gameScreenImg->SetScaleX(screenwidth/(float)vmode->fbWidth);
gameScreenImg->SetScaleY(screenheight/(float)vmode->efbHeight); gameScreenImg->SetScaleY(screenheight/(float)vmode->efbHeight);
} }
else else

View File

@ -620,6 +620,14 @@ ResetVideo_Emu ()
else else
{ {
rmode = FindVideoMode(); rmode = FindVideoMode();
if (!GCSettings.widescreen)
{
memcpy(&TV_Custom, rmode, sizeof(TV_Custom));
rmode = &TV_Custom;
rmode->fbWidth = 512;
}
Settings.SoundInputRate = 31953; Settings.SoundInputRate = 31953;
UpdatePlaybackRate(); UpdatePlaybackRate();
} }
@ -635,7 +643,7 @@ ResetVideo_Emu ()
GX_SetDispCopySrc (0, 0, rmode->fbWidth, rmode->efbHeight); GX_SetDispCopySrc (0, 0, rmode->fbWidth, rmode->efbHeight);
GX_SetDispCopyDst (rmode->fbWidth, rmode->xfbHeight); GX_SetDispCopyDst (rmode->fbWidth, rmode->xfbHeight);
GX_SetCopyFilter (rmode->aa, rmode->sample_pattern, (GCSettings.render == 1) ? GX_TRUE : GX_FALSE, rmode->vfilter); // deflicker ON only for filtered mode GX_SetCopyFilter(rmode->aa, rmode->sample_pattern, (rmode->xfbMode == VI_XFBMODE_SF) ? GX_FALSE : GX_TRUE, rmode->vfilter);
GX_SetFieldMode (rmode->field_rendering, ((rmode->viHeight == 2 * rmode->xfbHeight) ? GX_ENABLE : GX_DISABLE)); GX_SetFieldMode (rmode->field_rendering, ((rmode->viHeight == 2 * rmode->xfbHeight) ? GX_ENABLE : GX_DISABLE));
@ -751,7 +759,8 @@ update_video (int width, int height)
} }
else // unfiltered and filtered mode else // unfiltered and filtered mode
{ {
xscale = 320; xscale = 256;
if(vheight == 224 || vheight == 448) if(vheight == 224 || vheight == 448)
yscale = 224; yscale = 224;
else else