From 8d573e9d44e65dfd3f54cbd4480ca14a37425d71 Mon Sep 17 00:00:00 2001 From: aliaspider Date: Fri, 24 Oct 2014 23:45:06 +0100 Subject: [PATCH] (PSP) disallow odd values for viewport width/height. --- gfx/psp/psp1_gfx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gfx/psp/psp1_gfx.c b/gfx/psp/psp1_gfx.c index c335f34638..47b027dd68 100644 --- a/gfx/psp/psp1_gfx.c +++ b/gfx/psp/psp1_gfx.c @@ -716,7 +716,7 @@ static void psp_update_viewport(psp1_video_t* psp) #endif { if ((fabsf(device_aspect - desired_aspect) < 0.0001f) - || (fabsf((16.0/9.0) - desired_aspect) < 0.0001f)) + || (fabsf((16.0/9.0) - desired_aspect) < 0.02f)) { /* If the aspect ratios of screen and desired aspect * ratio are sufficiently equal (floating point stuff), @@ -751,6 +751,9 @@ static void psp_update_viewport(psp1_video_t* psp) psp->vp.height = height; } + psp->vp.width += psp->vp.width&0x1; + psp->vp.height += psp->vp.height&0x1; + psp_set_screen_coords(psp->frame_coords, psp->vp.x, psp->vp.y, psp->vp.width, psp->vp.height, psp->rotation);