mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
(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
|
||||
* core geometry */
|
||||
if (settings->bools.video_force_aspect)
|
||||
/* rotated games send unrotated width/height and
|
||||
* require special handling here because of it */
|
||||
if ((retroarch_get_rotation() % 2))
|
||||
{
|
||||
/* Do rounding here to simplify integer
|
||||
* scale correctness. */
|
||||
unsigned base_width = roundf(geom->base_height *
|
||||
video_st->aspect_ratio);
|
||||
width = 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_width *
|
||||
video_st->aspect_ratio);
|
||||
width = base_width * video_scale;
|
||||
}
|
||||
else
|
||||
width = geom->base_height * video_scale;
|
||||
|
||||
height = geom->base_width * video_scale;
|
||||
}
|
||||
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 */
|
||||
if ((width > max_win_width) || (height > max_win_height))
|
||||
|
Loading…
x
Reference in New Issue
Block a user