From 6ceb469c9cac8c24a8fda49ee8fad40ef6755ae1 Mon Sep 17 00:00:00 2001 From: aliaspider Date: Fri, 24 Oct 2014 23:43:50 +0100 Subject: [PATCH 1/2] (PSP) set default aspect ratio to ASPECT_RATIO_CORE. --- config.def.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config.def.h b/config.def.h index 34c55beafa..5d7f4909f9 100644 --- a/config.def.h +++ b/config.def.h @@ -428,6 +428,8 @@ static const bool aspect_ratio_auto = false; #if defined(__CELLOS_LV2) || defined(_XBOX360) static unsigned aspect_ratio_idx = ASPECT_RATIO_16_9; +#elif defined(PSP) +static unsigned aspect_ratio_idx = ASPECT_RATIO_CORE; #elif defined(RARCH_CONSOLE) static unsigned aspect_ratio_idx = ASPECT_RATIO_4_3; #else From 8d573e9d44e65dfd3f54cbd4480ca14a37425d71 Mon Sep 17 00:00:00 2001 From: aliaspider Date: Fri, 24 Oct 2014 23:45:06 +0100 Subject: [PATCH 2/2] (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);