(video_driver) fix windowed viewport with libretro rotation (#15247)
* (video_driver) fix viewport with libretro rotation
This commit is contained in:
parent
33c4873b5b
commit
3036c47034
|
@ -3293,20 +3293,42 @@ bool video_driver_init_internal(bool *video_is_threaded, bool verbosity_enabled)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Determine nominal window size based on
|
/* rotated games send unrotated width/height and
|
||||||
* core geometry */
|
* require special handling here because of it */
|
||||||
if (settings->bools.video_force_aspect)
|
if ((retroarch_get_rotation() % 2))
|
||||||
{
|
{
|
||||||
/* Do rounding here to simplify integer
|
/* Determine nominal window size based on
|
||||||
* scale correctness. */
|
* core geometry */
|
||||||
unsigned base_width = roundf(geom->base_height *
|
if (settings->bools.video_force_aspect)
|
||||||
video_st->aspect_ratio);
|
{
|
||||||
width = base_width * video_scale;
|
/* Do rounding here to simplify integer
|
||||||
|
* scale correctness. */
|
||||||
|
unsigned base_width = roundf(geom->base_width *
|
||||||
|
video_st->aspect_ratio);
|
||||||
|
width = base_width * video_scale;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
width = geom->base_height * video_scale;
|
||||||
|
|
||||||
|
height = geom->base_width * video_scale;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
width = geom->base_width * video_scale;
|
{
|
||||||
|
/* Determine nominal window size based on
|
||||||
|
* core geometry */
|
||||||
|
if (settings->bools.video_force_aspect)
|
||||||
|
{
|
||||||
|
/* Do rounding here to simplify integer
|
||||||
|
* scale correctness. */
|
||||||
|
unsigned base_width = roundf(geom->base_height *
|
||||||
|
video_st->aspect_ratio);
|
||||||
|
width = base_width * video_scale;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
width = geom->base_width * video_scale;
|
||||||
|
|
||||||
height = geom->base_height * video_scale;
|
height = geom->base_height * video_scale;
|
||||||
|
}
|
||||||
|
|
||||||
/* Cap window size to maximum allowed values */
|
/* Cap window size to maximum allowed values */
|
||||||
if ((width > max_win_width) || (height > max_win_height))
|
if ((width > max_win_width) || (height > max_win_height))
|
||||||
|
|
Loading…
Reference in New Issue