From b562209da7e1b6ed520190f5fcbcca3b660d6e1e Mon Sep 17 00:00:00 2001 From: dborth Date: Wed, 11 Jan 2012 18:46:55 +0000 Subject: [PATCH] improved pixel rendering --- source/menu.cpp | 7 ++++++- source/video.cpp | 13 +++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/source/menu.cpp b/source/menu.cpp index 24fa8ce..d0f9f38 100644 --- a/source/menu.cpp +++ b/source/menu.cpp @@ -3782,7 +3782,12 @@ MainMenu (int menu) gameScreenImg = new GuiImage(gameScreen); gameScreenImg->SetAlpha(192); gameScreenImg->ColorStripe(30); - gameScreenImg->SetScaleX(screenwidth/(float)vmode->fbWidth); + + if (GCSettings.render > 0 && !GCSettings.widescreen) + gameScreenImg->SetScaleX(screenwidth/(vmode->fbWidth*0.8)); + else + gameScreenImg->SetScaleX(screenwidth/(float)vmode->fbWidth); + gameScreenImg->SetScaleY(screenheight/(float)vmode->efbHeight); } else diff --git a/source/video.cpp b/source/video.cpp index 4e45663..f543c88 100644 --- a/source/video.cpp +++ b/source/video.cpp @@ -620,6 +620,14 @@ ResetVideo_Emu () else { rmode = FindVideoMode(); + + if (!GCSettings.widescreen) + { + memcpy(&TV_Custom, rmode, sizeof(TV_Custom)); + rmode = &TV_Custom; + rmode->fbWidth = 512; + } + Settings.SoundInputRate = 31953; UpdatePlaybackRate(); } @@ -635,7 +643,7 @@ ResetVideo_Emu () GX_SetDispCopySrc (0, 0, rmode->fbWidth, rmode->efbHeight); 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)); @@ -751,7 +759,8 @@ update_video (int width, int height) } else // unfiltered and filtered mode { - xscale = 320; + xscale = 256; + if(vheight == 224 || vheight == 448) yscale = 224; else