From 94d70b6aba747dacfc72b5c7647353390743ee7e Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 13 Feb 2014 11:38:13 +0100 Subject: [PATCH] (PSP) Hack - Get around FPU exception - division by zero --- Makefile.psp1 | 1 + gfx/gfx_common.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/Makefile.psp1 b/Makefile.psp1 index 03c8398b6d..12eb7a5f0d 100644 --- a/Makefile.psp1 +++ b/Makefile.psp1 @@ -1,4 +1,5 @@ RARCH_VERSION = "0.9.9.3" +BUILD_PRX = 1 HAVE_FILE_LOGGER = 1 diff --git a/gfx/gfx_common.c b/gfx/gfx_common.c index 7e68ba7d98..425b6de965 100644 --- a/gfx/gfx_common.c +++ b/gfx/gfx_common.c @@ -251,7 +251,12 @@ void gfx_set_config_viewport(void) if (geom->aspect_ratio > 0.0f && g_settings.video.aspect_ratio_auto) aspectratio_lut[ASPECT_RATIO_CONFIG].value = geom->aspect_ratio; else +#ifdef PSP + // Get around division by zero error + aspectratio_lut[ASPECT_RATIO_CONFIG].value = 1.0f; // 1:1 PAR. +#else aspectratio_lut[ASPECT_RATIO_CONFIG].value = (float)geom->base_width / geom->base_height; // 1:1 PAR. +#endif } else aspectratio_lut[ASPECT_RATIO_CONFIG].value = g_settings.video.aspect_ratio;