mirror of
https://github.com/libretro/RetroArch
synced 2025-03-26 02:37:23 +00:00
How nice - geom->base_width and geom->base_height are const, so
we have to put them in local copies first
This commit is contained in:
parent
535f130891
commit
a788009e7c
@ -252,12 +252,16 @@ void gfx_set_config_viewport(void)
|
|||||||
aspectratio_lut[ASPECT_RATIO_CONFIG].value = geom->aspect_ratio;
|
aspectratio_lut[ASPECT_RATIO_CONFIG].value = geom->aspect_ratio;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
unsigned base_width, base_height;
|
||||||
|
base_width = geom->base_width;
|
||||||
|
base_height = geom->base_height;
|
||||||
|
|
||||||
// Get around division by zero errors
|
// Get around division by zero errors
|
||||||
if (geom->base_width == 0)
|
if (base_width == 0)
|
||||||
geom->base_width = 1;
|
base_width = 1;
|
||||||
if (geom->base_height == 0)
|
if (base_height == 0)
|
||||||
geom->base_height = 1;
|
base_height = 1;
|
||||||
aspectratio_lut[ASPECT_RATIO_CONFIG].value = (float)geom->base_width / geom->base_height; // 1:1 PAR.
|
aspectratio_lut[ASPECT_RATIO_CONFIG].value = (float)base_width / base_height; // 1:1 PAR.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user