Skip to content

Commit

Permalink
(PSP) Hack - Get around FPU exception - division by zero
Browse files Browse the repository at this point in the history
  • Loading branch information
inactive123 committed Feb 13, 2014
1 parent 6a6f56a commit 94d70b6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile.psp1
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
RARCH_VERSION = "0.9.9.3"
BUILD_PRX = 1

HAVE_FILE_LOGGER = 1

Expand Down
5 changes: 5 additions & 0 deletions gfx/gfx_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 94d70b6

Please sign in to comment.